Mon, 20 Mar 2017 22:06:57 -0400 localrepo: use node.hex instead of awkward .encode('latin1')
Augie Fackler <augie@google.com> [Mon, 20 Mar 2017 22:06:57 -0400] rev 31523
localrepo: use node.hex instead of awkward .encode('latin1') Spotted as an option by Yuya. Thanks!
Tue, 21 Mar 2017 03:15:18 +0530 py3: prove hg config works
Rishabh Madan <rishabhmadan96@gmail.com> [Tue, 21 Mar 2017 03:15:18 +0530] rev 31522
py3: prove hg config works
Sat, 18 Mar 2017 21:02:20 +0900 templater: make pad() strip color codes before computing width (issue5416)
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 21:02:20 +0900] rev 31521
templater: make pad() strip color codes before computing width (issue5416) Tested in ANSI mode. We might have to extend _ansieffectre to support terminfo mode.
Sat, 18 Mar 2017 20:50:15 +0900 templater: make pad() compute actual width
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 20:50:15 +0900] rev 31520
templater: make pad() compute actual width str.ljust() and .rjust() are based on byte length, which are valid only for ASCII characters.
Sat, 18 Mar 2017 20:38:44 +0900 templater: reject bad fillchar argument passed to pad()
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 20:38:44 +0900] rev 31519
templater: reject bad fillchar argument passed to pad() Otherwise TypeError would be raised.
Sat, 18 Mar 2017 20:11:15 +0900 color: insert color code after every "\e[0m" (issue5413)
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 20:11:15 +0900] rev 31518
color: insert color code after every "\e[0m" (issue5413) This assumes the last color wins, tested in ANSI mode. I guess terminfo mode would work in the same way.
Sat, 18 Mar 2017 19:59:47 +0900 debugtemplate: pass ui to templater so label() works
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Mar 2017 19:59:47 +0900] rev 31517
debugtemplate: pass ui to templater so label() works Follows up 3356bf61fa25.
Mon, 20 Mar 2017 04:36:55 -0700 subrepo: move prompts out of the if (issue5505) stable
Simon Farnsworth <simonfar@fb.com> [Mon, 20 Mar 2017 04:36:55 -0700] rev 31516
subrepo: move prompts out of the if (issue5505) Prompts weren't available in the else clause
Sun, 19 Mar 2017 11:42:17 -0700 merge: remove unnecessary matcher checks
Durham Goode <durham@fb.com> [Sun, 19 Mar 2017 11:42:17 -0700] rev 31515
merge: remove unnecessary matcher checks As part of changing manifest.diff to accept a matcher, a previous patch added matcher calls to each location in merge.manifestmerge that tested if 'x in mf' to maintain the same behavior as before. After analyzing it further, this matcher call isn't needed, and in fact hurts future patches ability to use the matcher here. Basically, all these 'if x in mf' checks were checking if a matched file's copy source was in the matcher as well. This meant if you passed a matcher for just file foo, it would not return file bar even if foo was a copy of bar. Since manifestmerge cares about copy information, let's allow all lookups of copy sources. We also update one spot with a 'is not None' check, since it wasn't obvious that the value could sometimes be None before, which broke when we called matcher(None). A future patch adds matcher optimizations to manifestmerge which causes this code path to get covered by existing tests.
Sun, 19 Mar 2017 11:54:15 -0700 rebase: use one dirstateguard for entire rebase
Durham Goode <durham@fb.com> [Sun, 19 Mar 2017 11:54:15 -0700] rev 31514
rebase: use one dirstateguard for entire rebase Recently we switched rebases to run the entire rebase inside a single transaction, which dramatically improved the speed of rebases in repos with large working copies. Let's also move the dirstate into a single dirstateguard to get the same benefits. This let's us avoid serializing the dirstate after each commit. In a large repo, rebasing 27 commits is sped up by about 20%. I believe the test changes are because us touching the dirstate gave the transaction something to actually rollback.
Fri, 10 Mar 2017 15:52:29 -0800 histedit: add histedit.singletransaction config option
Durham Goode <durham@fb.com> [Fri, 10 Mar 2017 15:52:29 -0800] rev 31513
histedit: add histedit.singletransaction config option This adds an option (which defaults to False) to run entire histedits in a single transaction. This results in 20-25% faster histedits in large repos where transaction startup cost is expensive. I didn't want to enable this by default because it has some unfortunate side effects. For instance, if a pretxncommit hook throws midway through the histedit, it will rollback the entire histedit and lose any progress the user had made. Same if the user aborts editting a commit message. It's still worth turning this on for large repos, but probably not for normal sized repos. Long term, once we have inmemory merging, we could do the entire histedit in memory, without a transaction, then we could selectively rollback just parts of it in the event of an exception. Tested it by running the tests with `--extra-config-opt=histedit.singletransaction=True`. The only failure was related to the hook rollback issue I mention above.
Fri, 10 Mar 2017 15:43:31 -0800 histedit: pop action after the action is completed
Durham Goode <durham@fb.com> [Fri, 10 Mar 2017 15:43:31 -0800] rev 31512
histedit: pop action after the action is completed We only want to pop the action after the action is completed, since if the action aborts part way through we want it to remain at the front of the list so continue/abort will start with it. Previously we relied on the fact that we only serialized the state file at the beginning of the action, so the pop wasn't serialized until the next iteration of the loop. In a future patch we will be adding a large transaction around this area, which means if we pop the list early it might get serialized if the action throws a user InterventionRequired error, at which point the action is not in the list anymore. So let's only pop it once the action is really truly done.
Fri, 10 Mar 2017 15:43:31 -0800 histedit: add transaction support to writing the state file
Durham Goode <durham@fb.com> [Fri, 10 Mar 2017 15:43:31 -0800] rev 31511
histedit: add transaction support to writing the state file This will be used in a future diff to enable a single transaction around an entire histedit.
Sun, 19 Mar 2017 01:11:00 -0400 localrepo: forcibly copy list of filecache keys
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:11:00 -0400] rev 31510
localrepo: forcibly copy list of filecache keys On Python 3, keys() is more like iterkeys(), so we got in trouble for mutating the dict while we're iterating here. Since the list of caches should be relatively small, work around this difference by just forcing a copy of the key list.
Sun, 19 Mar 2017 01:10:02 -0400 localrepo: turn hook kwargs back into strs before calling hook
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:10:02 -0400] rev 31509
localrepo: turn hook kwargs back into strs before calling hook It might be better to ensure that the hook kwargs dict only has str keys on Python 3. I'm torn.
Sun, 19 Mar 2017 01:08:59 -0400 localrepo: ensure transaction id is fully bytes on py3
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:08:59 -0400] rev 31508
localrepo: ensure transaction id is fully bytes on py3
Sun, 19 Mar 2017 01:08:17 -0400 dirstate: use future-proof next(iter) instead of iter.next
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:08:17 -0400] rev 31507
dirstate: use future-proof next(iter) instead of iter.next The latter has been removed in Python 3.
Sun, 19 Mar 2017 01:06:47 -0400 posix: tiptoe around tempfile module more delicately
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:06:47 -0400] rev 31506
posix: tiptoe around tempfile module more delicately Some of the values inside the tempfile calls here are str on Python 3, so we've got to pass str in. Use fsdecode to work around the issue.
Sun, 19 Mar 2017 01:05:48 -0400 posix: use open() instead of file()
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:05:48 -0400] rev 31505
posix: use open() instead of file()
Sun, 19 Mar 2017 01:05:28 -0400 revlog: use int instead of long
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:05:28 -0400] rev 31504
revlog: use int instead of long By my reading of PEP 237[0], this is completely safe and has been since Python 2.2. 0: https://www.python.org/dev/peps/pep-0237/
Sun, 19 Mar 2017 01:02:42 -0400 error: use r-string to properly pop hints from **kw
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:02:42 -0400] rev 31503
error: use r-string to properly pop hints from **kw Fixes the hint mixin on Python 3.
Sun, 19 Mar 2017 14:17:07 -0400 dispatch: use pycompat.maplist to allow summing with args
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 14:17:07 -0400] rev 31502
dispatch: use pycompat.maplist to allow summing with args
Sun, 19 Mar 2017 14:12:38 -0400 pycompat: add maplist alias for old map behavior
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 14:12:38 -0400] rev 31501
pycompat: add maplist alias for old map behavior
Sun, 19 Mar 2017 14:23:30 -0400 dispatch: replace mayberepr with shellquote
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 14:23:30 -0400] rev 31500
dispatch: replace mayberepr with shellquote The quoting logic here was actually insufficient, and would have had bogus b-prefixes on Python 3. shellquote seems more appropriate anyway. Surprisingly, only two tests have output changes, and both of them look reasonable to me (both are in blackbox logs). Spotted by Yuya during review.
Sun, 19 Mar 2017 12:44:45 -0400 color: sync text attributes and buffered text output on Windows (issue5508)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 19 Mar 2017 12:44:45 -0400] rev 31499
color: sync text attributes and buffered text output on Windows (issue5508) I originally noticed that log output wasn't being colored after 3a4c0905f357, but there were other complications too. With a bunch of untracked files, only the first 1K of characters were colored pink, and the rest were normal white. A single modified file at the top would also be colored pink. Line buffering and full buffering are treated as the same thing in Windows [1], meaning the stream is either buffered or not. I can't find any explicit documentation to say stdout is unbuffered by default when attached to a console (but some internet postings indicated that is the case[2]). Therefore, it seems that explicit flushes are better than just not reopening stdout. NB: pager is now on by default, and needs to be disabled to see any color on Windows. [1] https://msdn.microsoft.com/en-us/library/86cebhfs(v=vs.140).aspx [2] https://sourceforge.net/p/mingw/mailman/message/27121137/
Sun, 19 Mar 2017 14:42:45 -0400 test-check-help: fix to work on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 19 Mar 2017 14:42:45 -0400] rev 31498
test-check-help: fix to work on Windows The initial problem was `hg files` prints paths with '\', which gets removed when piped (scanhelptopics.py failed to open 'hgext__init__.py'). Then, xargs was invoking `hg help` with 'backout\r (esc)', which setting binary mode prevents.
Sun, 19 Mar 2017 01:01:25 -0400 branchmap: be more careful about using %d on ints
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:01:25 -0400] rev 31497
branchmap: be more careful about using %d on ints Not doing so breaks Python 3.
Sun, 19 Mar 2017 00:16:39 -0400 util: use bytes re on bytes input in fspath
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 00:16:39 -0400] rev 31496
util: use bytes re on bytes input in fspath Fixes `hg add` on Python 3.
Sun, 19 Mar 2017 00:16:08 -0400 util: use pycompat.bytestr in checkwinfilename
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 00:16:08 -0400] rev 31495
util: use pycompat.bytestr in checkwinfilename Fixes `hg add` on python3.
Sun, 19 Mar 2017 00:22:04 -0400 dispatch: ensure repr is bytes in _mayberepr
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 00:22:04 -0400] rev 31494
dispatch: ensure repr is bytes in _mayberepr Fixes command line arguments containing spaces on Python 3.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip