Mads Kiilerich <madski@unity3d.com> [Wed, 01 Oct 2014 03:41:11 +0200] rev 22672
merge: use bid merge by default (BC)
In most cases merges will work exactly as before.
The only difference is in criss-cross merge situations where there is multiple
ancestors. Instead of picking an more or less arbitrary ancestor, it will
consider both ancestors and pick the best bids.
Bid merge can be disabled with --config merge.preferancestor='!'.
Mads Kiilerich <madski@unity3d.com> [Wed, 01 Oct 2014 03:40:51 +0200] rev 22671
changectx: skip all invalid merge.preferancestor values
A better fix for
17011b36aac7 that will ignore other kinds of "invalid"
revisions.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 30 Apr 2014 16:56:23 -0700] rev 22670
revset: rely on built in iterator when possible in _generatorset.__iter__
Doing manual iteration is expensible. We rely on built in list iteration
whenever possible. The other case has to become a closure we cannot have a both
yield and return in the same function.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 18 Sep 2014 15:52:45 -0700] rev 22669
revset: prefetch an attribute in _generatorset.__iter__
Python's attribute lookup are expensible, lets do less of them.
This gives us a 7% speedup on this revset iteration (from 0.063403 to 0.059032)
Anton Shestakov <engored@ya.ru> [Tue, 09 Sep 2014 22:14:13 +0900] rev 22668
templater: add count template filter, plus tests
Previously there was no way of telling how much children or bookmarks or tags a
certain changeset has in a template. It was possible to tell if a changeset has
either 0 or not 0 bookmarks, but not to tell if it has 1 or 2 of them, for
example.
This filter, simply named count, makes it possible to count the number of items
in a list or the length of a string (or, anything that python's len can count).
E.g.: {children|count}, {bookmarks|count}, {file_adds|count}.
Testing the filter on node hash and shortened node hash is chosen because they
both have defined length.
As for lists of strings - children, tags and file_adds are used, because they
provide some variety and also prove that what's counted is the number of string
items in the list, and not the list stringified (they are lists of non-empty,
multi-character strings).
Additionally, revset template function is used for testing the filter, since
the combination is very flexible and will possibly be used together a lot.
(The previous version of this patch had an incorrect email subject and was
apparently lost - patchwork says the patch has been accepted, but it's not so.
The changes between that and this patch are minimal: now the filter does not
disturb the alphabetical order of function definitions and dict keys.)
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 17:35:33 -0700] rev 22667
push: update bookmarks (on server) within a transaction
A nice side effect is that bookmarks sent through bundle2 are updated within the
same transaction as all other changes.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 15:21:38 -0700] rev 22666
pull: perform bookmark updates in the transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 00:41:55 -0700] rev 22665
bookmark: add a `bmstore.recordupdate` to plug bookmarks into the transaction
Instead of manually writing bookmarks when they are updated, we can just record this
update to the transaction and rely on it to update the on-disk file.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 03:10:33 -0700] rev 22664
bookmarks: split bookmark serialization and file handling
If we want to handle bookmarks in a transaction we need to decouple the file
handling and the actual production of the content. This is similar to how we
handle phases in transaction.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 00:36:42 -0700] rev 22663
transaction: allow generating file outside of store
We allow a vfs argument to `addfilegenerator`. This allows generating files outside
of the store directory like bookmarks. However, this is not really working since
we do not have the infrastructure to backup and restore files outside of store.
By chance, the bookmark file is already backed up by another mechanism so we can
restrict this new feature to bookmarks (which is our only interest here) and
proceed.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 01 Oct 2014 21:40:44 -0500] rev 22662
transaction: work around and document issue with file backup
The backup restoration is actually hard-coded for the main file. And this
hard-coded list is the only one used when repairing an interrupted transaction
from another process.
Solving this problem is out of the scope of this series so we document it and
work around its implications.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 02 Oct 2014 00:15:15 -0500] rev 22661
bundle2: remove an explicit packing
The final writing of the empty part was done explicitly. We now using proper
pack call using symbolic constant. This open simple change in the bundle2
format.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 01 Oct 2014 23:55:22 -0500] rev 22660
bundle2: split test in two
We split the test between the one dedicated to the binary format and the one
dedicated to checking the exchange of data using pull and push.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 14:07:56 -0700] rev 22659
pull: merge bookmark updates and imports
We do all the things in one go now, updating existing bookmark, adding new ones,
and overwriting the ones explicitly specified for --bookmark. This impacts the
tests by removing some duplicated or unnecessary output.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 13:43:31 -0700] rev 22658
pull: gather explicit bookmark pulls with bookmark updates
There is no reason to make them at different times. So we gather them. This is
the first step toward merging them.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 12:47:25 -0700] rev 22657
subrepo: stop pulling bookmark manually
Bookmark pulling is now done with all the other pull steps in the
`exchange.pull` function.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 01:59:56 -0700] rev 22656
pull: retrieve bookmarks through bundle2
We can retrieve any pushkey namespace through bundle2. So we also ask for
bookmark data and use them to update the local repo.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 01:37:56 -0700] rev 22655
pull: retrieve bookmarks before obsmarkers
Retrieving bookmarks before obsmarkers will avoid turning some changesets hidden
right before making them visible again if a bookmark keeps them visible.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 01:31:15 -0700] rev 22654
pull: move bookmark pulling into its own function
This requires adding an attribute on the pulloperation object. The bookmark
pulling is protected behind a "todostep" as other steps of pull.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 01:34:02 -0700] rev 22653
pull: perform the todostep inside functions handling old way of pulling
This matches what is done during push.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 23:04:35 -0700] rev 22652
bookmark: remove now unused `pushtoremote` function
Everything is unified in the push discovery now.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 20:51:53 -0700] rev 22651
push: gather all bookmark decisions together
The discovery phases for bookmarks now use the list of explicitly pushed bookmarks
to do addition, removal and overwriting.
Tests are impacted because this reduces the amount of listkeys calls issued, removes
some duplicated messages and improves the accuracy of some messages.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 18:33:11 -0700] rev 22650
push: prepare the issue of multiple kinds of messages
To gather all the bookmark pushing actions together, we need code performing
those actions to be ready for them. We need to be able to produce different
messages for different actions.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 02 Oct 2014 13:19:49 -0500] rev 22649
push: set bkresult when pushing bookmarks through bundle2
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 13:56:20 -0700] rev 22648
clone: remove duplicated bookmark pulling
Now that all clone methods (copy, pull and push) also transport bookmarks, we can
safely drop the manual pulling that was performed during clone.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 15:15:49 -0700] rev 22647
clone: explicitly push bookmarks when cloning from local to remote
We need to explicitly push all local bookmarks when doing the clone from a local
repo to a remote one through ssh. This will let us remove the manual export of
bookmarks in clone and rely on the official exchange in push and pull instead.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 13:55:53 -0700] rev 22646
clone: copy `.hg/bookmarks` during copy clone
Now that the standard pull function includes bookmarks, we need to ensure that
a copy clone also copies the bookmarks. This will let us drop the manual bookmark
pulling done independently during a clone.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 26 Sep 2014 17:44:00 -0700] rev 22645
pull: move bookmark movements inside the `exchange.pull`
There is no reason for bookmarks to get a special treatment. As a first step we
move the code as is in the `exchange.pull` function. Integration with the rest
of the flow will come later.
Adding bookmarks to pull means that most clone paths are now pulling bookmarks
through pull. We ensure that bookmark-update messages are properly suppressed in
that case.
In test-pull-http.t the 'requesting all changes' message disappear because we
now get the authentication error on the `listkeys`command before such message
is printed.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 02 Oct 2014 12:16:07 -0500] rev 22644
bookmarks: allow `updatefromremote` to be quiet
This will be useful to use the function during clone (clone is not printing any
bookmark data right now)
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 02 Oct 2014 12:39:37 -0500] rev 22643
util: fix sorteddict.pop
When using `.pop` on such object the list was not cleared of the popped key,
leading to crash.