Mon, 29 May 2017 05:20:09 +0200 checkheads: clarify that we no longer touch the head unknown locally
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:20:09 +0200] rev 32673
checkheads: clarify that we no longer touch the head unknown locally Since c6cb21ddf74a, heads unknown locally no longer get any post processing from obsolescence markers. We clarify this fact by only feeding the list of locally known new heads to the function. This simplification of the input will help moving that post-processing earlier in the function.
Mon, 29 May 2017 05:33:59 +0200 headssummary: ensure all returned lists are sorted
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:33:59 +0200] rev 32672
headssummary: ensure all returned lists are sorted This is a simple step that will help to keep a stable output in coming refactoring.
Mon, 29 May 2017 05:37:19 +0200 discovery: also use lists for the returns of '_oldheadssummary'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:37:19 +0200] rev 32671
discovery: also use lists for the returns of '_oldheadssummary' The '_headssummary' function is documenting and using list objects in its return. We now use them in _oldheadssummary too for consistency. This does not affect any usages of these values.
Mon, 29 May 2017 05:53:51 +0200 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:53:51 +0200] rev 32670
test: add a push race case where the updated head is obsoleted This is the mirror of the previously added case. We check the case where the racing-push obsoletes a head while the raced-push updates that same head.
Mon, 29 May 2017 05:53:24 +0200 test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:53:24 +0200] rev 32669
test: add a push race case where obsoleted head is updated We check the case where the raced-push obsoletes a head while the racing-push updates that same head.
Fri, 02 Jun 2017 14:08:26 -0700 keepalive: set buffering=True to do more efficient reads of headers
Kyle Lippincott <spectral@google.com> [Fri, 02 Jun 2017 14:08:26 -0700] rev 32668
keepalive: set buffering=True to do more efficient reads of headers Support for buffering was added to python in d09d6fe31b61, first released with python2.7. Without this, the entirety of the response headers is read byte-by-byte (it does more efficient reads when it gets to the non-header part of the response).
Thu, 01 Jun 2017 18:23:20 -0700 keepalive: pass the correct arguments to HTTPResponse
Kyle Lippincott <spectral@google.com> [Thu, 01 Jun 2017 18:23:20 -0700] rev 32667
keepalive: pass the correct arguments to HTTPResponse python2.7's httplib.HTTPResponse takes the arguments in the following order: sock, debuglevel, strict, method, buffering This was previously passing them in as positional and skipped strict, so we set strict=method. I'm explicitly setting strict=True now to preserve the previous behavior that has been there since this file was created.
Mon, 22 May 2017 22:32:59 -0400 help: update the color documentation for Windows 10 ANSI support
Matt Harbison <matt_harbison@yahoo.com> [Mon, 22 May 2017 22:32:59 -0400] rev 32666
help: update the color documentation for Windows 10 ANSI support It looks like only the initial release of Windows 10 lacked support for this functionality. [1][2] Since that build is no longer supported, I didn't bother getting very specific, to keep the help text less cluttered. [1] https://github.com/symfony/symfony/issues/17499#issuecomment-243481052 [2] https://en.wikipedia.org/wiki/Windows_10_version_history
Mon, 22 May 2017 22:20:38 -0400 color: enable ANSI support on Windows 10
Matt Harbison <matt_harbison@yahoo.com> [Mon, 22 May 2017 22:20:38 -0400] rev 32665
color: enable ANSI support on Windows 10 This will display color if "color.mode=ansi", and default to 'ansi' if the mode is set to 'auto'. The 'debugcolor' command also reflects this policy. Previously, "color.mode=ansi" on Windows printed jibberish around the normal text. Using ANSI color is better, as it avoids the normal loss of color when the default pager is enabled on Windows. See also issue5570. When the underlying function fails (e.g. when run on older Windows), 'auto' still falls back to 'win32'. Apparently, Microsoft originally had this feature turned on by default, and then made it opt-in[1]. Therefore, not enabling it unconditionally seems safer. Instead, only do it after processing the existing check for support in a Unix-like environment. [1] https://github.com/symfony/symfony/issues/17499#issuecomment-243481052
Mon, 22 May 2017 22:00:56 -0400 win32: add a method to enable ANSI color code processing on Windows 10
Matt Harbison <matt_harbison@yahoo.com> [Mon, 22 May 2017 22:00:56 -0400] rev 32664
win32: add a method to enable ANSI color code processing on Windows 10 SetConsoleMode() fails with an invalid parameter error if given this option prior to Windows 10, so indicate that to the caller instead of doing explicit version checks.
Sun, 04 Jun 2017 08:57:37 -0500 merge with stable
Kevin Bullock <kbullock+mercurial@ringworld.org> [Sun, 04 Jun 2017 08:57:37 -0500] rev 32663
merge with stable
Sat, 03 Jun 2017 19:17:19 +0900 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 19:17:19 +0900] rev 32662
export: map wctx.node() to 'ff...' node id (issue5438)
Sat, 03 Jun 2017 20:39:33 +0900 revset: add support for integer and hex wdir identifiers
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 20:39:33 +0900] rev 32661
revset: add support for integer and hex wdir identifiers As I said before, partial 'ff...' hash isn't supported yet.
Fri, 19 Aug 2016 18:40:35 +0900 localrepo: map integer and hex wdir identifiers to workingctx
Yuya Nishihara <yuya@tcha.org> [Fri, 19 Aug 2016 18:40:35 +0900] rev 32660
localrepo: map integer and hex wdir identifiers to workingctx changectx.__init__() is slightly modified to take str(wdirrev) as a valid integer revision (and raise WdirUnsupported exception.) Test will be added by the next patch.
Sat, 20 Aug 2016 22:37:58 +0900 revlog: map rev(wdirid) to WdirUnsupported exception
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Aug 2016 22:37:58 +0900] rev 32659
revlog: map rev(wdirid) to WdirUnsupported exception 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.
Sat, 03 Jun 2017 19:12:01 +0900 scmutil: introduce binnode(ctx) as paired function with intrev(ctx)
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 19:12:01 +0900] rev 32658
scmutil: introduce binnode(ctx) as paired function with intrev(ctx) 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.
Sat, 03 Jun 2017 19:01:19 +0900 merge: use scmutil.intrev() to sort ctx objects
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 19:01:19 +0900] rev 32657
merge: use scmutil.intrev() to sort ctx objects This moves wctx to the last, but that shouldn't matter. Only the order of stored revisions is important.
Sat, 03 Jun 2017 18:57:28 +0900 scmutil: pass ctx object to intrev()
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 18:57:28 +0900] rev 32656
scmutil: pass ctx object to intrev() 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.
Sat, 03 Jun 2017 14:05:52 +0900 setup: do not overwrite local __modulepolicy__.py on out-of-source build
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 14:05:52 +0900] rev 32655
setup: do not overwrite local __modulepolicy__.py on out-of-source build Since the default policy is selected depending on setup options, "make install" shouldn't overwrite in-source __modulepolicy__.py generated by "make local".
Sun, 04 Jun 2017 08:16:37 -0500 Added signature for changeset c850f0ed54c1 stable
Kevin Bullock <kbullock@ringworld.org> [Sun, 04 Jun 2017 08:16:37 -0500] rev 32654
Added signature for changeset c850f0ed54c1
Sun, 04 Jun 2017 08:16:29 -0500 Added tag 4.2.1 for changeset c850f0ed54c1 stable
Kevin Bullock <kbullock@ringworld.org> [Sun, 04 Jun 2017 08:16:29 -0500] rev 32653
Added tag 4.2.1 for changeset c850f0ed54c1
Sat, 03 Jun 2017 16:33:28 -0400 merge with stable
Augie Fackler <augie@google.com> [Sat, 03 Jun 2017 16:33:28 -0400] rev 32652
merge with stable
Fri, 02 Jun 2017 22:27:52 -0700 status: don't crash if a lookup file disappears stable 4.2.1
Siddharth Agarwal <sid0@fb.com> [Fri, 02 Jun 2017 22:27:52 -0700] rev 32651
status: don't crash if a lookup file disappears 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.
Thu, 01 Jun 2017 08:31:21 -0700 match: simplify nevermatcher
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Jun 2017 08:31:21 -0700] rev 32650
match: simplify nevermatcher 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.
Sat, 03 Jun 2017 00:25:24 +0900 annotate: restructure formatter output to be nested list (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 00:25:24 +0900] rev 32649
annotate: restructure formatter output to be nested list (BC) 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.
Sat, 03 Jun 2017 00:05:12 +0900 annotate: rename formatter variable
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Jun 2017 00:05:12 +0900] rev 32648
annotate: rename formatter variable So we can add a nested 'fm' of narrow scope.
Sun, 07 May 2017 23:29:03 -0400 setup: prevent setuptools from laying an egg
Matt Harbison <matt_harbison@yahoo.com> [Sun, 07 May 2017 23:29:03 -0400] rev 32647
setup: prevent setuptools from laying an egg 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
Fri, 02 Jun 2017 10:32:39 -0700 bitmanipulation: add missing include of string.h
Martin von Zweigbergk <martinvonz@google.com> [Fri, 02 Jun 2017 10:32:39 -0700] rev 32646
bitmanipulation: add missing include of string.h That's where memcpy() is declared.
Thu, 01 Jun 2017 02:41:19 +0530 py3: add test to show `hg update` and `hg identify` works on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 02:41:19 +0530] rev 32645
py3: add test to show `hg update` and `hg identify` works on Python 3
Fri, 02 Jun 2017 10:14:00 +0530 py3: add a test to show `hg diff` works on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Jun 2017 10:14:00 +0530] rev 32644
py3: add a test to show `hg diff` works on Python 3
Thu, 01 Jun 2017 02:25:18 +0530 py3: implement __bytes__ for committablectx
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 02:25:18 +0530] rev 32643
py3: implement __bytes__ for committablectx 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.
Fri, 02 Jun 2017 10:35:21 +0530 py3: convert exception to bytes to pass into ui.warn()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Jun 2017 10:35:21 +0530] rev 32642
py3: convert exception to bytes to pass into ui.warn() Here encoding.strtolocal() is used because exc maybe an IOError which could contain a valid non-ascii unicode.
Thu, 01 Jun 2017 02:14:26 +0530 py3: convert bool variables to bytes before passing into ui.debug()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 02:14:26 +0530] rev 32641
py3: convert bool variables to bytes before passing into ui.debug() We can't pass unicodes to ui.debug() and hence we need to convert things to bytes before passing them.
Thu, 01 Jun 2017 01:14:02 +0530 py3: use dict.update() instead of constructing lists and adding them
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 01:14:02 +0530] rev 32640
py3: use dict.update() instead of constructing lists and adding them 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.
Fri, 03 Feb 2017 15:02:27 +0100 patchbomb: add -B option to select a bookmark
David Demelier <demelier.david@gmail.com> [Fri, 03 Feb 2017 15:02:27 +0100] rev 32639
patchbomb: add -B option to select a bookmark 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.
Sat, 27 May 2017 22:27:56 +0200 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:56 +0200] rev 32638
test: add the mirror push race case for non-contiguous branch head We check case where the raced push update that a head through another named branch while the racing push update that same head.
Sat, 27 May 2017 22:27:41 +0200 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:41 +0200] rev 32637
test: add a push race case where non-contiguous branch head are created 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.
Sat, 27 May 2017 22:27:09 +0200 test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:27:09 +0200] rev 32636
test: add a push race case where the raced push touch multiple heads We check case where the raced push update all heads while the racing push update one of them.
Sat, 27 May 2017 22:26:51 +0200 test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:51 +0200] rev 32635
test: add a push race case where racing push touches multiple heads We check case where the raced push updates a head while the racing push update all of them.
Sat, 27 May 2017 22:26:35 +0200 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:35 +0200] rev 32634
test: add a push race case where racing push create a new named branch 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.
Sat, 27 May 2017 22:26:16 +0200 test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:26:16 +0200] rev 32633
test: add a push race case where raced push created a new named branch We check case where the raced push create a new branch on the same head updated by the racing push.
Sat, 27 May 2017 22:25:40 +0200 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:25:40 +0200] rev 32632
test: add a push race case where the racing client create a new head We check case where the raced client push updates an existing head while the racing client push creates a new one.
Sat, 27 May 2017 22:25:20 +0200 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:25:20 +0200] rev 32631
test: add a push race case where each client replaces a different head 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.
Sat, 27 May 2017 22:24:58 +0200 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 May 2017 22:24:58 +0200] rev 32630
test: add a file dedicated to push race between clients 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.
Sat, 20 May 2017 16:19:59 +0200 strip: strip obsmarkers exclusive to the stripped changeset
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 16:19:59 +0200] rev 32629
strip: strip obsmarkers exclusive to the stripped changeset 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.
Thu, 01 Jun 2017 12:08:49 +0200 strip: do not include obsolescence markers for the temporary bundle
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 12:08:49 +0200] rev 32628
strip: do not include obsolescence markers for the temporary bundle 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)
Thu, 01 Jun 2017 08:44:01 +0200 exclusive-markers: update the dedicated test with list of exclusive markers
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 08:44:01 +0200] rev 32627
exclusive-markers: update the dedicated test with list of exclusive markers 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
Sat, 20 May 2017 15:02:30 +0200 obsolete: add a function to compute "exclusive-markers" for a set of nodes
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 15:02:30 +0200] rev 32626
obsolete: add a function to compute "exclusive-markers" for a set of nodes 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.
Thu, 01 Jun 2017 08:32:24 +0200 test-obsolete-bundle-strip: check all changesets in the isolated prune case
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Jun 2017 08:32:24 +0200] rev 32625
test-obsolete-bundle-strip: check all changesets in the isolated prune case We also want to check the result of the various computations when both changesets are selected (the pruned changesets and its parents).
Fri, 26 May 2017 03:52:11 +0200 test-obsolete-bundle-strip: add testing of markers backup during strip
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:52:11 +0200] rev 32624
test-obsolete-bundle-strip: add testing of markers backup during strip When applicable, we strip the revision tested in the test and we check that the backup bundle contains the appropriate markers.
Sat, 20 May 2017 15:06:10 +0200 strip: also backup obsmarkers
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 15:06:10 +0200] rev 32623
strip: also backup obsmarkers 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.
Tue, 30 May 2017 20:48:43 -0400 tests: fix run-tests when there's a bad #if in a test
Augie Fackler <augie@google.com> [Tue, 30 May 2017 20:48:43 -0400] rev 32622
tests: fix run-tests when there's a bad #if in a test 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.
Tue, 30 May 2017 20:47:00 -0400 tests: make run-tests fail early if no channel is found
Augie Fackler <augie@google.com> [Tue, 30 May 2017 20:47:00 -0400] rev 32621
tests: make run-tests fail early if no channel is found 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.
Sun, 28 May 2017 15:47:00 -0400 dispatch: convert exception payload to bytes more carefully
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:47:00 -0400] rev 32620
dispatch: convert exception payload to bytes more carefully 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.
Sun, 28 May 2017 15:49:29 -0400 help: convert flag default to bytes portably
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:49:29 -0400] rev 32619
help: convert flag default to bytes portably We were relying on %s using repr on (for example) integer values. Work around that for Python 3 while preserving all the prior magic.
Thu, 01 Jun 2017 23:08:23 +0900 cmdutil: use isstdiofilename() where appropriate
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:08:23 +0900] rev 32618
cmdutil: use isstdiofilename() where appropriate
Thu, 01 Jun 2017 23:05:29 +0900 py3: simply use b'%d\n' to format pid in server.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:05:29 +0900] rev 32617
py3: simply use b'%d\n' to format pid in server.py Spotted by Martin, thanks.
Thu, 01 Jun 2017 22:43:24 +0900 py3: implement __bytes__() on most of our exception classes
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:43:24 +0900] rev 32616
py3: implement __bytes__() on most of our exception classes We store bytes in exc.args, which should be translated to a byte string without encode/decode dance. IOError subclasses are unchanged for now. We'll need to decide how our IOErrors should be caught.
Thu, 01 Jun 2017 22:24:15 +0900 py3: convert __doc__ back to bytes in help.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:24:15 +0900] rev 32615
py3: convert __doc__ back to bytes in help.py pycompat.getdoc() is pretty simple, but we wouldn't want to write handling of None inline.
Thu, 01 Jun 2017 01:41:34 +0530 py3: ensure that we don't concat bytes and str and the end result is bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 01:41:34 +0530] rev 32614
py3: ensure that we don't concat bytes and str and the end result is bytes Here obj.__module__ and obj.__name__ are str. Either we can convert them to bytes or use an r'' and convert back to bytes when concat is done. I preferred the later one since we are encoding only once here.
Thu, 01 Jun 2017 00:00:10 +0530 py3: make sure we return strings from __str__ and __repr__
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 00:00:10 +0530] rev 32613
py3: make sure we return strings from __str__ and __repr__ On Python 3: >>> class abc: ... def __repr__(self): ... return b'abc' ... >>> abc() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __repr__ returned non-string (type bytes) >>> class abc: ... def __str__(self): ... return b'abc' ... >>> str(abc()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __str__ returned non-string (type bytes) So the __str__ and __repr__ must return strings.
Wed, 31 May 2017 23:48:52 +0530 py3: replace None with -1 to sort an integer array
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 31 May 2017 23:48:52 +0530] rev 32612
py3: replace None with -1 to sort an integer array In Python 2: >>> ls = [4, 2, None] >>> sorted(ls) [None, 2, 4] In Python 3: >>> ls = [4, 2, None] >>> sorted(ls) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: NoneType() < int() Therefore we replaced None with -1, and the safe part is that, None and -1 are only the keys which are used for sorting so we don't need to convert the -1's back to None.
Wed, 31 May 2017 23:42:58 +0530 py3: pass str in os.sysconf()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 31 May 2017 23:42:58 +0530] rev 32611
py3: pass str in os.sysconf() os.sysconf() doesn't accepts bytes on Python 3. Adding r'' will make sure b'' is not added here.
Thu, 11 May 2017 13:59:48 -0700 context: move dirty() to committablectx
Sean Farley <sean@farley.io> [Thu, 11 May 2017 13:59:48 -0700] rev 32610
context: move dirty() to committablectx This is a pedantic move. It should be an error if dirty() is called on a read-only context. Based on Mads Kiilerix's and my work at the sprint.
Thu, 11 May 2017 13:51:10 -0700 committablectx: extra is already normalized by committablectx.__init__
Sean Farley <sean@farley.io> [Thu, 11 May 2017 13:51:10 -0700] rev 32609
committablectx: extra is already normalized by committablectx.__init__ Avoid doing the same work again. Based on work done by Mads Kiilerix.
Fri, 02 Jun 2017 10:44:40 +0200 help: clarify the choice of pager stable
Xavier Lepaul <xalep@google.com> [Fri, 02 Jun 2017 10:44:40 +0200] rev 32608
help: clarify the choice of pager This follows the change made in d83e51654c8a to use environment variables between system and user configuration.
Fri, 02 Jun 2017 20:50:46 -0300 i18n-pt_BR: fix syntax error on translation stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 02 Jun 2017 20:50:46 -0300] rev 32607
i18n-pt_BR: fix syntax error on translation
Thu, 01 Jun 2017 20:06:02 -0300 i18n-pt_BR: synchronized with 870248603a4e stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Thu, 01 Jun 2017 20:06:02 -0300] rev 32606
i18n-pt_BR: synchronized with 870248603a4e
Thu, 01 Jun 2017 00:40:52 -0700 match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com> [Thu, 01 Jun 2017 00:40:52 -0700] rev 32605
match: introduce nevermatcher for when no ignore files are present 952017471f93 introduced a deterministic `__repr__` for ignores. However, it didn't account for when ignore was `util.never`. This broke fsmonitor's ignore change detection -- with an empty hgignore, it would kick in all the time. Introduce `nevermatcher` and switch to it. This neatly parallels `alwaysmatcher`.
Wed, 31 May 2017 11:41:54 -0700 check-code: suggest policy.importmod
Jun Wu <quark@fb.com> [Wed, 31 May 2017 11:41:54 -0700] rev 32604
check-code: suggest policy.importmod This forbids patterns like `from mercurial.cext import parsers` which breaks pure.
Fri, 26 May 2017 03:41:10 +0200 test-obsolete-bundle-strip: test bundling in the seventh case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:41:10 +0200] rev 32603
test-obsolete-bundle-strip: test bundling in the seventh case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:23:56 +0200 test-obsolete-bundle-strip: test bundling in the sixth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:23:56 +0200] rev 32602
test-obsolete-bundle-strip: test bundling in the sixth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:20:40 +0200 test-obsolete-bundle-strip: test bundling in the fifth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:40 +0200] rev 32601
test-obsolete-bundle-strip: test bundling in the fifth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:20:25 +0200 test-obsolete-bundle-strip: test bundling in the fourth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:25 +0200] rev 32600
test-obsolete-bundle-strip: test bundling in the fourth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:19:11 +0200 test-obsolete-bundle-strip: test bundling in the third case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:19:11 +0200] rev 32599
test-obsolete-bundle-strip: test bundling in the third case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:15:53 +0200 test-obsolete-bundle-strip: test bundling in the second case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:15:53 +0200] rev 32598
test-obsolete-bundle-strip: test bundling in the second case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:11:53 +0200 test-obsolete-bundle-strip: test bundling in the first case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:11:53 +0200] rev 32597
test-obsolete-bundle-strip: test bundling in the first case We adds a shell function checking that the relevant markers and the bundled markers matches. Updating all cases in the file at the same time is a bit overwhelming and harder to double checks. So each cases come in its own patch.
Thu, 25 May 2017 16:50:23 +0200 obsolete: raise richer exception on unknown version
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 16:50:23 +0200] rev 32596
obsolete: raise richer exception on unknown version We raise a more precise subclass of Abort with details about the faulty version. This will be used to detect this case and display some information in debugbundle.
Wed, 31 May 2017 20:07:08 -0700 import-checker: add hgdemandimport to local modules
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 20:07:08 -0700] rev 32595
import-checker: add hgdemandimport to local modules This fixes test-check-module-imports.t.
Wed, 31 May 2017 19:46:04 -0700 rebase: drop unnecessary parentchange call
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 19:46:04 -0700] rev 32594
rebase: drop unnecessary parentchange call We're calling localrepo.setparents here, not dirstate.setparents. localrepo.setparents calls dirstate.parentchange already.
Tue, 30 May 2017 13:16:32 -0700 hidden: remove unnecessary guard condition
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 13:16:32 -0700] rev 32593
hidden: remove unnecessary guard condition The "if visible" guard is now pretty pointless, because the function call it guards will do almost no work anyway when there are no visible revisions. We can also stop wrapping "visible" in a set since it just needs to be an iterable now.
Tue, 30 May 2017 10:27:20 -0700 hidden: subtract pinned revs from hidden earlier
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 10:27:20 -0700] rev 32592
hidden: subtract pinned revs from hidden earlier The pinned revs are simply revisions that should not be hidden even if hideablerevs() says that should. Let's make that clear by simply setting "hidden = hideablerevs() - pinnedrevs()" early on.
Sat, 27 May 2017 23:05:10 -0700 hidden: make _revealancestors() reveal ancestors exclusively
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 23:05:10 -0700] rev 32591
hidden: make _revealancestors() reveal ancestors exclusively I think this seems more expected. It also prepares for the next commit.
Sat, 27 May 2017 22:55:19 -0700 hidden: remove _consistencyblockers()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:55:19 -0700] rev 32590
hidden: remove _consistencyblockers() Roughly speaking, we currently do this to reveal hidden ancestors of visible revisions: 1. Iterate over all visible non-public revisions and see if they have hidden parents 2. For each revision found in step (1) walk the chain of hidden commits and reveal it We can simplify that by skipping step (1) and doing step (2) from all visible non-public revisions instead. This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570) ! visible ! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326) After: ! obsolete ! wall 0.004727 comb 0.010000 user 0.010000 sys 0.000000 (best of 543) ! visible ! wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 324)
Sat, 27 May 2017 22:43:37 -0700 hidden: pass revs to iterate into _consistencyblockers()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:43:37 -0700] rev 32589
hidden: pass revs to iterate into _consistencyblockers() Instead of passing the domain into _consistencyblockers() and having the function calculate the set of revisions to iterate over, let the caller do it. This is just a minor refactoring to make future changes simpler.
Sat, 27 May 2017 22:10:20 -0700 hidden: remove unnecessary 'domain' parameter from _revealancestors()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:10:20 -0700] rev 32588
hidden: remove unnecessary 'domain' parameter from _revealancestors() The function will stop searching as soon as it runs into a non-hidden revision, so there is no need to restrict by the domain (of mutable revisions) as well. This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535) ! visible ! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300) After: ! obsolete ! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570) ! visible ! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326)
Sat, 27 May 2017 21:17:06 -0700 hidden: change _domainancestors() to _revealancestors()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:17:06 -0700] rev 32587
hidden: change _domainancestors() to _revealancestors() This change makes the function actually reveal the ancestors by removing them from the hidden set. This prepares for further simplification. Note that the function will now only reveal contiguous chains of hidden revisions, but that's fine because we always pass it an immediate child of any revision that should be revealed (or the revision itself). This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004672 comb 0.010000 user 0.010000 sys 0.000000 (best of 590) ! visible ! wall 0.008936 comb 0.010000 user 0.010000 sys 0.000000 (best of 322) After: ! obsolete ! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535) ! visible ! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300)
Sat, 27 May 2017 21:08:51 -0700 hidden: rename "revealedrevs" to "pinnedrevs" (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:08:51 -0700] rev 32586
hidden: rename "revealedrevs" to "pinnedrevs" (API) E.g. tags and bookmarks can reveal revisions that would otherwise be hidden. A revision can also be revealed because one if its descendants is visible. Let's use the term "pinned" for the former case (bookmarks etc.).
Sat, 27 May 2017 21:02:17 -0700 hidden: drop obsolete comment about cacheability
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:02:17 -0700] rev 32585
hidden: drop obsolete comment about cacheability The cache was recently dropped, so I believe the comment is now obsolete.
Thu, 25 May 2017 21:53:44 +0900 cat: add formatter support
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:53:44 +0900] rev 32584
cat: add formatter support This is an example showing how formatter can handle the --output option. git subrepo isn't supported for now.
Sat, 27 May 2017 17:58:36 +0900 cat: use with statement to close output file
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:58:36 +0900] rev 32583
cat: use with statement to close output file
Thu, 25 May 2017 21:43:09 +0900 cat: stop using makefileobj()
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:43:09 +0900] rev 32582
cat: stop using makefileobj() Prepares for porting to the formatter API. We won't be able to utilize the abstraction provided by makefilename() because formatter must be instantiated per file.
Sat, 27 May 2017 17:44:26 +0900 formatter: add nullformatter
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:44:26 +0900] rev 32581
formatter: add nullformatter This can be used as a placeholder variable.
Sat, 27 May 2017 17:40:18 +0900 formatter: add helper to create a formatter optionally backed by file
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:40:18 +0900] rev 32580
formatter: add helper to create a formatter optionally backed by file To make things simple, openformatter() and maybereopen() have no support for a plain object API. Callers must use the "with" statement. Unlike cmdutil.makefileobj(), append mode ('ab') isn't supported by these functions. This is because JSON output can't be simply concatenated. Perhaps cmdutil.export() will have to build a {filename: [revs...]} map first and write revs per file.
Sun, 18 Jan 2015 18:04:44 +0900 formatter: add option to redirect output to file object
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:04:44 +0900] rev 32579
formatter: add option to redirect output to file object Commands like 'export' have --output=OUTFILESPEC option, so we need a way to write formatter output optionally to a file.
Thu, 01 Jun 2017 12:24:16 -0500 merge with i18n stable
Kevin Bullock <kbullock+mercurial@ringworld.org> [Thu, 01 Jun 2017 12:24:16 -0500] rev 32578
merge with i18n
Wed, 31 May 2017 20:42:58 -0300 i18n-pt_BR: synchronized with a0e46f6b248b stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 20:42:58 -0300] rev 32577
i18n-pt_BR: synchronized with a0e46f6b248b
Fri, 26 May 2017 13:24:07 -0700 zsh_completion: install as _hg not hg stable
Kyle Lippincott <spectral@google.com> [Fri, 26 May 2017 13:24:07 -0700] rev 32576
zsh_completion: install as _hg not hg The contrib/zsh_completion file itself says to name it _hg. With a name like `hg`, if the user has a line like `autoload ${^fpath}/*(N-.:t)` in their zshrc, it will create a shell function named `hg` that will hide the actual hg command and make hg unusable. Separately from that though, the underscore prefix makes it actually work. The zsh man page states: The convention for autoloaded functions used in completion is that they start with an underscore This does not seem to just be a "convention", though. With the ill-advised line removed from my zshrc and the file named `/usr/local/share/zsh/site-functions/hg` (without the underscore), these completions did not seem to get loaded and the ones from the zsh installation were loaded instead. If I renamed them to be `/usr/local/share/zsh/site-functions/_hg`, however, they were loaded. I manually tested the above statement by starting a new zsh instance with the file in `/usr/local/share/zsh/site-functions` with the following names: - As `hg`, `which _hg_labels` did not show anything - As `_hg`, `which _hg_labels` showed the expected function.
Fri, 26 May 2017 20:03:05 -0400 osx: override default exclude filter for pkgbuild stable
Augie Fackler <augie@google.com> [Fri, 26 May 2017 20:03:05 -0400] rev 32575
osx: override default exclude filter for pkgbuild To quote `man 1 pkgbuild`: --filter filter-expression By default, --root will include the entire contents of the given root-path in the package payload, except for any .svn or CVS directories, and any .DS_Store files. You can override these default filters by specifying one or more --filter options. Each filter-expression is an re_format(7) ``extended'' expression: any path in the root which matches any of the given expressions will be excluded from the pack- age payload. (Note that specifying even one --filter inhibits the default filters, so you must respecify the default fil- ters if you still want them to be used.) It turns out the default filter these days *also* includes .git and .hg. Notice how that filter expression is a regular expression? That (presumably unintentionally) prevents a file named "chg" or "_hg" from getting included in the distribution. Many many thanks to spectral@ for trying to include a _hg file which led us to figure this bug out. Bug filed with Apple for this as rdar://problem/32437369, mentioning both the gap in documentation and the wrong defaults.
Wed, 31 May 2017 19:24:00 -0300 bugzilla: fix typo in help text stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 19:24:00 -0300] rev 32574
bugzilla: fix typo in help text
Wed, 31 May 2017 19:23:23 -0300 help: fix typos stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 19:23:23 -0300] rev 32573
help: fix typos
Wed, 31 May 2017 23:44:33 +0900 win32mbcs: avoid unintentional failure at colorization stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 31 May 2017 23:44:33 +0900] rev 32572
win32mbcs: avoid unintentional failure at colorization Since 176ed32dc159, pycompat.bytestr() wrapped by win32mbcs returns unicode object, if an argument is not byte-str object. And this causes unexpected failure at colorization. pycompat.bytestr() is used to convert from color effect "int" value to byte-str object in color module. Wrapped pycompat.bytestr() returns unicode object for such "int" value, because it isn't byte-str. If this returned unicode object is used to colorize non-ASCII byte-str in cases below, UnicodeDecodeError is raised at an operation between them. - colorization uses "ansi" color mode, or Even though this isn't default on Windows, user might use this color mode for third party pager. - ui.write() is buffered with labeled=True Buffering causes "ansi" color mode internally, regardless of actual color mode. With "win32" color mode, extra escape sequences are omitted at writing data out. For example, with "win32" color mode, "hg status" doesn't fail for non-ASCII filenames, but "hg log" does for non-ASCII text, because the latter implies buffered formatter. There are many "color effect" value lines in color.py, and making them byte-str objects isn't suitable for fixing on stable. In addition to it, pycompat.bytestr will be used to get byte-str object from any types other than int, too. To resolve this issue, this patch does: - replace pycompat.bytestr in checkwinfilename() with newly added hook point util._filenamebytestr, and - make win32mbcs reverse-wrap util._filenamebytestr (this is a replacement of 176ed32dc159) This patch does two things above at same time, because separately applying the former change adds broken revision (from point of view of win32mbcs) to stable branch. "_" prefix is added to "filenamebytestr", because it is win32mbcs specific hook point.
Wed, 31 May 2017 10:35:10 -0700 tests: fix typo in "flagprocesor"
Martin von Zweigbergk <martinvonz@google.com> [Wed, 31 May 2017 10:35:10 -0700] rev 32571
tests: fix typo in "flagprocesor"
Tue, 30 May 2017 06:22:14 -0700 contrib: remove unnecessary debug output from editmergeps.ps1
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:22:14 -0700] rev 32570
contrib: remove unnecessary debug output from editmergeps.ps1
Tue, 30 May 2017 06:17:51 -0700 contrib: fix a bug preventing editmergeps.ps1 from running unknonw editors
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:17:51 -0700] rev 32569
contrib: fix a bug preventing editmergeps.ps1 from running unknonw editors '$ executable' is not a way to run executable in powershell, '& executable' is instead. Found this when testing with regular Windows notepad.
Tue, 30 May 2017 06:02:31 -0700 contrib: make editmergeps use -NoNewWindow option in Start-Process cmdlet
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:02:31 -0700] rev 32568
contrib: make editmergeps use -NoNewWindow option in Start-Process cmdlet Running 'Start-Process -Wait "vim" "+10" "filename"' from PowerShell actually spawns a separate cmd window to run vim in. This looks ugly and in most cases not what user wants. During my initial testing I was using the Cmder app, which made me not notice this (it captures new windows as new tabs).
Tue, 30 May 2017 05:56:48 -0700 contrib: run editmergeps.ps1 from the same location as editmergeps.bat
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 05:56:48 -0700] rev 32567
contrib: run editmergeps.ps1 from the same location as editmergeps.bat This change is needed for cases when user does not put editmergeps.bat directly into PATH, but rather uses 'merge-tools.editmergeps.executable' config option to provide a full path to editmergeps.bat. In such cases, editmergeps.ps1 cannot be run simply by name, it needs a full path. In BATCH file %~dp0 stands for the directory in which the original file is located.
Sun, 21 May 2017 16:57:32 +0900 help: pass commands module by argument
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 16:57:32 +0900] rev 32566
help: pass commands module by argument This removes import cycle.
Mon, 29 May 2017 06:06:13 -0700 copies: introduce getdstfctx
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 06:06:13 -0700] rev 32565
copies: introduce getdstfctx Previously `c2` may had an incorrect linkrev because getsrcfctx set wrong _descendantrev. getsrcfctx() sets descendant rev equals to srcctx.rev() (see _makegetfctx()), but for `c2` descendant rev should be dstctx. While we were lucky it didn't broke copytracing it made it significantly slower in some cases. Besides it broke some external extensions, for example remotefilelog.
Mon, 29 May 2017 05:58:08 -0700 copies: rename getfctx to getsrcfctx
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:58:08 -0700] rev 32564
copies: rename getfctx to getsrcfctx In the next patch we'll use getdstfctx. Let's rename getfctx to getsrcfctx in this patch.
Mon, 29 May 2017 05:57:25 -0700 copies: remove msrc and mdst parameters
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:57:25 -0700] rev 32563
copies: remove msrc and mdst parameters This function already has lots of parameters. And we can get manifests from contexts. So let's get msrc and mdst parameters from srcctx and dstctx.
Mon, 29 May 2017 05:57:03 -0700 copies: add dstctx parameter
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:57:03 -0700] rev 32562
copies: add dstctx parameter Add parameter with destination context
Mon, 29 May 2017 05:56:17 -0700 copies: rename ctx to srcctx
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:56:17 -0700] rev 32561
copies: rename ctx to srcctx In the next diff we'll pass new dstctx parameter. Let's rename ctx to srcctx in this patch.
Mon, 29 May 2017 05:52:15 -0700 copies: rename m2 to mdst
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:52:15 -0700] rev 32560
copies: rename m2 to mdst Small refactoring to rename m2 to more clearer mdst.
Mon, 29 May 2017 05:52:15 -0700 copies: rename m1 to msrc
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:52:15 -0700] rev 32559
copies: rename m1 to msrc Small refactoring that renames `m1` parameter name to a more clearer name `msrc`.
Fri, 26 May 2017 13:27:21 -0700 transaction: delete callbacks after use
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 26 May 2017 13:27:21 -0700] rev 32558
transaction: delete callbacks after use Before this change, localrepository instances that performed multiple transactions would leak transaction objects. This could occur when running `hg convert`. When running `hg convert`, the leak would be ~90 MB per 10,000 changesets as measured with the Mercurial repo itself. The leak I tracked down involved the "validate" closure from localrepository.transaction(). It appeared to be keeping a reference to the original transaction via __closure__. __del__ semantics and a circular reference involving the repo object may have also come into play. Attempting to refactor the "validate" closure proved to be difficult because the "tr" reference in that closure may reference an object that isn't created until transaction.__init__ is called. And the "validate" closure is passed as an argument to transaction.__init__. Plus there is a giant warning comment in "validate" about how hacky it is. I did not want to venture into the dragon den. Anyway, we've had problems with transactions causing leaks before. The solution then (14e683d6b273) is the same as the solution in this patch: drop references to callbacks after they are called. This not only breaks cycles in core Mercurial but can help break cycles in extensions that accidentally introduce them. While I only tracked down a leak due to self.validator, since this is the 2nd time I've tracked down leaks due to transaction callbacks I figure enough is enough and we should prevent the class of leak from occurring regardless of the variable. That's why all callback variables are now nuked.
Fri, 19 May 2017 13:16:15 -0700 match: remove special-casing of always-matching patterns in patternmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 13:16:15 -0700] rev 32557
match: remove special-casing of always-matching patterns in patternmatcher This moves the optimization for patterns that match everything to the caller, so we can remove it from patternmatcher. Note that we need to teach alwaysmatcher to use relative paths now in cases like "hg files .." from inside mercurial/, because while it still matches everything, paths should be printed relative to the working directory.
Fri, 19 May 2017 12:47:45 -0700 match: move normalize() call out of matcher constructors
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 12:47:45 -0700] rev 32556
match: move normalize() call out of matcher constructors By passing in the result of the normalize() call, we prepare for moving the special handling of patterns that always match out of the patternmatcher. It also lets us remove many of the arguments from the matcher, because they were passed only the the normalize function (we could have removed the arguments by binding them to the function instead of moving the normalize() call out).
Fri, 19 May 2017 11:58:16 -0700 match: drop support for empty pattern list in patternmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 11:58:16 -0700] rev 32555
match: drop support for empty pattern list in patternmatcher Since the caller now deals with empty pattern lists, we can drop that support in the patternmatcher. It now gets the more logical behavior of matching nothing when no patterns are given (although there is no in-core caller that will pass no patterns).
Sat, 20 May 2017 23:49:14 -0700 match: optimize visitdir() for when no explicit files are listed
Martin von Zweigbergk <martinvonz@google.com> [Sat, 20 May 2017 23:49:14 -0700] rev 32554
match: optimize visitdir() for when no explicit files are listed In patternmatcher, we used to say that all directories should be visited if no explicit files were listed, because the case of empty _files usually implied that no patterns were given (which in turns meant that everything should match). However, this made e.g. "hg files -r . rootfilesin:." slower than necessary, because that also ended up with an empty list in _files. Now that patternmatcher does not handle includes, the only remaining case where its _files/_fileset fields will be empty is when it's matching everything. We can therefore treat the always-case specially and stop treating the empty _files case specially. This makes the case mentioned above faster on treemanifest repos.
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip