Wed, 17 Aug 2016 20:58:16 -0700 debugcommands: move 'debugfsinfo' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:58:16 -0700] rev 30534
debugcommands: move 'debugfsinfo' in the new module
Wed, 17 Aug 2016 20:57:57 -0700 debugcommands: move 'debugfileset' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:57:57 -0700] rev 30533
debugcommands: move 'debugfileset' in the new module
Wed, 23 Nov 2016 17:36:35 +0000 censor: flag internal documentation
Remi Chaintron <remi@fb.com> [Wed, 23 Nov 2016 17:36:35 +0000] rev 30532
censor: flag internal documentation
Wed, 23 Nov 2016 14:58:52 -0800 shelve: make --keep option survive user intervention (issue5431)
Kostia Balytskyi <ikostia@fb.com> [Wed, 23 Nov 2016 14:58:52 -0800] rev 30531
shelve: make --keep option survive user intervention (issue5431) Currently if user runs 'hg unshelve --keep' and merge conflicts occur, the information about --keep provided by user is lost and shelf is deleted after 'hg unshelve --continue'. This is obviously not desired, so this patch fixes it.
Thu, 24 Nov 2016 01:15:34 +0000 worker: use os._exit for posix worker in all cases
Jun Wu <quark@fb.com> [Thu, 24 Nov 2016 01:15:34 +0000] rev 30530
worker: use os._exit for posix worker in all cases Like commandserver, the worker should never run other resource cleanup logic. Previously this is not true for workers if they have exceptions other than KeyboardInterrupt. This actually caused a real-world deadlock with remotefilelog: 1. remotefilelog/fileserverclient creates a sshpeer. pipei/o/e get created. 2. worker inherits that sshpeer's pipei/o/e. 3. worker runs sshpeer.cleanup (only happens without os._exit) 4. worker closes pipeo/i, which will normally make the sshpeer read EOF from its stdin and exit. But the master process still have pipeo, so no EOF. 5. worker reads pipee (stderr of sshpeer), which never completes because the ssh process does not exit, does not close its stderr. 6. master waits for all workers, which never completes because they never complete sshpeer.cleanup. This could also be addressed by closing these fds after fork, which is not easy because Python 2.x does not have an official "afterfork" hook. Hacking os.fork is also ugly. Besides, sshpeer is probably not the only troublemarker. The patch changes _posixworker so all its code paths will use os._exit to avoid running unwanted resource clean-ups.
Thu, 24 Nov 2016 00:48:40 +0000 dispatch: move part of callcatch to scmutil
Jun Wu <quark@fb.com> [Thu, 24 Nov 2016 00:48:40 +0000] rev 30529
dispatch: move part of callcatch to scmutil Per discussion at 39149b6036e6 [1], we need "callcatch" in worker.py. Move it to scmutil.py to avoid cycles. Note that dispatch's callcatch handles some additional high-level exceptions related to config parsing, and commands. Moving them to scmutil will make scmutil depend on "commands" or require "_formatparse" and "_getsimilar" (and "difflib") to be moved as well. In the worker use-case, it is forked when config and commands are fully loaded. So it should not care about those exceptions. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-August/087116.html
Wed, 23 Nov 2016 00:03:11 +0530 py3: use pycompat.getcwd() instead of os.getcwd()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 23 Nov 2016 00:03:11 +0530] rev 30528
py3: use pycompat.getcwd() instead of os.getcwd() We have pycompat.getcwd() which returns bytes path on Python 3. This patch changes most of the occurences of the os.getcwd() with pycompat one.
Wed, 17 Aug 2016 20:57:15 -0700 debugcommands: move 'debugextensions' to the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:57:15 -0700] rev 30527
debugcommands: move 'debugextensions' to the new module
Wed, 17 Aug 2016 20:56:11 -0700 debugcommands: move 'debugdiscovery' in the module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:56:11 -0700] rev 30526
debugcommands: move 'debugdiscovery' in the module And a lot of imports with it.
Wed, 17 Aug 2016 20:43:31 -0700 debugcommands: move 'debugdate' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:43:31 -0700] rev 30525
debugcommands: move 'debugdate' in the new module
Wed, 17 Aug 2016 20:43:05 -0700 debugcommands: move 'debugrevlogopts' into the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:43:05 -0700] rev 30524
debugcommands: move 'debugrevlogopts' into the new module This move contains the first reference to debugrevlogopts in debugcommands.py. We'll eventually want to move that over. We hold off for now because it would introduce a module import cycle.
Wed, 17 Aug 2016 20:41:54 -0700 debugcommands: move 'debugdag' into the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:41:54 -0700] rev 30523
debugcommands: move 'debugdag' into the new module
Sat, 15 Oct 2016 14:30:16 +0900 chgserver: make it a core module and drop extension flags
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:30:16 +0900] rev 30522
chgserver: make it a core module and drop extension flags It was an extension just because there were several dependency cycles I needed to address. I don't add 'chgserver' to extensions._builtin since chgserver is considered an internal extension so nobody should enable it by their config.
Sat, 15 Oct 2016 14:37:18 +0900 chgserver: delay importing commands and dispatch modules
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:37:18 +0900] rev 30521
chgserver: delay importing commands and dispatch modules This is a workaround for future import cycle: dispatch -> commands -> server -> chgserver -> commands. Some of the problems can be fixed later on pager and chg refactoring.
Sat, 15 Oct 2016 14:24:29 +0900 chgserver: drop CHGINTERNALMARK by chgunixservice()
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:24:29 +0900] rev 30520
chgserver: drop CHGINTERNALMARK by chgunixservice() Prepares for the removal of uisetup(). We just need to do that at the start of the chg server, so chgunixservice() should be fine.
Sat, 15 Oct 2016 14:19:16 +0900 server: add public function to select either cmdserver or hgweb
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:19:16 +0900] rev 30519
server: add public function to select either cmdserver or hgweb
Sat, 15 Oct 2016 14:09:36 +0900 server: move service factory from hgweb
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:09:36 +0900] rev 30518
server: move service factory from hgweb
Sat, 15 Oct 2016 14:06:46 +0900 hgweb: extract app factory
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 14:06:46 +0900] rev 30517
hgweb: extract app factory I'll move createservice() to the server module, but createapp() seems good to remain in the hgweb module because of its dependency on hgweb/hgwebdir_mod.
Sat, 15 Oct 2016 13:57:17 +0900 server: move service table and factory from commandserver
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 13:57:17 +0900] rev 30516
server: move service table and factory from commandserver This is necessary to solve future dependency cycle between commandserver.py and chgserver.py. 'cmd' prefix is added to table and function names to avoid conflicts with hgweb.
Sat, 15 Oct 2016 13:47:43 +0900 server: move cmdutil.service() to new module (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 15 Oct 2016 13:47:43 +0900] rev 30515
server: move cmdutil.service() to new module (API) And call it runservice() because I'll soon add createservice(). The main reason I'm going to introduce the 'server' module is to solve future dependency cycle between chgserver.py and commandserver.py. The 'server' module sits at the same layer as the cmdutil. I believe it's generally good to get rid of things from the big cmdutil module.
Wed, 17 Aug 2016 20:41:05 -0700 debugcommands: move 'debugcomplete' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:41:05 -0700] rev 30514
debugcommands: move 'debugcomplete' in the new module
Wed, 17 Aug 2016 20:40:13 -0700 debugcommands: move 'debugcommands' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:40:13 -0700] rev 30513
debugcommands: move 'debugcommands' in the new module The commit message isn't an illusion. There is a "debugcommands" module and command.
Wed, 17 Aug 2016 20:38:29 -0700 debugcommands: move 'debugcheckstate' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:38:29 -0700] rev 30512
debugcommands: move 'debugcheckstate' in the new module
Wed, 17 Aug 2016 20:37:54 -0700 debugcommands: move debug{create,apply}streambundleclone to the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 20:37:54 -0700] rev 30511
debugcommands: move debug{create,apply}streambundleclone to the new module
Wed, 17 Aug 2016 21:07:22 -0700 debugcommands: move 'debugbundle' in the new module
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 21:07:22 -0700] rev 30510
debugcommands: move 'debugbundle' in the new module
Tue, 22 Nov 2016 18:46:50 +0530 py3: add os.getcwdb() to have bytes path
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 Nov 2016 18:46:50 +0530] rev 30509
py3: add os.getcwdb() to have bytes path Following the behaviour of Python 3, os.getcwd() return unicodes. We need bytes version as path variables are bytes in UNIX. Python 3 has os.getcwdb() which returns current working directory in bytes. Like rest of the things there in pycompat, like osname, ossep, we need to rewrite every instance of os.getcwd to pycompat.getcwd to make them work correctly on Python 3.
Tue, 22 Nov 2016 18:13:02 -0800 help: clarify contents of revlog index
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 22 Nov 2016 18:13:02 -0800] rev 30508
help: clarify contents of revlog index The previous wording indicated that field at index 3 was the size of the decompressed chunk, not the size of the full revision text.
Tue, 22 Nov 2016 13:32:05 -0800 zstd: fix compilation with Solaris Studio
Danek Duvall <danek.duvall@oracle.com> [Tue, 22 Nov 2016 13:32:05 -0800] rev 30507
zstd: fix compilation with Solaris Studio Without these changes, Solaris Studio (12.4) gives us "syntax error: empty declaration" on these two lines.
Mon, 21 Nov 2016 21:36:46 -0500 cmdutil: turn forward of checkunresolved into a deprecation warning
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:36:46 -0500] rev 30506
cmdutil: turn forward of checkunresolved into a deprecation warning As with dirstateguard, I really doubt anyone outside core was using this, as my grep over the repositories I keep locally suggests nobody was using this. If others are comfortable with it, let's drop the forward entirely.
Mon, 21 Nov 2016 21:32:55 -0500 localrepo: refer to checkunresolved by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:32:55 -0500] rev 30505
localrepo: refer to checkunresolved by its new name
Mon, 21 Nov 2016 21:32:39 -0500 rebase: refer to checkunresolved by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:32:39 -0500] rev 30504
rebase: refer to checkunresolved by its new name
Mon, 21 Nov 2016 21:31:45 -0500 checkunresolved: move to new package to help avoid import cycles
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:31:45 -0500] rev 30503
checkunresolved: move to new package to help avoid import cycles This will allow localrepo to stop using cmdutil, which should avoid some future import cycles. There's room for an adventurous soul to delve deeper into merge.py and figure out how to disentangle more of it - it appears to be a nexus of cycle problems. Some of it might be able to move into this new mergeutil package.
Mon, 21 Nov 2016 21:16:54 -0500 cmdutil: mark dirstateguard as deprecated
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:16:54 -0500] rev 30502
cmdutil: mark dirstateguard as deprecated I sincerely doubt this is used in external code, as grepping the extensions I keep locally (including Facebook's hgexperimental and evolve) indicate nobody outside of core uses this. As such, I'd also welcome just dropping this name forward entirely.
Mon, 21 Nov 2016 21:06:34 -0500 localrepo: refer to dirstateguard by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:06:34 -0500] rev 30501
localrepo: refer to dirstateguard by its new name
Mon, 21 Nov 2016 21:06:22 -0500 commands: refer to dirstateguard by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:06:22 -0500] rev 30500
commands: refer to dirstateguard by its new name
Mon, 21 Nov 2016 21:27:12 -0500 rebase: refer to dirstateguard by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:27:12 -0500] rev 30499
rebase: refer to dirstateguard by its new name
Mon, 21 Nov 2016 21:05:52 -0500 mq: refer to dirstateguard by its new name
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:05:52 -0500] rev 30498
mq: refer to dirstateguard by its new name
Mon, 21 Nov 2016 21:29:32 -0500 dirstateguard: move to new module so I can break some layering violations
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:29:32 -0500] rev 30497
dirstateguard: move to new module so I can break some layering violations Recently in a review I noticed that localrepo almost has no reason to import cmdutil anymore. Also, cmdutil is a little on the enormous side, so breaking this class out strikes me as a win.
Mon, 21 Nov 2016 22:17:45 -0500 keepalive: discard legacy Python support for error handling
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 22:17:45 -0500] rev 30496
keepalive: discard legacy Python support for error handling We never changed the behavior defined by this attribute anyway, so just jettison all of this support.
Mon, 21 Nov 2016 21:52:19 -0500 mergemod: drop support for merge.update without a target
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:52:19 -0500] rev 30495
mergemod: drop support for merge.update without a target This was to be deleted after 3.9.
Mon, 21 Nov 2016 21:51:23 -0500 dispatch: stop supporting non-use of @command
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 21:51:23 -0500] rev 30494
dispatch: stop supporting non-use of @command We said we'd delete this after 3.8. It's time.
Mon, 21 Nov 2016 20:12:51 -0800 httppeer: document why super() isn't used
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Nov 2016 20:12:51 -0800] rev 30493
httppeer: document why super() isn't used Adding a follow-up to document lack of super() per Augie's request.
Thu, 17 Nov 2016 00:59:41 -0800 exchange: add `_getbookmarks()` function
Stanislau Hlebik <stash@fb.com> [Thu, 17 Nov 2016 00:59:41 -0800] rev 30492
exchange: add `_getbookmarks()` function This function will be used to generate bookmarks bundle2 part. It is a separate function in order to make it easy to overwrite it in extensions. Passing `kwargs` to the function makes it easy to add new parameters in extensions.
Thu, 17 Nov 2016 00:59:41 -0800 bookmarks: use listbinbookmarks() in listbookmarks()
Stanislau Hlebik <stash@fb.com> [Thu, 17 Nov 2016 00:59:41 -0800] rev 30491
bookmarks: use listbinbookmarks() in listbookmarks()
Thu, 17 Nov 2016 00:59:41 -0800 bookmarks: introduce listbinbookmarks()
Stanislau Hlebik <stash@fb.com> [Thu, 17 Nov 2016 00:59:41 -0800] rev 30490
bookmarks: introduce listbinbookmarks() `bookmarks` bundle2 part will work with binary nodes. To avoid unnecessary conversions between binary and hex nodes let's add `listbinbookmarks()` that returns binary nodes. For now this function is a copy-paste of listbookmarks(). In the next patch this copy-paste will be removed.
Mon, 21 Nov 2016 16:22:26 -0800 ui: add configoverride context manager
Kostia Balytskyi <ikostia@fb.com> [Mon, 21 Nov 2016 16:22:26 -0800] rev 30489
ui: add configoverride context manager I feel like this idea might've been discussed before, so please feel free to point me to the right mailing list entry to read about why it should not be done. We have a common pattern of the following code: backup = ui.backupconfig(section, name) try: ui.setconfig(section, name, temporaryvalue, source) do_something() finally: ui.restoreconfig(backup) IMO, this looks better: with ui.configoverride({(section, name): temporaryvalue}, source): do_something() Especially this becomes more convenient when one has to backup multiple config values before doing something. In such case, adding a new value to backup requires codemod in three places.
Mon, 21 Nov 2016 18:17:02 -0500 archival: simplify code and drop message about Python 2.5
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 18:17:02 -0500] rev 30488
archival: simplify code and drop message about Python 2.5
Mon, 21 Nov 2016 17:52:32 -0500 bugzilla: stop mentioning Pythons older than 2.6
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 17:52:32 -0500] rev 30487
bugzilla: stop mentioning Pythons older than 2.6 We don't support those anyway.
Mon, 21 Nov 2016 17:51:39 -0500 tests: update sitecustomize to use uuid1() instead of randrange()
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 17:51:39 -0500] rev 30486
tests: update sitecustomize to use uuid1() instead of randrange() The comments mention that uuid would be better, so let's go ahead and make good on an old idea.
Mon, 21 Nov 2016 17:48:13 -0500 win32mbcs: drop code that was catering to Python 2.3 and earlier
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 17:48:13 -0500] rev 30485
win32mbcs: drop code that was catering to Python 2.3 and earlier
Mon, 21 Nov 2016 17:47:11 -0500 httppeer: drop an except block that says it happens only on Python 2.3
Augie Fackler <augie@google.com> [Mon, 21 Nov 2016 17:47:11 -0500] rev 30484
httppeer: drop an except block that says it happens only on Python 2.3
Fri, 21 Oct 2016 00:03:46 +0900 windows: do not replace sys.stdout by winstdout
Yuya Nishihara <yuya@tcha.org> [Fri, 21 Oct 2016 00:03:46 +0900] rev 30483
windows: do not replace sys.stdout by winstdout Now we use util.stdout everywhere.
Thu, 20 Oct 2016 23:53:36 +0900 py3: bulk replace sys.stdin/out/err by util's
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 23:53:36 +0900] rev 30482
py3: bulk replace sys.stdin/out/err by util's Almost all sys.stdin/out/err in hgext/ and mercurial/ are replaced by util's. There are a few exceptions: - lsprof.py and statprof.py are untouched since they are a kind of vendor code and they never import mercurial modules right now. - ui._readline() needs to replace sys.stdin and stdout to pass them to raw_input(). We'll need another workaround here.
Thu, 20 Oct 2016 23:40:24 +0900 py3: provide bytes stdin/out/err through util module
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 23:40:24 +0900] rev 30481
py3: provide bytes stdin/out/err through util module Since standard streams are TextIO on Python 3, we can't use sys.stdin/out/err directly. Fortunately we can get the underlying BytesIO via .buffer as long as the streams aren't replaced by e.g. StringIO. stdin/out/err are provided through util so we can wrap them by platform API.
Fri, 21 Oct 2016 00:09:38 +0900 util: rewrite pycompat imports to make pyflakes always happy
Yuya Nishihara <yuya@tcha.org> [Fri, 21 Oct 2016 00:09:38 +0900] rev 30480
util: rewrite pycompat imports to make pyflakes always happy I'll add more imports which would confuse pyflakes.
Thu, 20 Oct 2016 23:27:09 +0900 windows: do not replace sys.__stdout__
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 23:27:09 +0900] rev 30479
windows: do not replace sys.__stdout__ Now we don't use sys.__stdout__ except for getting its fileno(), so we no longer have to wrap it by winstdout. This helps adding pycompat.stdin/out/err.
Mon, 21 Nov 2016 15:38:56 +0530 py3: update test-check-py3-compat.t output
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 21 Nov 2016 15:38:56 +0530] rev 30478
py3: update test-check-py3-compat.t output This part remains unchanged because it runs in Python 3 only.
Mon, 21 Nov 2016 15:35:22 +0530 py3: use pycompat.sysargv in dispatch.run()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 21 Nov 2016 15:35:22 +0530] rev 30477
py3: use pycompat.sysargv in dispatch.run() Another one to have a bytes result from sys.argv in Python 3. This one is also a part of running `hg version` on Python 3.
Mon, 21 Nov 2016 15:26:47 +0530 py3: use pycompat.sysargv in scmposix.systemrcpath()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 21 Nov 2016 15:26:47 +0530] rev 30476
py3: use pycompat.sysargv in scmposix.systemrcpath() sys.argv returns unicodes on Python 3. We have pycompat.sysargv which returns bytes encoded using os.fsencode(). After this patch scmposix.systemrcpath() returns bytes in Python 3 world. This change is also a part of making `hg version` run in Python 3.
Sun, 20 Nov 2016 13:50:45 -0800 wireproto: perform chunking and compression at protocol layer (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Nov 2016 13:50:45 -0800] rev 30475
wireproto: perform chunking and compression at protocol layer (API) Currently, the "streamres" response type is populated with a generator of chunks with compression possibly already applied. This puts the onus on commands to perform chunking and compression. Architecturally, I think this is the wrong place to perform this work. I think commands should say "here is the data" and the protocol layer should take care of encoding the final bytes to put on the wire. Additionally, upcoming commits will improve wire protocol support for compression. Having a central place for performing compression in the protocol transport layer will be easier than having to deal with compression at the commands layer. This commit refactors the "streamres" response type to accept either a generator or an object with "read." Additionally, the type now accepts a flag indicating whether the response is a "version 1 compressible" response. This basically identifies all commands currently performing compression. I could have used a special type for this, but a flag works just as well. The argument name foreshadows the introduction of wire protocol changes, hence the "v1." The code for chunking and compressing has been moved to the output generation function for each protocol transport. Some code has been inlined, resulting in the deletion of now unused methods.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip