Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Dec 2017 23:51:40 -0500] rev 35504
lfs: add the 'lfs' requirement in the changegroup transaction introducing lfs
A hook like this is how largefiles manages to do the same. Largefiles uses a
changegroup hook, but this uses pretxnchangegroup because that actually causes
the transaction to rollback in the unlikely event that writing the requirements
out fails. Sadly, the requires file itself isn't rolled back if a subsequent
hook fails, but that seems trivial.
Now that commit, changegroup and convert are covered, I don't think there's any
way to get an lfs repo without the requirement.
The grep exit code is blotted out of some test-lfs-serve.t tests now showing the
requirement, because run-tests.py doesn't support conditionalizing the exit
code.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Dec 2017 15:07:24 -0500] rev 35503
test-lfs: add tests covering http exchanges
This tries to test every combination of having the extension enabled/disabled
on each side, and then push/pull/clone/identify lfs and non-lfs content. SSH is
ignored here, because there's enough going on as it is.
The root issue here is again that requirements are not exchanged and preserved
on push/pull/clone. Doing so should eliminate the cryptic error messages when
using `hg serve`. The 500 server error is triggered by "ValueError: no common
changegroup version", because the extension forces changegroup3. Or, if
changegroup3 is enabled manually, it is triggered by "abort: missing processor
for flag '0x2000'!".
Sadly, run-tests.py doesn't support conditionalizing the exit code like it does
lines of output. Therefore, a couple of tests blot out the exit code by
appending "|| true", since these failures will go away shortly anyway.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 22 Dec 2017 14:53:54 -0500] rev 35502
test-lfs: add tests covering local exchanges
The root issue here is that requirements are not exchanged and preserved on
push/pull. This can be handled with a changegroup hook. Testing for remote
exchanges is much more extensive (it's possible for one process or the other to
not have the extension loaded at all), so it is added separately.
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 27 Dec 2017 11:08:32 -0700] rev 35501
smartset: split generatorset classes to avoid cycle
I uncovered a cycle manifesting in a memory leak by running
`hgperfrevset '::tip'`. The cycle was due to generatorset.__init__
assigning a bound method to self.__contains__. Internet sleuthing
revealed that assigning a bound method to an instance attribute
always creates a cycle.
This commit creates two new variants of generatorset for the special
cases of ascending and descending generators. The special
implementations of __contains__ have been extracted to these classes
where they are defined as __contains__.
generatorset now implements __new__ and changes the spawned type to
one of the new classes if needed.
Differential Revision: https://phab.mercurial-scm.org/D1780
Phil Cohen <phillco@fb.com> [Wed, 27 Dec 2017 13:53:21 -0600] rev 35500
merge: raise before running mergedriver if using IMM
Merge driver scripts run in the working copy, so disable with IMM for now.
Differential Revision: https://phab.mercurial-scm.org/D1781
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 26 Dec 2017 22:56:07 +0530] rev 35499
scmutil: use a tuple of possible values instead of using startswith()
This patch also adds a review comment which is helpful as inline comment.
Differential Revision: https://phab.mercurial-scm.org/D1761
Yuya Nishihara <yuya@tcha.org> [Mon, 25 Dec 2017 22:56:59 +0900] rev 35498
show: use revlog function to compute length of the longest shortest node
As the core part of shortest() was extracted at
448725a2ef73, we no logner
need a templater.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 19 Dec 2017 11:20:35 +0530] rev 35497
commands: use the new API to access hidden changesets in various commands
In previous patches, we have added an internal API to unhide hidden changesets.
This patch makes the following command use that api in nowarn mode i.e. there
will be no warning while accessing hidden changesets.
cat, diff, export, files, heads, identify, log, manifest, parents, status
This patch also adds test demonstarting the behaviour.
.. feature:: Accessing hidden changesets
Set config option 'experimental.directaccess = True' to access hidden
changesets from read only commands.
Differential Revision: https://phab.mercurial-scm.org/D1735