- Aug 20, 2016
-
-
Yuya Nishihara authored
This will allow us to map repo["ff..."] to workingctx. _partialmatch() will be updated later. I tried "return wdirrev" in place of raising the exception, but earlier exception seemed better.
-
- Jun 03, 2017
-
-
Yuya Nishihara authored
It seemed silly to convert ctx.hex() back to binary to use node.hex/short(), or to use [:12] instead of node.short() because ctx.node() could be None. Eventually I want to change wctx.rev() and wctx.node() to return wdirrev and wdirid respectively, but that's quite big API breakage and can't be achieved without some compatibility wrappers.
-
Yuya Nishihara authored
This moves wctx to the last, but that shouldn't matter. Only the order of stored revisions is important.
-
Yuya Nishihara authored
This makes it slightly easier to sort basectx objects by key=scmutil.intrev. We're most likely to have ctx objects where changectx/workingctx abstraction is necessary, so this won't increase the abstraction overhead.
-
Yuya Nishihara authored
Since the default policy is selected depending on setup options, "make install" shouldn't overwrite in-source __modulepolicy__.py generated by "make local".
-
Augie Fackler authored
-
Siddharth Agarwal authored
This can happen if another process (even another hg process!) comes along and removes the file at that time. This partly resolves issue5584, but not completely -- a bogus dirstate update can still happen. However, the full fix is too involved for stable.
-
- Jun 01, 2017
-
-
Martin von Zweigbergk authored
Most of it does the same as its superclass, so it can simply be removed. It also seems to make more sense for it to use relative paths, as we do for everything except alwaysmatcher, although nevermatcher.uipath() will probably never get called anyway, so it won't matter.
-
- Jun 02, 2017
-
-
Yuya Nishihara authored
Annotate data should be in [(file, [line...])...] form, but there was no API to represent such data structure when I ported it to formatter. Now we have fm.nested() and the -T option is still experimental, so we can fix the data format.
-
Yuya Nishihara authored
So we can add a nested 'fm' of narrow scope.
-
- May 08, 2017
-
-
Matt Harbison authored
Previously, test-hghave.t was failing on Windows (and on Linux if $FORCE_SETUPTOOLS was set) with the following: --- c:/Users/Matt/Projects/hg/tests/test-hghave.t +++ c:/Users/Matt/Projects/hg/tests/test-hghave.t.err @@ -19,7 +19,11 @@ > foo > EOF $ run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t + warning: Testing with unexpected mercurial lib: c:\Users\Matt\Projects\hg\mercurial + (expected ...\hgtests.mu9rou\install\lib\python\mercurial) . + warning: Tested with unexpected mercurial lib: c:\Users\Matt\Projects\hg\mercurial + (expected ...\hgtests.mu9rou\install\lib\python\mercurial) Augie relayed concerns[1] about the first attempt at this, which also excluded 'install_egg_info'. All that needs to be excluded to avoid the egg and make the test work is to filter out 'bdist_egg'. (Actually, the body of this class could simply be 'pass', and 'bdist_egg' still isn't run. But that seems to magical.) Also note that prior to this (and still now), `make clean` doesn't delete the 'mercurial.egg-info' that is generated by `make install`. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097668.html # no-check-commit
-
- Jun 02, 2017
-
-
Martin von Zweigbergk authored
That's where memcpy() is declared.
-
- May 31, 2017
-
-
Pulkit Goyal authored
-
- Jun 02, 2017
-
-
Pulkit Goyal authored
-
- May 31, 2017
-
-
Pulkit Goyal authored
Before this method, calling bytes on workingctx or memctx calls basectx.__bytes__ since the magic method was not defined for this class. When it calls the method from basectx class, it returns TypeError because None is passed into it. After this commit `hg update -C` works on Python 3 if eol is not enabled.
-
- Jun 02, 2017
-
-
Pulkit Goyal authored
Here encoding.strtolocal() is used because exc maybe an IOError which could contain a valid non-ascii unicode.
-
- May 31, 2017
-
-
Pulkit Goyal authored
We can't pass unicodes to ui.debug() and hence we need to convert things to bytes before passing them.
-
Pulkit Goyal authored
dict.items() returned a list on Python 2 and whereas on Python 3 it returns a view object. So we required a work around. Using dict.update() is better then constructing lists as it should save us on gc churns.
-
- Feb 03, 2017
-
-
David Demelier authored
Add the -B/--bookmark option to select a bookmark whose changesets and its ancestors will be selected unless a new bookmark/head is found. This is inspired by hg strip -B option.
-
- May 27, 2017
-
-
Pierre-Yves David authored
We check case where the raced push update that a head through another named branch while the racing push update that same head.
-
Pierre-Yves David authored
We check case where the raced push an update to branch default head while the racing push update that same head but through another named branch.
-
Pierre-Yves David authored
We check case where the raced push update all heads while the racing push update one of them.
-
Pierre-Yves David authored
We check case where the raced push updates a head while the racing push update all of them.
-
Pierre-Yves David authored
This is the mirror case from the previos one. We check case where the raced push update a head while the racing push create a new named branch as a children of that updated head.
-
Pierre-Yves David authored
We check case where the raced push create a new branch on the same head updated by the racing push.
-
Pierre-Yves David authored
We check case where the raced client push updates an existing head while the racing client push creates a new one.
-
Pierre-Yves David authored
We check case where the raced push replace one head while the racing push replaces another unrelated one. That second test also make sure we synchronise all repositories to the same state between tests. That will help us when allowing some sort of concurrent pushes.
-
Pierre-Yves David authored
There are very few tests around the detection of push race. This file will be dedicated to covering these cases more through fully. We start with a simple case. More complex cases get added in later changesets. My end goal here is to provide a way for server to accept concurrent push as long as they are not touching the same heads. However, I want to buff the test coverage of that code before touching anything.
-
- May 20, 2017
-
-
Pierre-Yves David authored
This is it, `hg strip --rev X` will now also remove obsolescence markers exclusive to X. Since a previous changeset, the obsmarkers has been backed up in the strip backup bundle, so it is possible to restore them. Note: stripping obsmarkers means the precursors of the stripped changeset might no longer be obsolete after the strip. Stripping changeset without obsmarkers can be useful when building test case. So It is possible to disable the stripping of obsmarkers using the 'devel.strip-obsmarkers' config option. Test change have been carefully validated.
-
- Jun 01, 2017
-
-
Pierre-Yves David authored
When stripping, we need to put all non-stripped revisions "above" the stripped ones in a "temporary-bundle" while we strip the targets revision. Then we reapply that bundle to restore these non-stripped revisions (with a new revision numbers). We skip the inclusion of obsolescence markers in that bundle. This is safe since all obsmarkers we plan to strip will be backed-up in the strip backup bundle. Including the markers would create issue in some case were we try to strip a prune markers that is "relevant" to a revision in the "temporary-bundle". (note: we do not strip obsmarkers yet)
-
Pierre-Yves David authored
We now display data about the "exclusive markers" in the test dedicated to relevant and exclusive markers computation and usage. Each output have been carefully validated
-
- May 20, 2017
-
-
Pierre-Yves David authored
This set will be used to select the obsmarkers to be stripped alongside the stripped changesets. See the function docstring for details. More advanced testing is introduced in the next changesets to keep this one simpler. That extra testing provides more example.
-
- Jun 01, 2017
-
-
Pierre-Yves David authored
We also want to check the result of the various computations when both changesets are selected (the pruned changesets and its parents).
-
- May 26, 2017
-
-
Pierre-Yves David authored
When applicable, we strip the revision tested in the test and we check that the backup bundle contains the appropriate markers.
-
- May 20, 2017
-
-
Pierre-Yves David authored
We are about to give 'strip' the ability to remove obsmarkers. Before we start removing data we must make sure it is preserved somewhere. So the backup bundle created by 'strip' now contains obsmarkers.
-
- May 31, 2017
-
-
Augie Fackler authored
That has (and still does) caused the test to be skipped, but without this fix it was possible to exit this block of code without clearing the output channel, which poisoned the channel list for later test method runs. Fix this by always clearing the channel in a finally. The test for this is somewhat unfortunate. Sadly, I couldn't get a way to reproduce this with less than 2n+1 test cases, nor could I get it to reproduce reliably without the sleep statements. It's also crucial that the test with the broken #if be smaller (in terms of byte count) than the sleeping tests, so that it runs first and would poison the channel list prior to another test needing that entry from the list.
-
Augie Fackler authored
I hit a weird corner case in run-tests where a test that caused an exception to be raised was breaking everything with an unbound variable error a few lines down because channel was never getting set in this for loop. By adding an `else` clause to this for loop, we can explode right away if we can't find a channel and give the developer a better chance at figuring out what's going on.
-
- May 28, 2017
-
-
durin42 authored
We were previously depending on str() doing something reasonable here, and we can't depend on the objects in question supporting __bytes__, so we work around the lack of direct bytes formatting.
-
durin42 authored
We were relying on %s using repr on (for example) integer values. Work around that for Python 3 while preserving all the prior magic.
-
- Jun 01, 2017
-
-
Yuya Nishihara authored
-