Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 26 Sep 2012 12:57:23 +0200] rev 17662
histedit: remove all usages of hex[:12]
- `node.hex(n)[:12]` is the same as `node.short(n)`
- `ctx.hex()[:12]` is the same as `str(ctx)`
Matt Mackall <mpm@selenic.com> [Thu, 27 Sep 2012 15:51:14 -0500] rev 17661
merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 27 Sep 2012 15:50:14 -0500] rev 17660
merge with i18n
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Jul 2012 20:56:41 -0400] rev 17659
largefiles: enable islfilesrepo() prior to a commit (
issue3541)
Previously, even if a file was added with --large, 'hg addremove' or 'hg ci -A'
would add all files (including the previously added large files) as normal
files. Only after a commit where a file was added with --large would subsequent
adds or 'ci -A' take into account the minsize or the pattern configuration.
This change more closely follows the help for largefiles, which mentions that
'add --large' is required to enable the configuration, but doesn't mention the
previously required commit.
Also, if 'hg add --large' was performed and then 'hg forget <file>' (both before
a largefile enabling commit), the forget command would error out saying
'.hglf/<file> not tracked'. This is also fixed.
This reports that a repo is largefiles enabled as soon as a file is added with
--large, which enables 'add', 'addremove' and 'ci -A' to honor the config
settings before the first commit. Note that prior to the next commit, if all
largefiles are forgotten, the repository goes back to reporting the repo as not
largefiles enabled.
It makes no sense to handle this by adding a --large option to 'addremove',
because then it would also be needed for 'commit', but only when '-A' is
specified. While this gets around the awkwardness of having to add a largefile,
then commit it, and then addremove the other files when importing an existing
codebase (and preserving that extra commit in permanent history), it does still
require finding and manually adding one of the files as --large. Therefore it
is probably desirable to have a --large option for init as well.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 30 Jul 2012 20:56:41 -0400] rev 17658
largefiles: handle commit -A properly, after a --large commit (
issue3542)
Previous to this, 'commit -A' would add as normal files, files that were already
committed as largefiles, resulting in files being listed twice by 'status -A'.
It also missed when (only) a largefile was deleted, even though status reported
it as '!'. This also has the side effect of properly reporting the state of the
affected largefiles in the post commit hook after a remove that also affected a
normal file (the largefiles used to be 'R', now are properly absent).
Since scmutil.addremove() is called both by the ui command (after some trivial
argument validation) and during the commit process when -A is specified, it
seems like a more appropriate method to wrap than the addremove command.
Currently, a repo is only enabled to use largefiles after an add that explicitly
identifies some file as large, and a subsequent commit. Therefore, this patch
only changes behavior after such a largefile enabling commit.
Note that in the test, if the final commit had a '-v', 'removing large8' would
be printed twice. Both of these originate in removelargefiles(). The first
print is in verbose mode after traversing remove + forget, the second is because
the '_isaddremove' attr is set and 'after' is not.
Alexander Sauta <demosito@gmail.com> [Tue, 25 Sep 2012 16:01:08 +0400] rev 17657
i18n-ru: synchronized with
6e2ab601be3f
Alexander Sauta <demosito@gmail.com> [Tue, 25 Sep 2012 15:25:12 +0400] rev 17656
merge with i18n
Nikolaj Sjujskij <sterkrig@myopera.com> [Fri, 14 Sep 2012 23:52:33 +0400] rev 17655
i18n-ru: fix spelling of "unrecognized response" translation
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17654
localrepo: use "vfs" constructor/field for initialization around "store"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17653
store: initialize "vfs" fields by "vfs" constructors
For backwards compatibility, "opener" fields are still left as aliases
for "vfs" ones.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17652
store: rename "op" variables to "vfs"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17651
store: rename "openertype" argument to "vfstype"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17650
localrepo: use "vfs" constructor instead of "opener" one
This patch also changes initialization order of "*opener" and "*vfs"
fields: first, "*vfs" fields are initialized , and then, "*opener"
ones are initialized.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 31 Aug 2012 02:06:29 +0900] rev 17649
scmutil: rename classes from "opener" to "vfs"
For backwards compatibility, aliases for the old names are added,
except for "abstractopener", "statichttpopener" and "_fncacheopener",
because these are not used in Mercurial core implementation after this
patch.
"_fncacheopener" was only referred in "fncachestore" constructor, so
this patch also renames from "_fncacheopener" to "_fncachevfs" there.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 13 Aug 2012 21:25:48 +0900] rev 17648
doc: add the tool to check section marks in help documents
This patch adds "doc/check-seclevel.py" which checks below in help
documents:
- whether unknown or unavailable section marks are used or not
- whether appropriate section mark is used at sub-sectioning
It should be invoked in "doc" directory.
It checks all help documents of Mercurial (topics, commands,
extensions), if no file is specified by --file option.
With --file option, it checks contents of the specified file as help
document, for self testing purpose: -t/-c/-e/-C are used to specify
what kind of help document contents of the specified file is.
This checking is related to changeset
979b107eaea2.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 19:27:22 +0200] rev 17647
histedit: replaces patching logic by merges
The old and fragile patching logic is replaced by smart merges (as rebase and
graft do). This should prevents some conflicts and smoother human resolution.
For this purpose the "foldchanges" function is renamed to "applychanges" and
handle a single revision only.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Sep 2012 19:13:25 +0200] rev 17646
histedit-test: ensure that non commute test will never commute
The previous version would commute if using merge algorithm (to be accurate,
merge will cleanly prompt the user during the merge).
The new version create and initial commit with some content for all involved
files en ensure all changes are a content changes of the first lines. This lead
to guaranteed conflict when commuted.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 19:25:19 +0200] rev 17645
histedit: display action being processed in debug mode
This is very useful when debugging histedit.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Fri, 21 Sep 2012 19:24:31 +0200] rev 17644
histedit: fold in memory
Update the folding code to works in memory instead of applying patches on the
working directory. This is cleaner, faster and prepare the removal of the whole
patching logic.
This new collapse function will probably move into core sooner or later. A lot
of other rewriting operation may benefit from it.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 00:33:30 +0200] rev 17643
histedit: move makedesc function near other rules related function
Having it in the middle of action logic is confusing
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 19:14:04 +0200] rev 17642
histedit: move `between function` outside the action logic
Having this function in the middle of action and patching logic did not make
sense
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 00:30:22 +0200] rev 17641
histedit document the makedest function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 21 Sep 2012 00:30:07 +0200] rev 17640
histedit: documents the between function
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:54:45 -0500] rev 17639
templatefilters: add parameterized date method
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:54:44 -0500] rev 17638
templatefilters: add parameterized fill function
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:28:04 -0500] rev 17637
templater: pull in functions defined in templatefilters
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:26:56 -0500] rev 17636
templater: add if/ifeq conditionals
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:26:17 -0500] rev 17635
templater: add sub() function
Matt Mackall <mpm@selenic.com> [Mon, 24 Sep 2012 15:24:27 -0500] rev 17634
templater: correctly deal with r"" strings
Matt Mackall <mpm@selenic.com> [Sat, 22 Sep 2012 13:04:36 -0500] rev 17633
template: add join function
This allows:
{join(files % "{files}", ", ") }\n
to produce a properly comma-separated list
Matt Mackall <mpm@selenic.com> [Sat, 22 Sep 2012 13:02:33 -0500] rev 17632
templater: factor out runtemplate method
As a side-effect, this makes the output of runmap non-flattened
Matt Mackall <mpm@selenic.com> [Fri, 21 Sep 2012 18:54:00 -0500] rev 17631
templating: make new-style templating features work with command line lists
David M. Carr <david@carrclan.us> [Thu, 20 Sep 2012 23:30:59 -0400] rev 17630
formatter: improve implementation of data method
This alternate syntax was proposed by Bryan O'Sullivan in a review of
772b3764d3e8. I haven't been able to measure any particular performance
difference, but the new syntax is more concise and easier to read.
Bryan O'Sullivan <bryano@fb.com> [Wed, 19 Sep 2012 09:38:51 -0700] rev 17629
Merge with crew-stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 19:46:15 +0900] rev 17628
archival: add "extended-timestamp" extra block for zip archives (
issue3600)
Before this patch, zip archives created by "hg archive" are extracted
with unexpected timestamp, if TZ is not configured as GMT.
This patch adds "extended-timestamp" extra block to zip archives, and
unzip will extract such archives with timestamp specified in added
extra block, even though TZ is not configured as GMT.
Please see documents below for detail about specification of zip file
format and "extended-timestamp" extra block:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
http://www.opensource.apple.com/source/zip/zip-6/unzip/unzip/proginfo/extra.fld
Original implementation of this patch was suggested by "Jun Omae
<jun66j5@gmail.com>".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17627
bookmarks: use "changectx.descendant()" for efficient descendant examination
This patch uses "old.descendant(new)" expression instead of
"new in old.descendants()" for efficiency.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17626
context: add "descendant()" to changectx for efficient descendant examination
This patch adds "descendant()", which uses "revlog.descendant()" for
descendant examination, to changectx.
This implementation is more efficient than "new in old.descendants()"
expression, because:
- "changectx.descendants()" creates temporary "changectx" objects,
but "revlog.descendant()" doesn't
"revlog.descendant()" checks only revision numbers of descendants.
- "revlog.descendant()" stops scanning, when scanning of all
revisions less than one of examination target is finished
this can avoid useless scanning in "not descendant" case.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 18 Sep 2012 21:39:12 +0900] rev 17625
bookmarks: avoid redundant creation/assignment of "validdests" in "validdest()"
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 14:00:23 +0200] rev 17624
store: add a fallback _pathencode Python function
which does the equivalent of parsers.pathencode, so it can be used as a
default
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 13:58:51 +0200] rev 17623
store: move _plainhybridencode and _dothybridencode higher up in the file
no functional change
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 11:39:18 +0200] rev 17622
test-hybridencode: use store._dothybridencode(s)
and compare it with the result of store._hybridencode(s, True)
Adrian Buehlmann <adrian@cadifra.com> [Wed, 19 Sep 2012 11:39:07 +0200] rev 17621
store: fix _hashencode call in _dothybridencode
Fixes
7840d81a80ec
Thomas Arendsen Hein <thomas@intevation.de> [Wed, 19 Sep 2012 12:29:12 +0200] rev 17620
check-code: catch yield inside try/finally (with tests)
This is not allowed in Python 2.4.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:30:21 -0700] rev 17619
Merge with mpm
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:25:20 -0700] rev 17618
store: use native fncache encoding function if available
This currently falls back to Python for hashed encoding.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 16:09:02 -0700] rev 17617
tests: run test-hybridencode.py over both Python and C encoders
This ensures that the two always give the same answers.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 15:42:19 -0700] rev 17616
store: implement fncache basic path encoding in C
(This is not yet enabled; it will be turned on in a followup patch.)
The path encoding performed by fncache is complex and (perhaps
surprisingly) slow enough to negatively affect the overall performance
of Mercurial.
For a short path (< 120 bytes), the Python code can be reduced to a fairly
tractable state machine that either determines that nothing needs to be
done in a single pass, or performs the encoding in a second pass.
For longer paths, we avoid the more complicated hashed encoding scheme
for now, and fall back to Python.
Raw performance: I measured in a repo containing 150,000 files in its tip
manifest, with a median path name length of 57 bytes, and 95th percentile
of 96 bytes.
In this repo, the Python code takes 3.1 seconds to encode all path
names, while the hybrid C-and-Python code (called from Python) takes
0.21 seconds, for a speedup of about 14.
Across several other large repositories, I've measured the speedup from
the C code at between 26x and 40x.
For path names above 120 bytes where we must fall back to Python for
hashed encoding, the speedup is about 1.7x. Thus absolute performance
will depend strongly on the characteristics of a particular repository.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:32:42 +0200] rev 17615
rebase: ensure rebase does not revive extinct revision
Here, we exclude hidden changesets from a rebase operation. If we
don't, a rewritten version of the hidden changesets will be created
by rebase. Those rewritten versions won't be hidden and will likely
conflict with other rewriting or revive pruned changeset. Moreover,
rewriting hidden revisions will surprise the user.
This change would not be necessary if changelog filtering were
already in core. But it's fairly cheap and helps to increase the
test-suite for such filtering.
Once changelog level filtering is added, hidden changes will be
automatically excluded or included according to the global --hidden
flags. Plain ignoring them is good enough for now.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:29:05 +0200] rev 17614
rebase: remove useless list around repo.revs
As repo.revs already returns a list.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:42:27 +0200] rev 17613
rebase: properly handle --collapse when creating obsolescence marker
In collapse mode, that content of state is not suitable to compute obsolescence
markers. We explicitly pass the resulting revision instead and use it as the
successors for all elements of the rebased set.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 18 Sep 2012 23:13:31 +0200] rev 17612
rebase: allow creation obsolescence relation instead of stripping
When obsolescence feature is enabled we now create markers from the rebased
set to the resulting set instead of stripping. The "state" mapping built by
rebase holds all necessary data.
Changesets "deleted" by the rebase are marked "succeeded" by the changeset they
would be rebased one. That the best guess of "successors" we have. Getting a
successors as meaningful as possible is important for automatic resolution of
obsolescence troubles. In other word, emptied changeset will looks collapsed
with their former parents. (see "empty changeset" section of the test if you are
still confused)
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 18 Sep 2012 22:58:12 +0200] rev 17611
rebase: extract final changesets cleanup logic in a dedicated function
At the end of the rebase, rebased changesets are currently stripped. This
behavior will be eventually dropped in favor of obsolescence marker creation.
The main rebase function is already big and branchy enough. This changeset move
the clean-up logic in a dedicated function before we make it more complex.
Bryan O'Sullivan <bryano@fb.com> [Tue, 18 Sep 2012 14:37:32 -0700] rev 17610
store: refactor hashed encoding into its own function
Adrian Buehlmann <adrian@cadifra.com> [Tue, 18 Sep 2012 19:51:59 +0200] rev 17609
store: reuse direncoded path in _hybridencode
For a netbeans clone on Windows 7 x64:
Before:
$ hg perffncacheencode
! wall 3.516000 comb 3.525623 user 3.525623 sys 0.000000 (best of 3)
After:
$ hg perffncacheencode
! wall 3.443000 comb 3.447622 user 3.447622 sys 0.000000 (best of 3)
Adrian Buehlmann <adrian@cadifra.com> [Tue, 18 Sep 2012 19:51:48 +0200] rev 17608
store: extract functions _encodefname and _decodefname
Adrian Buehlmann <adrian@cadifra.com> [Tue, 18 Sep 2012 11:44:16 +0200] rev 17607
store: use fast C implementation of encodedir() if it's available
For a netbeans clone on Windows 7 x64:
Encoding all paths in the fncache:
Before:
$ hg perffncacheencode
! wall 3.639000 comb 3.634823 user 3.634823 sys 0.000000 (best of 3)
After:
$ hg perffncacheencode
! wall 3.470000 comb 3.463222 user 3.463222 sys 0.000000 (best of 3)
Writing fncache:
Before:
$ hg perffncachewrite
! wall 0.103000 comb 0.093601 user 0.093601 sys 0.000000 (best of 95)
After:
$ hg perffncachewrite
! wall 0.081000 comb 0.078001 user 0.062400 sys 0.015600 (best of 100)
Adrian Buehlmann <adrian@cadifra.com> [Tue, 18 Sep 2012 11:43:30 +0200] rev 17606
pathencode: new C module with fast encodedir() function
Not yet used (will be enabled in a later patch).
This patch is a stripped down version of patches originally created by
Bryan O'Sullivan <bryano@fb.com>
Adrian Buehlmann <adrian@cadifra.com> [Tue, 18 Sep 2012 07:58:50 +0200] rev 17605
store: add multiline doctest case for encodedir()
a followup to
64c6a0d4d4bd
Adrian Buehlmann <adrian@cadifra.com> [Mon, 17 Sep 2012 11:00:38 +0200] rev 17604
store: optimize fncache._load a bit by dirdecoding the contents in one go
For a netbeans clone on Windows 7 x64:
Before:
$ hg perffncacheload
! wall 0.124000 comb 0.124801 user 0.124801 sys 0.000000 (best of 76)
After:
$ hg perffncacheload
! wall 0.096000 comb 0.093601 user 0.078001 sys 0.015600 (best of 97)
Thomas Arendsen Hein <thomas@intevation.de> [Tue, 18 Sep 2012 17:00:58 +0200] rev 17603
wireproto: workaround for yield inside try/finally incompatible with python2.4