Commit Graph

7292 Commits

Author SHA1 Message Date
Sune Foldager
9b847e3562 revlog: introduce _chunkbase to allow filelog to override
Used by revlog.revision to retrieve the base-chunk in a delta chain.
2011-04-30 16:33:47 +02:00
Sune Foldager
f18c48ae86 filelog: extract metadata parsing and packing
_parsemeta returns the dictionary and a list of keys in the order they appear
in metadata. This can be used to repack the dictionary in the same order.

_packmeta creates metadata from a dictionary and an optional key-order list.

In _parsemeta, we use slices and re.search indead of str.index so we can accept
both buffers and strings.
2011-04-30 16:32:50 +02:00
Peter Arrenbrecht
b867e650e6 discovery: drop findoutgoing and simplify findcommonincoming's api
This is a long desired cleanup and paves the way for new discovery.
To specify subsets for bundling changes, all code should use the heads
of the desired subset ("heads") and the heads of the common subset
("common") to be excluded from the bundled set. These can be used
revlog.findmissing instead of revlog.nodesbetween.

This fixes an actual bug exposed by the change in test-bundle-r.t
where we try to bundle a changeset while specifying that said changeset
is to be assumed already present in the target. This used to still
bundle the changeset. It no longer does. This is similar to the bugs
fixed by the recent switch to heads/common for incoming/pull.
2011-04-30 17:21:37 +02:00
Kevin Gessner
ee9623e8dc revset: add missing whitespace 2011-04-30 18:25:45 +02:00
Brodie Rao
56a02820c3 url: remove unused/obsolete functions 2011-04-30 07:00:13 -07:00
Kevin Gessner
c6374d2d98 revset: add ^ and ~ operators from parentrevspec extension
^ (Nth parent) and ~ (Nth first ancestor) are infix operators that match
certain ancestors of the set:

  set^0
  the set

  set^1 (also available as set^)
  the first parent of every changeset in set

  set^2
  the second parent of every changeset in set

  set~0
  the set

  set~1
  the first ancestor (i.e. the first parent) of every changeset in set

  set~2
  the second ancestor (i.e. first parent of first parent) of every changeset
  in set

  set~N
  the Nth ancestor (following first parents only) of every changeset in set;
  set~N is equivalent to set^1^1..., with ^1 repeated N times.
2011-04-30 17:43:04 +02:00
Matt Mackall
f865cc3f06 encoding: add an encoding-aware lower function 2011-04-30 10:57:13 -05:00
Kevin Gessner
e0a808198a add: notify when adding a file that would cause a case-folding collision
On a case-sensitive file system, files can be added with names that differ
only in case (a "case collision"). This would cause an error on case-insensitive
filesystems. A warning or error is now given for such collisions, depending on
the value of ui.portablefilenames ('warn', 'abort', or 'ignore'):

    $ touch file File
    $ hg add --config ui.portablefilenames=abort File
    abort: possible case-folding collision for File
    $ hg add File
    warning: possible case-folding collision for File
2011-04-30 12:39:46 +02:00
Kevin Gessner
3eac7995c0 scmutil: refactor ui.portablefilenames processing
The ui.portablefilenames config handling is generally useful for notifying the
user of various portability problems.
2011-04-30 11:08:24 +02:00
Dan Villiom Podlaski Christiansen
f5b77121bc pure bdiff: don't use a generator
Generators are slow, and currently defeat the PyPy JIT.
2011-04-30 15:05:36 +02:00
Dan Villiom Podlaski Christiansen
5ae771a2fc pure mpatch: avoid using list.insert(0, ...)
In Python lists are implemented as arrays with overallocation. As a
result, list.insert(0, ...) is O(n), whereas list.append() has an
amortised running time of O(1). Reversing the internal representation
of the list should cause a slight speedup for pure Python builds.
2011-04-30 15:05:34 +02:00
Alexander Solovyov
0eb3836642 remove unused imports and variables 2011-04-30 13:59:14 +02:00
Matt Mackall
d1ce6e070f revsets: add a last function
last(set, n) = reverser(limit(reverse(set), n))
2011-04-30 10:56:43 -05:00
Benoit Boissinot
a8923ec73f bundle: more comments about the different header types, remove useless if 2011-04-30 14:22:03 +02:00
Martin Geisler
a5dc911698 merge with mpm 2011-04-30 15:30:51 +02:00
Martin Geisler
e57b3a9f70 hgweb: initialize permhooks at definition time
This is simpler than creating it empty and then appending the default
checkauthz hook 50 lines below.
2011-04-30 13:47:22 +02:00
Brodie Rao
9c3a456083 revset: fix undefined name ParseError 2011-04-30 06:58:22 -07:00
Dan Villiom Podlaski Christiansen
a70a975a50 branchcache: improve speed relative to the amount of heads
Updating the branch cache is quadratic to the amount of heads in the
repository. One consequence of this was that cloning a pathological
repository with 10,000 heads (and nothing else) took hours of CPU
time.

This patch makes one of the inner loop much faster, by removing a
changectx instantiation, and removes another entirely in cases where
there are no candidate branch heads which descend from other branch
heads.
2011-04-30 12:56:28 +02:00
Alexander Solovyov
23228e2ea0 drop {short,hex}(ctx.node()) calls in favor of ctx methods 2011-04-30 12:55:07 +02:00
Matt Mackall
3b61150db3 merge with stable 2011-04-30 03:44:31 -05:00
Matt Mackall
463d91c511 subrepo: backout 11184e56ccc1 2011-04-30 03:00:38 -05:00
Peter Arrenbrecht
9855dca4f8 wireproto: add test for new optional arg missing on server
New argument is silently ignored by both HTTP and SSH servers.
This means we can, for instance, add new flags to getbundle()
to request advanced features (like lightweight-copy-aware bundles),
and older servers will silently ignore this request and send back
a plain bundle.
2011-04-29 14:54:01 +02:00
Matt Mackall
f184c5b13d merge with stable 2011-04-30 02:42:05 -05:00
Augie Fackler
a74cb339b1 subrepo: tell Subversion when we are non-interactive (issue2759)
$ hg clone repo repo-clone -v
  updating to branch default
  resolving manifests
  getting .hgsub
  getting .hgsubstate
  abort: svn: OPTIONS of 'https://subversion.srv/project': Server certificate
  verification failed: issuer is not trusted (https://subversion.srv)
2011-04-29 03:05:48 -05:00
Benoit Allard
1f65749729 web: Made elapsed time calculation dynamic (javascript).
This allow safe caching of the pages by the browser and still display the right
amount of elapsed time upon page refresh.

If javascript is disabled, absolute time is displayed, leaving it readable.

All the templates have been updated.
2011-04-28 17:02:39 +02:00
Martin Geisler
7564668184 commit: improve --date help text 2011-04-26 12:55:26 +02:00
Kevin Bullock
4669edf97c identify: further clarification of help
Following on to 9010cb9bd620, correct a minor grammar issue, re-wrap to
72 columns, and further clarify wording.
2011-04-19 13:33:43 -05:00
Martin Geisler
6cd55d2029 hgweb: detect change based on changelog size too
Before, there was a race between an access and a modification made
within the same second.
2011-04-19 15:15:56 +02:00
Martin Geisler
f225a4e198 rollback: lower-case warning issued when branch cannot be reset
Also improved the word order.
2011-04-19 13:25:19 +02:00
Martin Geisler
cb82832656 help config: explain that config files do not exist by default
Inspired by critique given on StackOverflow where a user writes:

  I can have a good guess at what "%USERPROFILE%" might signify but
  none of the files listed in the "hg help config" output exist after
  running the installer. Previous experience would suggest that
  missing files mean something somewhere has gone seriously wrong.

  http://stackoverflow.com/questions/2329023/2351139#2351139
2011-04-18 13:57:22 +02:00
Idan Kamara
44990ce111 identify/help: say what the command does first, mention bookmarks 2011-04-19 00:41:47 +03:00
Yun Lee
c6804b1629 help: move hgignore man page into built-in help (issue2769) 2011-04-17 23:08:35 +08:00
Alexander Solovyov
f4250e8e9c graphlog: make use of graphmod's revset support 2011-04-23 15:04:15 +02:00
Matt Mackall
1cf3cf83b1 encoding: avoid localstr when a string can be encoded losslessly (issue2763)
localstr's hash method exists to prevent bogus matching on lossy local
encodings. For instance, we don't want 'caf?' to match 'café' in an
ASCII locale.

But when café can be losslessly encoded in the local charset, we can
simply use a normal string and avoid the hashing trick.


This avoids using localstr's hash method, which would prevent a match between
2011-04-15 23:45:41 -05:00
Idan Kamara
32b141c5c5 help/revset: fix grammar 2011-04-15 16:35:32 +03:00
Thomas Arendsen Hein
e97f821988 subrepo: prevent url normalization from removing // in ssh paths (issue2556) 2011-04-07 12:33:47 +02:00
Md. O. Shayan
43492ff710 hgweb: fix inconsistant display of graphlog (issue1706) 2011-04-07 13:23:07 +05:30
Matt Mackall
ada95b57d4 merge with crew 2011-04-06 15:13:49 -05:00
Matt Mackall
bfe6a35a69 url: use a regex to hide unsupported ssh passwords (issue2754) 2011-04-06 15:10:47 -05:00
Martin Geisler
f484933f96 help/dates: rephrase explanation of internal format
The old explanation referred to the two numbers as "unixtime" and
"offset" without really defining those terms.
2011-04-05 10:04:19 +02:00
Yuya Nishihara
8138520db0 hgweb: add missing bookmarks definition to coal/map
It shares most templates with paper style.
2011-04-03 23:47:17 +09:00
Yuya Nishihara
63284146ac hgweb: add separate bookmarks listing to gitweb theme (based on 77ea38e46cc8) 2011-04-03 23:47:05 +09:00
Yuya Nishihara
ac9ff11417 hgweb: add bookmark labels to gitweb theme (based on 4d7cfa1867b5) 2011-04-03 23:44:28 +09:00
Yuya Nishihara
eac83f8ea6 hgweb: format page_nav of gitweb/error.tmpl and add missing links 2011-04-03 23:42:05 +09:00
Yuya Nishihara
d0f552f812 hgweb: fix typo and inactive link in page_nav and page_header of gitweb's help 2011-04-03 22:53:20 +09:00
Yuya Nishihara
6da6d2fbdd hgweb: add separate bookmarks listing to monoblue theme (based on 77ea38e46cc8) 2011-04-03 22:53:20 +09:00
Yuya Nishihara
0055d5983d hgweb: fix typo in page-header of monoblue's help template 2011-04-03 22:53:19 +09:00
Yuya Nishihara
e94cb76b15 hgweb: add missing bookmarks templates to atom/rss styles
It's already referenced from paper style.
2011-04-03 22:53:19 +09:00
Martin Geisler
42b381babb help/hgweb: add pointer to hgrc(5) location 2011-04-01 12:18:37 +02:00
Martin Geisler
9e82c0f40f patchbomb, help/hgweb: do not refer to config files as hgrc files 2011-04-01 12:14:42 +02:00