Sun, 19 Mar 2017 01:38:10 -0400 ui: convert to/from Unicode on Python 3 in ui.editor()
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:38:10 -0400] rev 31532
ui: convert to/from Unicode on Python 3 in ui.editor() I considered making this I/O be done in terms of bytes, but that would cause an observable regression for Windows users, as non-binary-mode open does EOL conversion there. There are probably new encoding dragons lurking here, so we may want to switch to using binary mode and doing EOL conversion ourselves.
Sun, 19 Mar 2017 01:12:03 -0400 manifest: refer to bytestrings as bytes, not str
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:12:03 -0400] rev 31531
manifest: refer to bytestrings as bytes, not str Required on Python 3.
Sun, 19 Mar 2017 01:11:37 -0400 manifest: use node.hex instead of .encode('hex')
Augie Fackler <augie@google.com> [Sun, 19 Mar 2017 01:11:37 -0400] rev 31530
manifest: use node.hex instead of .encode('hex') The latter doesn't work on Python 3.
Mon, 20 Mar 2017 21:40:28 -0700 pure: use int instead of long
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Mar 2017 21:40:28 -0700] rev 31529
pure: use int instead of long Similar to the recent 73aa13bc8dac (revlog: use int instead of long, 2017-03-19).
Mon, 13 Mar 2017 22:30:07 -0700 histedit: inline cleanupnode
Jun Wu <quark@fb.com> [Mon, 13 Mar 2017 22:30:07 -0700] rev 31528
histedit: inline cleanupnode Move "cleanupnode" (unsafe strip) into "safecleanupnode" so it's impossible to call the unsafe function directly. This helps reduce future programming errors.
Mon, 13 Mar 2017 22:22:18 -0700 histedit: use safecleanupnode in _aborthistedit (issue5500)
Jun Wu <quark@fb.com> [Mon, 13 Mar 2017 22:22:18 -0700] rev 31527
histedit: use safecleanupnode in _aborthistedit (issue5500) Now nobody in histedit calls the unsafe cleanupnode directly.
Mon, 13 Mar 2017 22:19:06 -0700 histedit: use safecleanupnode in _finishhistedit
Jun Wu <quark@fb.com> [Mon, 13 Mar 2017 22:19:06 -0700] rev 31526
histedit: use safecleanupnode in _finishhistedit This simplifies code a lot.
Mon, 13 Mar 2017 21:10:45 -0700 histedit: add a method to cleanup nodes safely
Jun Wu <quark@fb.com> [Mon, 13 Mar 2017 21:10:45 -0700] rev 31525
histedit: add a method to cleanup nodes safely The new method will decide between: - cleanupnode, which calls the unsafe repair.strip - create obsmarkers Ideally, nobody calls "cleanupnode" directly except for "safecleanupnode".
Tue, 21 Mar 2017 07:22:13 +0530 py3: prove hg status works
Rishabh Madan <rishabhmadan96@gmail.com> [Tue, 21 Mar 2017 07:22:13 +0530] rev 31524
py3: prove hg status works
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.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip