Thu, 31 May 2018 22:28:29 +0900 byteify-strings: add --inplace option to write back result
Yuya Nishihara <yuya@tcha.org> [Thu, 31 May 2018 22:28:29 +0900] rev 38392
byteify-strings: add --inplace option to write back result
Thu, 31 May 2018 22:23:30 +0900 byteify-strings: add basic command interface
Yuya Nishihara <yuya@tcha.org> [Thu, 31 May 2018 22:23:30 +0900] rev 38391
byteify-strings: add basic command interface
Thu, 31 May 2018 22:07:04 +0900 byteify-strings: fork py3 code transformer to make it a standalone command
Yuya Nishihara <yuya@tcha.org> [Thu, 31 May 2018 22:07:04 +0900] rev 38390
byteify-strings: fork py3 code transformer to make it a standalone command I'm thinking of making a one-off s/''/b''/g change for overall codebase to make linter happy. We could do that without maintaining the script, but I think it will be somewhat useful for extension authors. So it is in contrib.
Mon, 18 Jun 2018 21:54:52 +0900 highlight: get around tmpl.load() which now returns a parsed tree
Yuya Nishihara <yuya@tcha.org> [Mon, 18 Jun 2018 21:54:52 +0900] rev 38389
highlight: get around tmpl.load() which now returns a parsed tree Broken at e637dc0b3b1f, "templater: parse template string to tree by templater class."
Sun, 17 Jun 2018 23:06:20 -0700 changegroup: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 23:06:20 -0700] rev 38388
changegroup: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3783
Sun, 17 Jun 2018 23:00:59 -0700 archival: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 23:00:59 -0700] rev 38387
archival: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3782
Sun, 17 Jun 2018 22:57:34 -0700 copystore: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 22:57:34 -0700] rev 38386
copystore: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3781
Sun, 17 Jun 2018 22:09:15 -0700 subrepo: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 22:09:15 -0700] rev 38385
subrepo: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3780
Sun, 17 Jun 2018 22:05:54 -0700 histedit: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 22:05:54 -0700] rev 38384
histedit: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3779
Sun, 17 Jun 2018 22:01:59 -0700 rebase: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 22:01:59 -0700] rev 38383
rebase: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3778
Sun, 17 Jun 2018 21:47:34 -0700 debugbuilddag: use context manager for progress, locks, transaction
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 21:47:34 -0700] rev 38382
debugbuilddag: use context manager for progress, locks, transaction I minor side-effect is that .hg/localtags is now written before the transaction commits. Differential Revision: https://phab.mercurial-scm.org/D3777
Sun, 17 Jun 2018 21:44:57 -0700 debugbuilddag: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 21:44:57 -0700] rev 38381
debugbuilddag: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3776
Sun, 17 Jun 2018 13:48:58 -0700 progress: make the progress helper a context manager
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 13:48:58 -0700] rev 38380
progress: make the progress helper a context manager This lets us simplify the use site in streamclone. Differential Revision: https://phab.mercurial-scm.org/D3775
Sun, 17 Jun 2018 22:13:41 -0700 progress: hide update(None) in a new complete() method
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 22:13:41 -0700] rev 38379
progress: hide update(None) in a new complete() method update(None) seemed a bit cryptic. Differential Revision: https://phab.mercurial-scm.org/D3774
Sat, 16 Jun 2018 08:22:10 +0530 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 16 Jun 2018 08:22:10 +0530] rev 38378
rebase: add dry-run functionality For now, it gives stats about rebase would be successful or hit a conflict. Remaining work is to improve the output and adding verbose mode where will show the diff of conflicting files if we hit any. Differential Revision: https://phab.mercurial-scm.org/D3757
Mon, 18 Jun 2018 16:07:46 +0530 py3: add `and None` to suppress return values of .write() calls
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 16:07:46 +0530] rev 38377
py3: add `and None` to suppress return values of .write() calls .write() calls don't return anything on Python2, so we need to make sure we suppress that on py3 too. This makes the test pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3793
Mon, 18 Jun 2018 16:06:28 +0530 py3: slice over bytes to prevent getting ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 16:06:28 +0530] rev 38376
py3: slice over bytes to prevent getting ascii values Differential Revision: https://phab.mercurial-scm.org/D3792
Mon, 18 Jun 2018 16:06:01 +0530 py3: use pycompat.maplist() instead of map() in hgext/transplant.py
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 16:06:01 +0530] rev 38375
py3: use pycompat.maplist() instead of map() in hgext/transplant.py map() returns a map-object on Python3 instead of a list. Differential Revision: https://phab.mercurial-scm.org/D3791
Mon, 18 Jun 2018 15:50:15 +0530 py3: add 4 new passing tests to whitelist
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:50:15 +0530] rev 38374
py3: add 4 new passing tests to whitelist Differential Revision: https://phab.mercurial-scm.org/D3790
Mon, 18 Jun 2018 15:31:13 +0530 py3: make tests/test-impexp-branch.t compatible with Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:31:13 +0530] rev 38373
py3: make tests/test-impexp-branch.t compatible with Python 3 This patch adds some missig b'' prefixes and add suppress the output of write() calls. Differential Revision: https://phab.mercurial-scm.org/D3789
Mon, 18 Jun 2018 15:28:18 +0530 py3: convert error instances to bytes using pycompat.bytestr()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:28:18 +0530] rev 38372
py3: convert error instances to bytes using pycompat.bytestr() Differential Revision: https://phab.mercurial-scm.org/D3788
Mon, 18 Jun 2018 15:27:34 +0530 py3: encode sys.argv to bytes using .encode()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:27:34 +0530] rev 38371
py3: encode sys.argv to bytes using .encode() Differential Revision: https://phab.mercurial-scm.org/D3787
Mon, 18 Jun 2018 15:25:57 +0530 py3: use '%d' for os.stat_result.st_nlink instead of '%s'
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:25:57 +0530] rev 38370
py3: use '%d' for os.stat_result.st_nlink instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D3786
Mon, 18 Jun 2018 15:24:17 +0530 py3: suppress the output of .write() calls in tests/test-revlog-v2.t
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:24:17 +0530] rev 38369
py3: suppress the output of .write() calls in tests/test-revlog-v2.t This makes the test pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3785
Mon, 18 Jun 2018 15:23:25 +0530 py3: add couple of missing b'' prefixes in tests/test-pager-legacy.t
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jun 2018 15:23:25 +0530] rev 38368
py3: add couple of missing b'' prefixes in tests/test-pager-legacy.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3784
Thu, 14 Jun 2018 15:17:47 -0700 import: use context manager for lock, dirstateguard, transaction
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:17:47 -0700] rev 38367
import: use context manager for lock, dirstateguard, transaction A tiny side-effect is that the transaction is now closed after saving the commit message. Differential Revision: https://phab.mercurial-scm.org/D3748
Sun, 17 Jun 2018 23:03:23 -0400 streamclone: update progress later to avoid passing None to util.bytecount
Augie Fackler <raf@durin42.com> [Sun, 17 Jun 2018 23:03:23 -0400] rev 38366
streamclone: update progress later to avoid passing None to util.bytecount Differential Revision: https://phab.mercurial-scm.org/D3773
Sun, 17 Jun 2018 23:00:08 -0400 highlight: adjust to attribute being private
Augie Fackler <raf@durin42.com> [Sun, 17 Jun 2018 23:00:08 -0400] rev 38365
highlight: adjust to attribute being private Differential Revision: https://phab.mercurial-scm.org/D3772
Thu, 03 May 2018 12:04:36 +0900 annotate: automatically populate fields referenced from template
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 12:04:36 +0900] rev 38364
annotate: automatically populate fields referenced from template If '{line_number}' is in the template, we'll probably need it. No --line-number option should be required in such cases.
Thu, 03 May 2018 12:10:47 +0900 annotate: reverse mapping between option name and field name
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 12:10:47 +0900] rev 38363
annotate: reverse mapping between option name and field name This makes the next patch slightly simpler.
Thu, 03 May 2018 11:56:49 +0900 formatter: provide hint of referenced field names
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 11:56:49 +0900] rev 38362
formatter: provide hint of referenced field names I don't like the function name, but I call it datahint() for consistency with another function I'll add later, fm.contexthint().
Thu, 03 May 2018 11:53:56 +0900 templater: add function to look up symbols used in template
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 11:53:56 +0900] rev 38361
templater: add function to look up symbols used in template Formatter can use this information to enable slow paths such as loading ctx object only when necessary.
Thu, 03 May 2018 11:17:52 +0900 templater: parse template string to tree by templater class
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 11:17:52 +0900] rev 38360
templater: parse template string to tree by templater class The parsed tree could be cached, but it isn't for now. We can add a cache later if that matters.
Thu, 03 May 2018 10:58:56 +0900 templater: drop extension point of engine classes (API)
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 10:58:56 +0900] rev 38359
templater: drop extension point of engine classes (API) I don't think this would ever be used by third-party extensions, as we've heavily changed both the templater internals and the syntax since then. The main reason of removing this API is that I want to move the parsing function from the engine to the templater class so that we can peek keywords and functions used in a user template. This change also removes reference cycle between the templater and the engine.
Thu, 03 May 2018 11:09:27 +0900 templater: make it clearer that parsing doesn't cause recursion
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 11:09:27 +0900] rev 38358
templater: make it clearer that parsing doesn't cause recursion Only compileexp() may recurse into _load().
Thu, 03 May 2018 10:53:29 +0900 templater: mark most attributes as private
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 10:53:29 +0900] rev 38357
templater: mark most attributes as private
Sun, 17 Jun 2018 06:23:29 -0700 setdiscovery: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sun, 17 Jun 2018 06:23:29 -0700] rev 38356
setdiscovery: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3770
Sat, 16 Jun 2018 00:37:44 -0700 streamclone: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sat, 16 Jun 2018 00:37:44 -0700] rev 38355
streamclone: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3769
Sat, 16 Jun 2018 00:25:13 -0700 similar: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sat, 16 Jun 2018 00:25:13 -0700] rev 38354
similar: use progress helper Note that a functional change here is that we now show the progress position *before* we start working on the item. This is consistent with how we do it elsewhere. Differential Revision: https://phab.mercurial-scm.org/D3768
Sat, 16 Jun 2018 00:03:23 -0700 remove: use progress helper
Martin von Zweigbergk <martinvonz@google.com> [Sat, 16 Jun 2018 00:03:23 -0700] rev 38353
remove: use progress helper Differential Revision: https://phab.mercurial-scm.org/D3767
Fri, 15 Jun 2018 23:04:44 -0700 changegroup: use progress helper in apply() (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Jun 2018 23:04:44 -0700] rev 38352
changegroup: use progress helper in apply() (API) Differential Revision: https://phab.mercurial-scm.org/D3766
Fri, 15 Jun 2018 22:37:01 -0700 progress: create helper class for incrementing progress
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Jun 2018 22:37:01 -0700] rev 38351
progress: create helper class for incrementing progress When using ui.progress(), there's a clear pattern that is followed: * Pass the same topic and unit * Usually pass the same total * Call with pos=None to close the progress bar * Often keep track of the current position and increment it This patch creates a simple helper class for this. I'll probably make it implement the context manager protocol later (calling update(None) on __exit__). Progress is used in low-level modules like changegroup, so I also exposed it via a method on the ui object. Perhaps the class itself should also live in ui.py? This patch also makes merge.oy use it to show that it works. Differential Revision: https://phab.mercurial-scm.org/D3765
Sun, 17 Jun 2018 18:01:49 +0900 extensions: use context manger for open()
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Jun 2018 18:01:49 +0900] rev 38350
extensions: use context manger for open()
Sun, 17 Jun 2018 17:59:12 +0900 py3: open extension source in binary mode to read docstring as bytes
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Jun 2018 17:59:12 +0900] rev 38349
py3: open extension source in binary mode to read docstring as bytes
Wed, 13 Jun 2018 16:22:54 +0530 grep: adds allfiles mode
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> [Wed, 13 Jun 2018 16:22:54 +0530] rev 38348
grep: adds allfiles mode Adds an allfiles flag that lets you grep on all files in the revision and not just the one that were modified in that changeset. This would work on a single revision and get all the files that were there in that revision. So it's like grepping on a previous state. Using this with wdir() :: `hg grep -r "wdir()" --allfiles` is what the default behavior is desired for grep. Support for multiple revisions to be added later. Differential Revision: https://phab.mercurial-scm.org/D3728
Wed, 13 Jun 2018 22:50:32 +0530 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 22:50:32 +0530] rev 38347
morestatus: remove some extra spaces The information about unfinished states in `hg status -v` had a lot of spaces which are not required and feels weird. Let's limit the spacing to four spaces. Differential Revision: https://phab.mercurial-scm.org/D3730
Fri, 15 Jun 2018 16:32:31 -0700 graph: improve graph output by using Unicode characters
John Stiles <johnstiles@gmail.com> [Fri, 15 Jun 2018 16:32:31 -0700] rev 38346
graph: improve graph output by using Unicode characters This extension beautifies log -G output by using Unicode characters. A terminal with UTF-8 support and a monospace Unicode font are required. Differential Revision: https://phab.mercurial-scm.org/D3665
Sat, 16 Jun 2018 17:07:47 -0400 py3: whitelist another 5 passing tests thanks to the ratchet
Augie Fackler <augie@google.com> [Sat, 16 Jun 2018 17:07:47 -0400] rev 38345
py3: whitelist another 5 passing tests thanks to the ratchet Differential Revision: https://phab.mercurial-scm.org/D3762
Mon, 28 May 2018 16:55:11 +0200 shelve: wider check for successful abort in test
Boris Feld <boris.feld@octobus.net> [Mon, 28 May 2018 16:55:11 +0200] rev 38344
shelve: wider check for successful abort in test The test was previously focusing on checking that the "sub-rebase" aborted properly. Since rebase is an implementation details we should also check for other messages. Differential Revision: https://phab.mercurial-scm.org/D3686
Tue, 29 May 2018 18:01:35 +0200 shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net> [Tue, 29 May 2018 18:01:35 +0200] rev 38343
shelve: use full hash in tests Using revision number is fragile. Moving to full hash to help with further development. Differential Revision: https://phab.mercurial-scm.org/D3685
Thu, 14 Jun 2018 12:35:04 -0400 phabricator: preserve the phase when amending in the Differential fields
Matt Harbison <matt_harbison@yahoo.com> [Thu, 14 Jun 2018 12:35:04 -0400] rev 38342
phabricator: preserve the phase when amending in the Differential fields I have no idea if it's better to change scmutil.cleanupnodes() so that it has the option to either apply a specific phase (e.g. for various --secret switches) or carry over the phase of the old node. The benefit would be that the caller doesn't have to remember to do this. The con is maybe inefficiency? I wrote this up as issue5918. I'm leaving that open since Yuya flagged it as an API bug. Since most other callers already do this, it's the simplest fix. (It's not obvious that `split`, `fix` and `rebase` are doing this, but there is test coverage for `fix` and `rebase`, and experimenting with `split` shows it does the right thing.)
Sat, 16 Jun 2018 19:31:07 +0900 py3: ditch email.parser.BytesParser which appears to be plain crap
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 19:31:07 +0900] rev 38341
py3: ditch email.parser.BytesParser which appears to be plain crap As I said before, BytesParser is a thin wrapper over the unicode Parser, and it's too thin to return bytes back. Today, I found it does normalize newline characters to '\n's thanks to the careless use of TextIOWrapper. So, this patch replaces BytesParser with Parser + TextIOWrapper, and fix newline handling. Since I don't know what's the least bad encoding strategy here, I just copied it from BytesParser. I've moved new parse() function from pycompat, as it is no longer a trivial wrapper.
Sat, 16 Jun 2018 17:56:37 +0900 py3: remove b'' from error message of disallowed filename
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:56:37 +0900] rev 38340
py3: remove b'' from error message of disallowed filename
Sat, 16 Jun 2018 17:54:29 +0900 py3: remove b'' from output of test-eol.t
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:54:29 +0900] rev 38339
py3: remove b'' from output of test-eol.t
Sat, 16 Jun 2018 17:53:51 +0900 py3: replace s[-1] with s.endswith() in eol handling
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:53:51 +0900] rev 38338
py3: replace s[-1] with s.endswith() in eol handling
Sat, 16 Jun 2018 17:36:44 +0900 py3: fix loop over byte string in wireprotov1peer
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:36:44 +0900] rev 38337
py3: fix loop over byte string in wireprotov1peer Before, it would always return [True]s on Python 3 because list(b"0") == [48].
Sat, 16 Jun 2018 17:04:03 +0900 py3: glob out some error messages in test-fileset.t
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:04:03 +0900] rev 38336
py3: glob out some error messages in test-fileset.t Python3 provides more detailed messages, which is fine.
Sat, 16 Jun 2018 17:00:05 +0900 fileset: raise ProgrammingError for bad existing() calls
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 17:00:05 +0900] rev 38335
fileset: raise ProgrammingError for bad existing() calls And glob out Py2/3 difference.
Sat, 16 Jun 2018 16:56:38 +0900 py3: cast bytes encoding name to str in fileset.py
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jun 2018 16:56:38 +0900] rev 38334
py3: cast bytes encoding name to str in fileset.py
Thu, 14 Jun 2018 15:12:28 -0700 import: use context manager for wlock
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:12:28 -0700] rev 38333
import: use context manager for wlock Differential Revision: https://phab.mercurial-scm.org/D3747
Thu, 14 Jun 2018 15:08:32 -0700 tag: use context manager for locks
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:08:32 -0700] rev 38332
tag: use context manager for locks Differential Revision: https://phab.mercurial-scm.org/D3746
Thu, 14 Jun 2018 15:05:14 -0700 commit: use context manager for locks
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:05:14 -0700] rev 38331
commit: use context manager for locks Differential Revision: https://phab.mercurial-scm.org/D3745
Thu, 14 Jun 2018 15:08:19 -0700 backout: use context manager for locks
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:08:19 -0700] rev 38330
backout: use context manager for locks Differential Revision: https://phab.mercurial-scm.org/D3744
Thu, 14 Jun 2018 15:28:32 -0700 backout: use context manager for dirstateguard
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:28:32 -0700] rev 38329
backout: use context manager for dirstateguard Differential Revision: https://phab.mercurial-scm.org/D3743
Thu, 14 Jun 2018 15:26:18 -0700 backout: use context manager for config override
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:26:18 -0700] rev 38328
backout: use context manager for config override Differential Revision: https://phab.mercurial-scm.org/D3742
Thu, 14 Jun 2018 15:46:31 -0700 update: use context manager for config override (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:46:31 -0700] rev 38327
update: use context manager for config override (API) Note that update wasn't resetting the value before, so any extensions that called commands.update() and relied on ui.forcemerge being set after it returned would now have to set it themselves. (There technically a small API change in all of the patches in this series, I believe: If extensions relied on the methods to *clear* ui.forcemerge, then they would have to do that themselves now, because ui.configoverride() actually restores the previous config, it doesn't just clear it like these functions did before.) Differential Revision: https://phab.mercurial-scm.org/D3741
Thu, 14 Jun 2018 15:46:17 -0700 resolve: use context manager for config override
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:46:17 -0700] rev 38326
resolve: use context manager for config override Differential Revision: https://phab.mercurial-scm.org/D3740
Thu, 14 Jun 2018 15:45:45 -0700 merge: use context manager for config override
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:45:45 -0700] rev 38325
merge: use context manager for config override Differential Revision: https://phab.mercurial-scm.org/D3739
Thu, 14 Jun 2018 15:45:16 -0700 graft: use context manager for config override
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:45:16 -0700] rev 38324
graft: use context manager for config override Differential Revision: https://phab.mercurial-scm.org/D3738
Thu, 14 Jun 2018 11:49:10 -0400 tests: suppress read(-1) -> '' calls in fileobjectobserver
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 11:49:10 -0400] rev 38323
tests: suppress read(-1) -> '' calls in fileobjectobserver This stabilizes the test output of the low-level wireproto tests between Python 2 and 3. I don't feel great about this change, but otherwise we get a ton of extra read(-1) output on Python 3, and this feels like a more sustainable solution. Bonus: test-ssh-proto-unbundle.t now passes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3733
Thu, 14 Jun 2018 11:47:51 -0400 debugcommands: work around logiofd being a pipe and unseekable
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 11:47:51 -0400] rev 38322
debugcommands: work around logiofd being a pipe and unseekable This was breaking in our Python 3 build, but not Python 2. I don't know how it ever worked in Python 2, but this passes on both. Differential Revision: https://phab.mercurial-scm.org/D3732
Wed, 13 Jun 2018 22:51:08 +0530 py3: replace `unicode` with pycompat.unicode
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 22:51:08 +0530] rev 38321
py3: replace `unicode` with pycompat.unicode unicode() is not available on Python 3 and throws a NameError because unicodes are now default str() on py3. Differential Revision: https://phab.mercurial-scm.org/D3708
Fri, 15 Jun 2018 02:07:39 +0530 cmdutil: say that `graft --stop` stops the graft instead of aborting
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 15 Jun 2018 02:07:39 +0530] rev 38320
cmdutil: say that `graft --stop` stops the graft instead of aborting I am going to add a --abort flag to graft soon, so we make sure we differentiate between the what --stop flag does and what --abort does and don't use the words interchangeably. Differential Revision: https://phab.mercurial-scm.org/D3735
Thu, 14 Jun 2018 16:51:39 -0400 py3: two more passing tests from the ratchet in buildbot
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 16:51:39 -0400] rev 38319
py3: two more passing tests from the ratchet in buildbot Differential Revision: https://phab.mercurial-scm.org/D3736
Thu, 14 Jun 2018 20:25:51 +0900 bdiff: one more safe call of bdiff_freehunks(NULL)
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:25:51 +0900] rev 38318
bdiff: one more safe call of bdiff_freehunks(NULL)
Thu, 14 Jun 2018 20:25:16 +0900 bdiff: document that bdiff_freehunks() accepts NULL
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:25:16 +0900] rev 38317
bdiff: document that bdiff_freehunks() accepts NULL blocks() of cext/bdiff.c may pass NULL on OOM.
Thu, 14 Jun 2018 13:44:42 +0200 hgweb: propagate http headers from ErrorResponse for web interface commands
Sune Foldager <cryo@cyanite.org> [Thu, 14 Jun 2018 13:44:42 +0200] rev 38316
hgweb: propagate http headers from ErrorResponse for web interface commands This makes it possible for e.g. authorization hooks to provide appropriate headers to make the web browser ask for credentials. It's done in the same way as the existing code in wireprotoserver.py.
Thu, 14 Jun 2018 20:29:27 +0900 py3: fix map() use in templatekw.showpredecessors()
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:29:27 +0900] rev 38315
py3: fix map() use in templatekw.showpredecessors() Now it matters since hybrid.tobool() no longer consumes the generator.
Thu, 14 Jun 2018 20:09:54 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:09:54 +0900] rev 38314
merge with stable
Wed, 13 Jun 2018 14:28:39 -0700 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Jun 2018 14:28:39 -0700] rev 38313
templatefilters: rename commonprefix to commondir Two reasons: * It makes it clearer that it's not a generic common string prefix (e.g. commonprefix(["bar", "baz"]) is not "ba", but "") * If we ever want a filter for generic common string prefix, then the name is now available for that. "commondir" does not describe the prefix-ness, however. I'm happy to rename it "commondirprefix" or "commonprefixdir" if others prefer. Differential Revision: https://phab.mercurial-scm.org/D3731
Wed, 13 Jun 2018 10:24:44 -0400 bitmanipulation: fix undefined behavior in bit shift in getbe32
Augie Fackler <augie@google.com> [Wed, 13 Jun 2018 10:24:44 -0400] rev 38312
bitmanipulation: fix undefined behavior in bit shift in getbe32 OSS-Fuzz caught this in its ubsan mode[0]. I'm not worried about a security issue here because in practice this should work out the way we naively expected, we're just making things explicit to the compiler with the casts. 0: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8876 Differential Revision: https://phab.mercurial-scm.org/D3729
Wed, 13 Jun 2018 21:58:42 +0900 templatefilters: undeprecate hgdate
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Jun 2018 21:58:42 +0900] rev 38311
templatefilters: undeprecate hgdate See the previous patch for why. Backed out changeset 0fe65bb7e160
Wed, 13 Jun 2018 21:57:24 +0900 templater: restore the original string format of {date}
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Jun 2018 21:57:24 +0900] rev 38310
templater: restore the original string format of {date} Unfortunately, python-hglib relies on that. I could fix python-hglib, but there would be other tools that take a decimal separator as the separator of unixtime and tzoffset. The showfmt is set per instance since new code uses '%d %d' format by default.
Tue, 12 Jun 2018 20:43:56 -0400 hgweb: insist http_status value is a sysstr
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 20:43:56 -0400] rev 38309
hgweb: insist http_status value is a sysstr My previous change was extremely confusing to figure out, because I thought I was looking at a client-side problem. For the low cost of an isinstance assert, we can make those errors not happen in the future. Differential Revision: https://phab.mercurial-scm.org/D3727
Tue, 12 Jun 2018 20:42:42 -0400 hgweb: pass a sysstr to low-level _start_response method
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 20:42:42 -0400] rev 38308
hgweb: pass a sysstr to low-level _start_response method This fixes a regression in Python 3 support introduced in 7de7bd407251 on the stable branch. We're so early in do_hgweb that I don't see any especially better choices than this. Differential Revision: https://phab.mercurial-scm.org/D3726
Tue, 12 Jun 2018 18:49:35 -0400 tests: fix printenv script on Python 3
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:49:35 -0400] rev 38307
tests: fix printenv script on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3725
Tue, 12 Jun 2018 18:49:22 -0400 cvsps: port changeset __repr__ to py3
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:49:22 -0400] rev 38306
cvsps: port changeset __repr__ to py3 This appears to be unused except as a debugging aid, as it didn't break until I added a debug print() in service of the previous fix. Sigh. Differential Revision: https://phab.mercurial-scm.org/D3724
Tue, 12 Jun 2018 18:24:25 -0400 cvsps: avoid comparison between None and a tuple in date sorting
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:24:25 -0400] rev 38305
cvsps: avoid comparison between None and a tuple in date sorting Avoids badness on Python 3. I had to figure out which entries in this object *could* be None experimentally, but I think I've got them all now. Differential Revision: https://phab.mercurial-scm.org/D3723
Tue, 12 Jun 2018 18:21:41 -0400 py3: buildbot informs me we have two new passing tests
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:21:41 -0400] rev 38304
py3: buildbot informs me we have two new passing tests Differential Revision: https://phab.mercurial-scm.org/D3722
Tue, 12 Jun 2018 12:41:09 -0700 commandserver: close server's fds explicitly from a worker
Jun Wu <quark@fb.com> [Tue, 12 Jun 2018 12:41:09 -0700] rev 38303
commandserver: close server's fds explicitly from a worker The forked worker does not need to accept connections from the server's socket fd. So let's just close them explicitly to avoid surprises. Differential Revision: https://phab.mercurial-scm.org/D3720
Tue, 12 Jun 2018 23:04:27 +0200 run-tests: restrict the test cases allowed characters
Boris Feld <boris.feld@octobus.net> [Tue, 12 Jun 2018 23:04:27 +0200] rev 38302
run-tests: restrict the test cases allowed characters Most test cases in core and in extension only use `A-Za-z0-9-` but a few tests in extensions also have a `.` in their test cases names. Also add a `_` to allow all kind of case naming format. Differential Revision: https://phab.mercurial-scm.org/D3721
Sat, 09 Jun 2018 13:34:47 +0900 templater: abstract truth testing to fix {if(list_of_empty_strings)}
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 13:34:47 +0900] rev 38301
templater: abstract truth testing to fix {if(list_of_empty_strings)} Non-empty list should always be True even if it's stringified to ''. Spotted by Martin von Zweigbergk.
Tue, 12 Jun 2018 23:17:38 +0900 show: stringify filtered list of tags before testing emptiness
Yuya Nishihara <yuya@tcha.org> [Tue, 12 Jun 2018 23:17:38 +0900] rev 38300
show: stringify filtered list of tags before testing emptiness `names % "{ifeq(name, 'tip', '', name)}"}"` may return [''], which shouldn't be falsy, but it is thanks to a templater bug. This patch converts [''] to '' before testing truthness.
Sat, 24 Mar 2018 18:03:23 +0900 templatefilters: deprecate hgdate as {date|hgdate} is the default format
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 18:03:23 +0900] rev 38299
templatefilters: deprecate hgdate as {date|hgdate} is the default format
Sat, 24 Mar 2018 17:59:19 +0900 templater: make date wrapper support dot/map operations
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 17:59:19 +0900] rev 38298
templater: make date wrapper support dot/map operations No idea if it will be useful, but it just works.
Sat, 24 Mar 2018 17:54:02 +0900 templater: introduce a wrapper for date tuple (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 17:54:02 +0900] rev 38297
templater: introduce a wrapper for date tuple (BC) Strictly speaking, this is BC, but I believe the original string format (str(float(unixtime)) + str(int(tzoffset))) was just plain wrong.
Sat, 21 Apr 2018 19:01:35 +0900 templater: promote tomap() to an interface type
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 19:01:35 +0900] rev 38296
templater: promote tomap() to an interface type I originally considered merging tomap() with itermaps()/getmember(), but decided to not. We might want to add support for chained map operations (e.g. {foo % func() % ...}), where func() will return a mappable object, and 'foo % func()' will be a mappedgenerator of mappable objects.
Sat, 09 Jun 2018 12:36:06 +0900 templater: rename mappable to hybriditem as it is the primary use case
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 12:36:06 +0900] rev 38295
templater: rename mappable to hybriditem as it is the primary use case This frees up the name 'mappable' for new interface type.
Fri, 08 Jun 2018 23:32:33 +0900 serve: do not daemonize by default by --print-url
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 23:32:33 +0900] rev 38294
serve: do not daemonize by default by --print-url Per discussion in D3649, -d/--daemon should be explicitly specified to avoid surprising result. Differential Revision: https://phab.mercurial-scm.org/D3703
Thu, 07 Jun 2018 16:19:18 -0700 mercurial: add .t files to .editorconfig
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 07 Jun 2018 16:19:18 -0700] rev 38293
mercurial: add .t files to .editorconfig The notable entry here prevents the stripping of trailing whitespace, which is important in .t tests. Differential Revision: https://phab.mercurial-scm.org/D3702
Mon, 28 May 2018 21:13:32 +0530 graft: add a new `--stop` flag to stop interrupted graft
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 28 May 2018 21:13:32 +0530] rev 38292
graft: add a new `--stop` flag to stop interrupted graft This patch adds a new flag `--stop` to `hg graft` command which stops the interrupted graft. The `--stop` flag takes back you to the last successful step i.e. it will keep your grafted commits, it will just clear the mergestate and interrupted graft state. The `--stop` is different from `--abort` flag as the latter also undoes all the work done till now which is sometimes not what the user wants. Suppose you grafted a lot of changesets, you encountered conflicts, you resolved them, did `hg graft --continue`, again encountered conflicts, continue, again encountered conflicts. Now you are tired of solving merge conflicts and want to resume this sometimes later. If you use the `--abort` functionality, it will strip your already grafted changesets, making you loose the work you have done resolving merge conflicts. A general goal related to this flag is to add this flag to `rebase` and `histedit` too. The evolve command already has this --stop flag. Tests are added for the new flag. .. feature:: `hg graft` now has a `--stop` flag to stop interrupted graft. Differential Revision: https://phab.mercurial-scm.org/D3668
Tue, 12 Jun 2018 02:36:34 +0530 graft: fix the help text to say `graft reapplies previous options`
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 02:36:34 +0530] rev 38291
graft: fix the help text to say `graft reapplies previous options` The options which graft accepts are: * rev * continue * edit * log * force * currentdate * currentuser * date * user * tool * dryrun Out of these following should be reapplied in case conflicts occur and user does `hg graft --continue`: * rev * log * force * currentuser * currentdate * date * user rev and force were already reapplied by --continue. Some recent refactors made graft to store the values of other options in graftstate and reapplies them at `hg graft --continue`. Now all the options which should be reapplied are taken care of, we can easily remove the help note which says that `--continue does not reapply earlier options` and help text saying that we reapplies earlier options. .. feature:: `hg graft --continue` now reapplies all the earlier options `hg graft` now preserves the value of all the flags and reapplies them in case of `hg graft --continue`. Differential Revision: https://phab.mercurial-scm.org/D3667
Mon, 11 Jun 2018 10:09:35 -0700 files: drop now-unnecessary filtering of removed dirstate files
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 10:09:35 -0700] rev 38290
files: drop now-unnecessary filtering of removed dirstate files workingctx.matches() now filters out removed files. Differential Revision: https://phab.mercurial-scm.org/D3712
Mon, 11 Jun 2018 10:05:23 -0700 context: make workingctx.matches() filter our removed files (API)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 10:05:23 -0700] rev 38289
context: make workingctx.matches() filter our removed files (API) It seems surprising that workingctx.matches() includes files that had been removed in the working copy. The callers don't want that either (besides the `hg locate` that was changed in the previous patch). The only observable difference that I'm aware of is that `hg log -T 'wdir()' -r '{files(...)}'` will no longer include removed files (an improvement, IMO). That matches `hg files` (but does not match the deprecated `hg locate`). Differential Revision: https://phab.mercurial-scm.org/D3711
Mon, 11 Jun 2018 09:47:07 -0700 locate: explicitly use dirstate.matches() for working copy
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 09:47:07 -0700] rev 38288
locate: explicitly use dirstate.matches() for working copy `hg locate` is odd in that it includes files that have been removed from the working copy. It relies on workingctx.matches() for that. I want to make workingctx.matches() not include removed files, so this patch makes `hg locate` handle the working copy differently instead. Differential Revision: https://phab.mercurial-scm.org/D3710
Mon, 11 Jun 2018 11:37:21 -0700 revsets: define a none() revset
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jun 2018 11:37:21 -0700] rev 38287
revsets: define a none() revset This can be useful for default values in corp-wide configuration (e.g. for commits to hide, which defaults to none()), and perhaps in scripts. I named it none() rather than empty() to match all(). Differential Revision: https://phab.mercurial-scm.org/D3713
Mon, 11 Jun 2018 19:24:01 +0200 statprof: fix save and load
Boris Feld <boris.feld@octobus.net> [Mon, 11 Jun 2018 19:24:01 +0200] rev 38286
statprof: fix save and load Fix these functions even if they don't are used at the moment. Thanks to Yuya Nishihara for spotting that.
Mon, 11 Jun 2018 19:05:41 +0200 perftemplating: abort on incompatible version
Boris Feld <boris.feld@octobus.net> [Mon, 11 Jun 2018 19:05:41 +0200] rev 38285
perftemplating: abort on incompatible version This is what the other debug commands do. Thanks to Yuya Nishihara for pointing this out.
Tue, 05 Jun 2018 21:40:33 +0900 templater: fix string representation of wrapped None
Yuya Nishihara <yuya@tcha.org> [Tue, 05 Jun 2018 21:40:33 +0900] rev 38284
templater: fix string representation of wrapped None flatten() and stringify() skip None, which means wrappedvalue(None).show() must return '' instead of 'None'. This isn't a problem right now, but we'll encounter it once we start using wrapped types extensively.
Fri, 08 Jun 2018 20:57:54 +0900 templater: show slightly better hint on map operation error
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 20:57:54 +0900] rev 38283
templater: show slightly better hint on map operation error It was super hard to find where the templater went wrong if a keyword was evaluated to '' or None.
Wed, 21 Mar 2018 12:28:12 +0900 templater: inline unwraphybrid()
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:28:12 +0900] rev 38282
templater: inline unwraphybrid() flatten() is the solo user of this function.
Mon, 19 Mar 2018 00:26:55 +0900 templater: drop hybrid-ness on unwrapvalue()
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:26:55 +0900] rev 38281
templater: drop hybrid-ness on unwrapvalue() Proxy methods are no longer necessary as list/dict functions go through the wrapped interface.
Fri, 23 Mar 2018 22:31:58 +0900 templater: mark .keytype as a private attribute
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 22:31:58 +0900] rev 38280
templater: mark .keytype as a private attribute
Mon, 19 Mar 2018 00:23:20 +0900 templater: abstract ifcontains() over wrapped types
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:23:20 +0900] rev 38279
templater: abstract ifcontains() over wrapped types This allows us to make .keytype private. There's a minor BC that a hybrid dict/list of keytype=None now strictly checks the type of the needle. For example, {ifcontains(rev, files)} no longer matches a file named "1" at the rev=1. I made this change for consistency with the get(dict, key) function. We can restore the old behavior by making keytype=bytes the default if desired.
Wed, 21 Mar 2018 12:06:18 +0900 templater: inline wraphybridvalue()
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:06:18 +0900] rev 38278
templater: inline wraphybridvalue() All wraphybridvalue() calls are now handled in the hybrid class.
Mon, 19 Mar 2018 00:16:12 +0900 templater: abstract min/max away
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:16:12 +0900] rev 38277
templater: abstract min/max away I'm not certain how many get*() functions I'll add to the wrapped types, but getmin() and getmax() will allow us to optimize a revset wrapper.
Sun, 10 Jun 2018 12:24:53 +0900 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 12:24:53 +0900] rev 38276
stringutil: fix prettyrepr() to not orphan foo=<...> line
Sun, 10 Jun 2018 11:55:52 +0900 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:55:52 +0900] rev 38275
debugwalk: pretty-print nested matcher While porting filesets to composition of matchers, I found the original one-liner was hard to read.
Sun, 10 Jun 2018 11:53:56 +0900 debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:53:56 +0900] rev 38274
debugwalk: show matcher output only if -v/--verbose And drop "egrep -v". This matches the behavior of "hg debugrevspec".
Sun, 10 Jun 2018 11:50:09 +0900 stringutil: promote smartset.prettyformat() to utility function
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:50:09 +0900] rev 38273
stringutil: promote smartset.prettyformat() to utility function It will be used by debugwalk.
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip