- Nov 18, 2015
-
-
Laurent Charignon authored
Before this patch, making a commit on a local repo could move a bookmark and both operations would not be grouped as one transaction. This patch makes both operations part of one transaction. This is necessary to switch to the new api to save bookmarks repo._bookmarks.recordchange if we don't want to change the current behavior of rollback. Dirstate change happening after the commit is done is now part of the transaction mentioned above. This leads to a change in the expected output of several tests. The change to test-fncache happens because both lock are now released in the same finally clause. The lock release is made explicitly buggy in this test. Previously releasing lock would crash triggering release of wlock that crashes too. Now lock release crash does not directly result in the release of wlock. Instead wlock is released at garbage collection time and the error raised at that time "confuses" python.
-
- Nov 17, 2015
-
-
Siddharth Agarwal authored
See previous patches for why we're doing this.
-
Siddharth Agarwal authored
See previous patches for why we're doing this.
-
Siddharth Agarwal authored
See previous patches for why we're doing this.
-
Siddharth Agarwal authored
See previous patch for why we're doing this. We do this with a bit of care -- it would be bad form for 'hg summary' to abort completely if we encounter an unsupported merge record. Instead just warn about that and continue with the rest of the summary.
-
Siddharth Agarwal authored
See previous patches for why we're doing this.
-
Siddharth Agarwal authored
See previous patches for why we're doing this.
-
Siddharth Agarwal authored
At the moment it's the same as just creating a new mergestate, but we'll soon move the _read call out of __init__ and in here.
-
- Nov 18, 2015
-
-
Siddharth Agarwal authored
See the previous patches for why we're doing this.
-
Siddharth Agarwal authored
See the previous patches for why we're doing this.
-
Siddharth Agarwal authored
See the previous patches for why we're doing this.
-
Siddharth Agarwal authored
Eventually, we'll move the read call out of the constructor. This will: - avoid unnecessary reads when we're going to nuke the merge state anyway - avoid raising an exception if there's an unsupported merge record 'clean' seems like a good name for it because I wanted to avoid anything with the word 'new' in it, and 'reset' is more an action performed on a merge state than a way to get a new merge state. Thanks to Martin von Zweigbergk for feedback about naming this.
-
- Nov 17, 2015
-
-
Siddharth Agarwal authored
We're going to catch this exception in 'hg summary' to print a better error message. This code is pretty untested, so there are no changes to test output. In upcoming patches we're going to test the output more thoroughly.
-
Siddharth Agarwal authored
We're going to use this in summary to print a better error message.
-
Bryan O'Sullivan authored
Superseded by the parent of this commit.
-
Bryan O'Sullivan authored
This is a simpler and faster fix for issue4878 than the contortions performed in 502b56a9e897.
-
Bryan O'Sullivan authored
Found using the power of the mighty eyeball.
-
- Nov 12, 2015
-
-
liscju authored
Checking if working copy is dirty was done in few places, this patch extracts it in _isdirtywc procedure.
-
- Nov 16, 2015
-
-
Siddharth Agarwal authored
We're going to need this for upcoming changes, because the merge state stores nodes as hex strings.
-
Siddharth Agarwal authored
Most code is going to barf at the return values here (particularly from data and size), so we restrict it to the filemerge code. This is already somewhat supported via: ctx.filectx(f, fileid=nullid) Indeed, for add/add conflicts (ancestor doesn't have the file) we use precisely that. However, that is broken in subtle ways: - The cmp() function in filectx returns False (identical) for such a filectx when compared to a zero-length file. - size() returns 0 rather than some sort of value indicating that the file isn't present. - data() returns '' rather than some sort of value indicating that the file isn't present. Given the relatively niche use of such filectxes, this seems to be the simplest way to fix all these issues.
-
Siddharth Agarwal authored
This will indicate whether this filectx represents a file that is *not* in a changectx. This will be used by merge and filemerge code to know about when a conflict is a change/delete conflict. While this is kind of hacky, it is the least bad of all the alternatives. Other options considered but rejected include: - isinstance(fctx, ...) -- not very Pythonic, doesn't support duck typing - fctx.size() is None -- the 'size()' call on workingfilectxes causes a disk stat - fctx.filenode() == nullid -- the semantics around filenode are incredibly confusing. In particular, for workingfilectxes, filenode() is always None no matter whether the file is present on disk or in either parent. Having different behavior for None versus nullid in the merge code is just asking for pain. Thanks to Pierre-Yves David for early review feedback here.
-
- Nov 14, 2015
-
-
Siddharth Agarwal authored
We're going to introduce other sorts of filectxes very soon, and we'd like the cmp method to function properly (i.e. commutatively) for them. The only way to make that happen is for this cmp method to call into that specialized one if that defines a custom comparator.
-
Siddharth Agarwal authored
We're going to add a separate record type for change/delete conflicts soon. We need to make sure they get stored with the correct record type so that older versions of Mercurial correctly abort when they see change/delete records.
-
- Nov 16, 2015
-
-
Siddharth Agarwal authored
Somewhat silly oversight -- this prevented the progress bar from being reset.
-
- Nov 17, 2015
-
-
Laurent Charignon authored
Before this patch, convert was using repo._bookmarks.write, a deprecated API for saving bookmarks. This patch changes the use of repo._bookmarks.write to repo._bookmarks.recordchange.
-
Laurent Charignon authored
We put the code to be indented in the next patch in a "if True:" block to make it easier to review.
-
- Nov 15, 2015
-
-
Shubhanshu Agrawal authored
Renaming local variables to be more precise, i want to store a different list of bookmarks and it would be hard to understand what marks represents in that change therefore renaming it to repomarks. Renamed bookmarks(module) to bookmarksmod as to free up bookmarks which will be used when pluralizing bookmark.
-
- Feb 12, 2015
-
-
Martin von Zweigbergk authored
It's unclear why everything from the first 'updating:' line should be ignored. The arbitrariness makes it confusing that changing the code so e.g. the 'getting 8/f' line is printed later makes it disappear completely from the ouput. The list of 'preserving x for resolve of y' seems convered by the subsequent for loop in the test case. Perhaps it's only copies that are of interests, so let's keep only that part.
-
- Nov 16, 2015
-
-
Matt Harbison authored
I do see this on Linux with 1.7.7.6, but not on Windows with 1.9.5.msysgit.0. Adding a (?) didn't work to conditionally ignore the line; I'm not sure if the (glob) interferes with that.
-
Matt Harbison authored
-
- Nov 15, 2015
-
-
liscju authored
Before this patch hg pull -u on UpdateAbort error returned 0 value to the system. This patch fixes this by reraising UpdateAbort with updated error msg.
-
- Nov 11, 2015
-
-
Martin von Zweigbergk authored
I could not find or see a reason for the unusual formatting. The lines following it in the test cases are not indented.
-
- Nov 09, 2015
-
-
Yuya Nishihara authored
This test was written by David R. MacIver <david@drmaciver.com> at the London sprint. We can enable it as the bug in utf8b encoder/decoder has been fixed.
-
- Nov 01, 2015
-
-
Yuya Nishihara authored
I got the following error by rewriting hgweb/webcommands.py to use absolute_import. It is false-positive because the import line appears in "help" function: hgweb/webcommands.py:1297: higher-level import should come first: mercurial This patch makes the import checker aware of the function scope and apply rules recursively.
-
- Oct 31, 2015
-
-
Yuya Nishihara authored
I got the following error by rewriting hgweb/__init__.py to use absolute_import, which is obviously wrong: Import cycle: mercurial.hgweb.__init__ -> mercurial.hgweb.__init__ "from foo import bar" should not make a cycle if "foo" is a package and if "bar" is a module or a package. On the other hand, it should be detected as a cycle if "bar" is a non-module name. Both cases are doc-tested already, so this patch does not add new doctest.
-
- Nov 02, 2015
-
-
Matt Mackall authored
This adds a round-trip helper and a few tests of streams that could cause synchronization problems in the encoder.
-
- Nov 14, 2015
-
-
Siddharth Agarwal authored
We're going to treat these conflicts similarly to merge conflicts, and this change to the way we store things in memory makes future code a lot simpler.
-
- Nov 13, 2015
-
-
Siddharth Agarwal authored
(1) These aren't currently read from anywhere, so emptying this out is pointless. (2) These *will* be read from later in upcoming patches, and not emptying them out will be important then.
-
- Nov 06, 2015
-
-
Anton Shestakov authored
Before: '(0)-60tip', after: '(0) -60 tip'.
-
- Nov 12, 2015
-
-
Martin von Zweigbergk authored
I actually wanted to reduce the amount of code around the call to applyupdates(), so I tried moving these warnings a little earlier, and I think it makes the output make a little more sense (see changes to test cases).
-