Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Jan 2013 14:15:32 +0100] rev 18444
rebase: do not invent successor to skipped changeset
When rebase results in an empty a changeset it is "skipped" and no related
changeset is created at all. When we added obsolescence support to rebase (in
fc2a6114f0a0) it seemed a good idea to use its parent successor as the
successors for such dropped changesets. (see old version of the altered test).
This option was chosen because it seems a good way to hint about were the
dropped changeset "intended" to be. Such hint would have been used by automatic
evolution mechanism to rebase potential unstable children.
However, field testing of this version are not conclusive. It very often leads
to the creation of (totally unfounded) evolution divergence. This changeset
changes this behavior and mark skipped changesets as pruned (obsolete without
successors). This prevents the issue and seems semantically better probably a
win for obsolescence reading tool.
See example bellow for details:
User Babar has five changesets of interest:
- O, its current base of development.
- U, the new upstream
- A and C, some development changesets
- B another development changeset independent from A
O - A - B - C
\
U
Babar decides that B is more critical than the A and C and rebase it first
$ hg rebase --rev B --dest U
B is now obsolete (in lower case bellow). Rebase result, B', is its
successors.(note, C is unstable)
O - A - b - C
\
U - B'
Babar is now done with B', and want to rebase the rest of its history:
$ hg rebase --source A --dest B'
hg rebase process A, B and C. B is skipped as all its changes are already contained
in B'.
O - U - B' - A' - C'
Babar have the expected result graph wise, obsolescence marker are as follow:
B -> B' (from first rebase)
A -> A' (from second rebase)
C -> C' (from second rebase)
B -> ?? (from second rebase)
Before this changeset, the last marker is `B -> A'`. This cause two issues:
- This is semantically wrong. B have nothing to do with A'
- B has now two successors sets: (B',) and (A',). We detect a divergent
rewriting. The B' and A' are reported as "divergent" to Babar, confusion
ensues. In addition such divergent situation (divergent changeset are children
to each other) is tricky to solve.
With this changeset the last marker is `B -> ΓΈ`:
- This is semantically better.
- B has a single successors set (B',)
This scenario is added to the tests suite.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 17 Jan 2013 17:51:30 +0100] rev 18443
repoview: protect `base` computation from weird phase root
If for some reason the phase roots contains nullid, the set of filtered revs
will contains -1. That confuse Mercurial a lot. In particular this corrupt the
branchcache.
Standard code path does not result in nullid phase root. It can only result from
altered `.hg/store/phaseroots` or buggy extension. However better safe than
sorry.
Siddharth Agarwal <sid0@fb.com> [Fri, 18 Jan 2013 15:55:16 -0800] rev 18442
posix: don't compare atime when determining if a file has changed
A file's atime might change even if the file itself doesn't change. This might
cause us to invalidate caches more often than necessary.
Before this change, hg add often resulted in the dirstate being parsed twice
on systems that track atime. After this change, it is only parsed once. For a
repository with over 180,000 files, this speeds up hg add from 1.2 seconds to
1.0.
Augie Fackler <raf@durin42.com> [Fri, 05 Oct 2012 18:10:56 -0500] rev 18441
hg: replace DirCleanup class with normal try/finally use
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 16 Jan 2013 19:21:03 +0100] rev 18440
histedit: proper phase conservation (
issue3724)
Before this changeset, histedit created all new changesets according
phases.new-commit option without any regards for the phases of the original
changesets.
This changeset fix that using the phase of rewritten changeset to decide the
phase of the resulting changeset. In case of reordering or folding, we keep
secret item secret as it seems the safer path.
temporary commit creation are not affected. They are head only and stripped at
the end of the histedit.
As for the resolution of
issue3681 (obsolescence cycle prevention), we do not
handle changesets created by edit command.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 16 Jan 2013 19:19:56 +0100] rev 18439
test-histedit: reorder phases test and prepare for more
We are going to add a lot regarding phase of test while fixing
issue3724.
This movement allows to put them after this first phase test.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 16 Jan 2013 19:17:36 +0100] rev 18438
test-histedit: fix instability creation test
The current test does not rewrite anything and therefor does not create any
instability.
We also clean up the repo state after the test. This required the rebase
extension.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 16 Jan 2013 19:14:22 +0100] rev 18437
histedit: record histedit source (
issue3681)
Have histedit record the hex of the original changeset as already done by:
- graft
- commit --amend
- rebase
My main motivation for adding this is to prevent the creation of obsolescence cycle
(see
issue3681).
Note that commit created during edit are not affected yet.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 16 Jan 2013 19:11:06 +0100] rev 18436
histedit: factor most commit creation in a function
Later commits add two important items to histedit:
- Obsolescence cycle prevention
- Proper phase conservation
Those logics must be applied to all simple operations (pick, edit, mess) and
will require verbose code.
So we introduce a new function that will provide an entry point for this new.
logic.
The function build a closure to have a clear distinction between commit
arguments and data provided to the function to fulfil its logic.
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:37 -0800] rev 18435
store: switch to C-based hashed path encoding
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:36 -0800] rev 18434
pathencode: implement both basic and hashed encoding in C
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:36 -0800] rev 18433
pathencode: implement hashed encoding in C
This will be used by an upcoming patch.
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:35 -0800] rev 18432
pathencode: implement the "mangling" part of hashed encoding in C
This will be used by an upcoming patch.
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:34 -0800] rev 18431
pathencode: add a SHA-1 hash function
This will be used by an upcoming patch.
This calls out to the Python hash implementation.
An earlier version of this function implemented SHA-1 directly, but
the amount of extra code didn't seem like a good tradeoff compared
to the small big-picture increase in performance (long paths are
uncommon).
Bryan O'Sullivan <bryano@fb.com> [Wed, 12 Dec 2012 13:09:33 -0800] rev 18430
store: implement lowerencode in C
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 15 Jan 2013 22:34:56 +0100] rev 18429
hgweb: run with "served" filter
This changeset enable the "served" filter on all repo used by hgweb.
Hgweb misbehave in a lot of when filtering changeset are present but I do not
expect normal people to have secret or obsolete changeset on they server.
Misbehavior will be gradually fixed later.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 16 Jan 2013 14:22:43 +0100] rev 18428
hgweb: walk the graph through the changelog
This is necessary to enforce filtering. The result is a bit buggy (may provide
less changeset than expected, but it will stop crashing on filtered revision
access.
Note that changelog.revs can not represents empty iteration like xrange did. So
we have to explicitly prevent call when there is nothing to do.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 11 Jan 2013 01:08:00 +0100] rev 18427
hgweb: use changelog for iteration
Iterating through changelog is necessary to enforce filtering.
Pierre-Yves David <pierre-yves.david@logilab.fr> [Wed, 16 Jan 2013 14:19:28 +0100] rev 18426
hgweb: ignore filtered revision in revnav
This changeset checks that a revision is known before adding it to the
navigation.
This will prevent traceback on filtered repository. This changeset result in an
incorrect behaviors, Navigation link may be dropped without any replacement.
However this bad navigation generation is much better than a crash
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 10 Jan 2013 19:29:48 +0100] rev 18425
hgweb: generate revnav in two phase
We first generate revision to link. Then we dispatch them in before, after list.
This will help filtering of unknown revision.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 17 Jan 2013 00:35:01 +0100] rev 18424
rebase: support multiple roots for rebaseset
We have all the necessary mechanism to rebase a set with multiple roots, we only
needed a proper handling of this case we preparing and concluding the rebase.
This changeset des that.
Rebase set with multiple root allows some awesome usage of rebase like:
- rebase all your draft on lastest upstream
hg rebase --dest @ --rev 'draft()'
- exclusion of specific changeset during rebase
hg rebase --rev '42:: - author(Babar)'
- rebase a set of revision were multiple roots are later merged
hg rebase --rev '(18+42)::'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 16 Jan 2013 05:21:11 +0100] rev 18423
clfilter: stronger detection of filtered changeset in changectx.__init__
We previously let some IndexError spill out of this function.
A new tests is added to check the command that spotted the error.
Sune Foldager <cryo@cyanite.org> [Tue, 11 Dec 2012 20:13:21 +0100] rev 18422
validate: check for spurious incoming filelog entries
Accepting those will lead to "mild corruption", correctly reported as
an error by hg verify, but often not a problem in practice.
Enabled when server.validate is switched on.
Johannes Schlatow <johannes@schlatow.name> [Thu, 17 Jan 2013 01:06:00 +0100] rev 18421
zsh_completion: add descriptive branch names to head revisions