Thu, 07 Jan 2016 06:44:37 +0100 buildrpm: move creation of RPM directories from dockerrpm
Mathias De Maré <mathias.demare@gmail.com> [Thu, 07 Jan 2016 06:44:37 +0100] rev 27788
buildrpm: move creation of RPM directories from dockerrpm Handling the creation of the RPM directories in buildrpm is more consistent and takes care of non-docker builds as well.
Thu, 14 Jan 2016 10:31:06 -0800 i18n: fix a test-gendoc.t failure
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Jan 2016 10:31:06 -0800] rev 27787
i18n: fix a test-gendoc.t failure
Thu, 14 Jan 2016 09:31:03 -0800 test-ctxmanager: fix Python 2.6 compatibility problem
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Jan 2016 09:31:03 -0800] rev 27786
test-ctxmanager: fix Python 2.6 compatibility problem
Thu, 14 Jan 2016 09:31:01 -0800 util: rename ctxmanager's __call__ method to enter
Bryan O'Sullivan <bryano@fb.com> [Thu, 14 Jan 2016 09:31:01 -0800] rev 27785
util: rename ctxmanager's __call__ method to enter
Wed, 13 Jan 2016 21:52:26 -0800 obsolete: make _computeobsoleteset much faster
Laurent Charignon <lc2817@columbia.edu> [Wed, 13 Jan 2016 21:52:26 -0800] rev 27784
obsolete: make _computeobsoleteset much faster This patch makes _computeobsoleteset much faster by looping over the draft and secrets as opposed to looping over the successors. This works because "number of draft and secret" is typically way smaller(<100) than the number of successor in the repo (~90k in my checkout of core mercurial as of today). And also because it is very fast to compute "not public()". I timed the code with the following setup: """ from mercurial import hg, ui, obsolete ui = ui.ui() repo = hg.repository(ui, "~/hg") l = repo.obsstore.successors # This caches the result """ With about 90k successors. k=obsolete._computeobsoleteset(repo) before this patch: 10 loops, best of 3: 33.9 ms per loop k=obsolete._computeobsoleteset(repo) after this patch: 10000 loops, best of 3: 83.3 µs per loop
Tue, 12 Jan 2016 08:34:38 +0000 check-commit: sort errors by line number
timeless <timeless@mozdev.org> [Tue, 12 Jan 2016 08:34:38 +0000] rev 27783
check-commit: sort errors by line number
Tue, 12 Jan 2016 08:50:15 +0000 check-commit: try to fix multiline handling
timeless <timeless@mozdev.org> [Tue, 12 Jan 2016 08:50:15 +0000] rev 27782
check-commit: try to fix multiline handling The old code did not understand the difference between the first line of the summary, and a random line in the summary that happened to include a #, or a random line in the changes that happened to include it. 965788d9ae09 is an example where it fails
Thu, 07 Jan 2016 01:28:59 +0000 check-commit: support REVs as commandline arguments
timeless <timeless@mozdev.org> [Thu, 07 Jan 2016 01:28:59 +0000] rev 27781
check-commit: support REVs as commandline arguments usage: * HG_NODE=REV check-commit * hg export REV | check-commit * check-commit REV ...
Thu, 07 Jan 2016 00:55:45 +0000 check-commit: modularize
timeless <timeless@mozdev.org> [Thu, 07 Jan 2016 00:55:45 +0000] rev 27780
check-commit: modularize
Thu, 07 Jan 2016 03:58:40 +0000 check-commit: fix summary length regexp
timeless <timeless@mozdev.org> [Thu, 07 Jan 2016 03:58:40 +0000] rev 27779
check-commit: fix summary length regexp
Tue, 12 Jan 2016 14:49:35 -0800 util: simplify file I/O functions using context managers
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:49:35 -0800] rev 27778
util: simplify file I/O functions using context managers
Tue, 12 Jan 2016 14:49:10 -0800 run-tests: use a context manager for file I/O in TextTestRunner
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:49:10 -0800] rev 27777
run-tests: use a context manager for file I/O in TextTestRunner
Tue, 12 Jan 2016 14:48:27 -0800 bundlerepo: use context manager for file I/O in _writetempbundle
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:48:27 -0800] rev 27776
bundlerepo: use context manager for file I/O in _writetempbundle
Tue, 12 Jan 2016 14:47:21 -0800 shelve: use a context manager for file I/O in listcmd
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:47:21 -0800] rev 27775
shelve: use a context manager for file I/O in listcmd
Tue, 12 Jan 2016 14:31:02 -0800 largefiles: use util.readfile in lfconvert
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:31:02 -0800] rev 27774
largefiles: use util.readfile in lfconvert
Tue, 12 Jan 2016 14:29:57 -0800 run-tests: use a context manager for file I/O
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:29:57 -0800] rev 27773
run-tests: use a context manager for file I/O
Tue, 12 Jan 2016 14:29:34 -0800 largefiles: use util.readfile in overrides
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:29:34 -0800] rev 27772
largefiles: use util.readfile in overrides
Tue, 12 Jan 2016 14:28:43 -0800 commands: use a context manager for file I/O in debugdiscovery
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:28:43 -0800] rev 27771
commands: use a context manager for file I/O in debugdiscovery
Tue, 12 Jan 2016 14:28:16 -0800 check-seclevel: use a context manager for file I/O
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:28:16 -0800] rev 27770
check-seclevel: use a context manager for file I/O
Tue, 12 Jan 2016 14:27:42 -0800 largefiles: use a context manager in _getfile
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 14:27:42 -0800] rev 27769
largefiles: use a context manager in _getfile
Tue, 12 Jan 2016 16:16:19 -0800 util: replace file I/O with readfile
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 16:16:19 -0800] rev 27768
util: replace file I/O with readfile
Tue, 12 Jan 2016 15:57:18 -0800 patchbomb: replace file I/O with util.readfile
Bryan O'Sullivan <bryano@fb.com> [Tue, 12 Jan 2016 15:57:18 -0800] rev 27767
patchbomb: replace file I/O with util.readfile
Sun, 10 Jan 2016 18:15:39 -0500 util: adjust hgcmd() to handle frozen Mercurial on OS X
Matt Harbison <matt_harbison@yahoo.com> [Sun, 10 Jan 2016 18:15:39 -0500] rev 27766
util: adjust hgcmd() to handle frozen Mercurial on OS X Previously, 'hg serve -d' was trying to exec the bundled python executable, which failed with: Unknown option: -- usage: python [option] ... Try 'python -h'... abort: child process failed to start See the previous patch for details about the content of the various command variables. Note that unlike the previous patch here an application bundling Mercurial could set $HG in the environment to get the correct result, there isn't anything that a bundling application could do to get the correct result here. 'hg serve -d' now launches under TortoiseHg, and there is a process listed in the background, but a client process cannot connect to it for some reason, so more investigation is needed.
Sun, 10 Jan 2016 17:56:08 -0500 util: adjust hgexecutable() to handle frozen Mercurial on OS X
Matt Harbison <matt_harbison@yahoo.com> [Sun, 10 Jan 2016 17:56:08 -0500] rev 27765
util: adjust hgexecutable() to handle frozen Mercurial on OS X sys.executable is "$appbundle/Contents/MacOS/python" when Mercurial is bundled in a frozen app bundle on OS X, so that isn't appropriate. It appears that this was only visible for things launched via util.system(), like external hooks, where $HG was set wrong. It appears that Mercurial also uses 'sys.modules['__main__'].__file__' (here) and 'sys.argv[0]' (in platform.gethgcmd()) to figure out the command to spawn. In both cases, this points to "$appbundle/Contents/Resources/hg", which invokes the system python since "/usr/bin/env python" is on the shebang line. On my system with a screwed up python install, I get an error importing the os module if this script is invoked. We could take the dirname of sys.executable and join 'hg' instead of this if we want to be paranoid, but py2app boostrap is setting the environment variable since 0.1.6 (current version is 0.9), so it seems safe and we might as well use it.
Sun, 10 Jan 2016 17:49:01 -0500 util: adjust 'datapath' to be correct in a frozen OS X package
Matt Harbison <matt_harbison@yahoo.com> [Sun, 10 Jan 2016 17:49:01 -0500] rev 27764
util: adjust 'datapath' to be correct in a frozen OS X package Apparently unlike py2exe, py2app copies the Mercurial source tree as-is to a Contents/Resources subdirectory of an app bundle, and places its binary stub in Contents/MacOS. (The Windows install has the 'hgext' and 'mercurial' modules in 'lib/library.zip', while the help and templates subdirectories have been moved out of the mercurial directory to the root of the installation. I assume that the python code living in a zip file is why "py2exe doesn't support __file__".) Therefore, prior to this change, Mercurial in a frozen app bundle on OS X would go looking for help *.txt, templates and locale info in Contents/MacOS, where they don't exist. There are only a handful of places that test for frozen, and not all of them are wrong for OS X, so it seems wiser to handle them on a case by case basis, rather that try to change mainfrozen(). The remaining cases are: 1) util.hgexecutable() wrongly points to the bundled python executable, and affects $HG in util.system() launched processes (e.g. external hooks) 2) util.hgcmd() wrongly points to the bundled python executable, but it seems to only affect 'hg serve -d' 3) hook._pythonhook() may be OK, since I didn't see anything outrageous when printing sys.path from an internal hook. I'm not sure if this special case is needed on OS X though. 4) sslutil._plainapplepython() is OK, because sys.executable is not /usr/bin/python, nor is it in /System/Library/Frameworks
Sun, 10 Jan 2016 08:03:58 +0000 help: add --system flag to get help for various platform(s)
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 08:03:58 +0000] rev 27763
help: add --system flag to get help for various platform(s)
Sun, 10 Jan 2016 06:21:40 +0000 help: split config user settings file by platform
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 06:21:40 +0000] rev 27762
help: split config user settings file by platform
Sun, 10 Jan 2016 06:09:10 +0000 help: label windows config help
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 06:09:10 +0000] rev 27761
help: label windows config help
Sun, 10 Jan 2016 06:08:41 +0000 help: split out unix/plan9 config help
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 06:08:41 +0000] rev 27760
help: split out unix/plan9 config help
Sun, 10 Jan 2016 05:58:02 +0000 help: move config default marking to its own line
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 05:58:02 +0000] rev 27759
help: move config default marking to its own line
Sun, 10 Jan 2016 05:04:49 +0000 help: split config ui.portablefilenames
timeless <timeless@mozdev.org> [Sun, 10 Jan 2016 05:04:49 +0000] rev 27758
help: split config ui.portablefilenames
Tue, 12 Jan 2016 22:40:40 -0500 test-hgignore: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 12 Jan 2016 22:40:40 -0500] rev 27757
test-hgignore: add globs for Windows
Mon, 11 Jan 2016 11:35:28 -0600 tests: run check-commit on secret changes too
Matt Mackall <mpm@selenic.com> [Mon, 11 Jan 2016 11:35:28 -0600] rev 27756
tests: run check-commit on secret changes too
Wed, 13 Jan 2016 14:41:10 -0500 util: don't capture exception with a name since we don't use it
Augie Fackler <augie@google.com> [Wed, 13 Jan 2016 14:41:10 -0500] rev 27755
util: don't capture exception with a name since we don't use it Spotted by pyflakes.
Fri, 08 Jan 2016 16:12:58 -0800 changegroup3: move treemanifest support into _unpackmanifests()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 16:12:58 -0800] rev 27754
changegroup3: move treemanifest support into _unpackmanifests() By putting the treemanifest code in _unpackmanifests(), _addchangegroupfiles() will only be about files again, and we get a nice symmetry between _packmanifests() and _unpackmanifest(). The immediate benefit to me is that remotefilelog should not need to be updated to work with treemanifests. It should also make server.validate and progress output easier to get right. Probably bundlerepo too.
Mon, 11 Jan 2016 15:10:31 -0800 changegroup3: add empty chunk separating directories and files
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Jan 2016 15:10:31 -0800] rev 27753
changegroup3: add empty chunk separating directories and files Remotefilelog overrides changegroup._addchangegroupfiles(), assuming it is about files, which seems like a natural assumption. However, in changegroup3, directory manifests are sent in the files section of the changegroup. These naturally make remotefilelog unhappy. The fact that the directories are not separated from the files (although they do come before the files) also makes server.validate harder to implement. Since we read one chunk at a time from the steam, once we have found a file (non-directory) entry in the stream, we would have to push the read data back into the stream, or otherwise refactor the code. It will be easier if we add an empty chunk after all directory manifests. This change adds that empty chunk, although we don't yet take advantage of it on the reading side. We will soon move the tree manifest stuff out of _addchangegroupfiles() and into _unpackmanifests().
Tue, 12 Jan 2016 21:23:45 -0800 changegroup3: introduce experimental.changegroup3 boolean config
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Jan 2016 21:23:45 -0800] rev 27752
changegroup3: introduce experimental.changegroup3 boolean config In order to give us the freedom to change the changegroup3 format, let's hide it behind an experimental config. Since it is required by treemanifests, that will override the cg3 config.
Tue, 12 Jan 2016 21:01:06 -0800 changegroup: hide packermap behind methods
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Jan 2016 21:01:06 -0800] rev 27751
changegroup: hide packermap behind methods This is to prepare for hiding changegroup3 behind a config option.
Wed, 13 Jan 2016 15:47:37 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 13 Jan 2016 15:47:37 -0600] rev 27750
merge with stable
Tue, 12 Jan 2016 13:10:31 -0800 context: check for differing flags a little earlier
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Jan 2016 13:10:31 -0800] rev 27749
context: check for differing flags a little earlier This makes it clearer that a unchanged file whose flags have changed will be reported as a modification. Also test this.
Tue, 12 Jan 2016 13:09:54 -0800 context: clarify why we don't compare file contents when nodeid differs
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Jan 2016 13:09:54 -0800] rev 27748
context: clarify why we don't compare file contents when nodeid differs See previous commit for timing information.
Tue, 12 Jan 2016 12:43:36 -0800 status: back out changeset 89f49813526c
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Jan 2016 12:43:36 -0800] rev 27747
status: back out changeset 89f49813526c This backs out 89f49813526c (status: change + back out == clean (API), 2016-01-04). Although correct, it turned out that it was just too slow. For example, 'hg status --rev .~1000 --rev .' on the Mozilla repo went from <1s to >30s on cold disk. So we go back to reporting reverted changes as modified instead of clean. These are rare anyway, as suggested by the fact that it had been broken since before Mercurial 2.0.
Tue, 12 Jan 2016 13:43:41 -0800 rebase: prevent creating divergence
Laurent Charignon <lcharignon@fb.com> [Tue, 12 Jan 2016 13:43:41 -0800] rev 27746
rebase: prevent creating divergence Before this patch rebase would create divergence when you were rebasing obsolete changesets on a destination not containing one of its successors. This patch introduces rebase.allowdivergence to explicitly allow divergence creation with rebase.
Wed, 06 Jan 2016 12:55:56 -0800 rebase: create a new variable to make the next patch more legible
Laurent Charignon <lcharignon@fb.com> [Wed, 06 Jan 2016 12:55:56 -0800] rev 27745
rebase: create a new variable to make the next patch more legible
Wed, 06 Jan 2016 12:55:56 -0800 rebase: minor refactoring of _computeobsoletenotrebased
Laurent Charignon <lcharignon@fb.com> [Wed, 06 Jan 2016 12:55:56 -0800] rev 27744
rebase: minor refactoring of _computeobsoletenotrebased This patch is a refactoring of the code skipping obsolete changesets already present in destination. It makes the following patches more legible. Instead of passing all the revs to be rebased to _computeobsoletenotrebased, we only pass the obsolete revisions of the rebaseset.
Wed, 13 Jan 2016 00:09:26 -0500 test-status: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Jan 2016 00:09:26 -0500] rev 27743
test-status: stabilize for no-execbit platforms The preceding #if conditional was the only modification to the file, so the "reverting file" line in the subsequent revert command was getting dropped.
Tue, 12 Jan 2016 18:38:49 -0800 merge: split up checks for unknown and ignored files that differ
Siddharth Agarwal <sid0@fb.com> [Tue, 12 Jan 2016 18:38:49 -0800] rev 27742
merge: split up checks for unknown and ignored files that differ In some real-world cases it is preferable to allow overwriting ignored files while continuing to abort on unknown files. This primarily happens when we're replacing build artifacts (which are ignored) with checked in files, but continuing to abort on differing files that aren't ignored. We're redefining merge.checkunknown to only control the behavior for files that aren't ignored. That's fine because this config was only very recently introduced and has not made its way into any Mercurial releases yet.
Tue, 12 Jan 2016 18:17:07 -0800 merge: determine what untracked conflicts cause warns and aborts separately
Siddharth Agarwal <sid0@fb.com> [Tue, 12 Jan 2016 18:17:07 -0800] rev 27741
merge: determine what untracked conflicts cause warns and aborts separately This is written in a somewhat weird style, but it's designed for code reuse in an upcoming patch.
Tue, 12 Jan 2016 18:12:35 -0800 merge: factor out code to get checkunknown config
Siddharth Agarwal <sid0@fb.com> [Tue, 12 Jan 2016 18:12:35 -0800] rev 27740
merge: factor out code to get checkunknown config We're going to reuse this code shortly.
Tue, 05 Jan 2016 17:37:59 -0800 hooks: add HG_NODE_LAST to txnclose and changegroup hook environments
Mateusz Kwapich <mitrandir@fb.com> [Tue, 05 Jan 2016 17:37:59 -0800] rev 27739
hooks: add HG_NODE_LAST to txnclose and changegroup hook environments Sometimes a txnclose or changegroup hook wants to iterate through all the changesets in transaction: in that situation usually the revset `$HG_NODE:` is used to select the revisions. Unfortunately this revset sometimes may contain too many changesets because we don't have the write lock while the hook runs newer changes may be added to repository in the meantime. That's why there is a need for extra variable carrying the information about the last change in the transaction.
Fri, 08 Jan 2016 10:58:04 -0800 exchange: make clone bundles non-experimental and enabled by default
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 08 Jan 2016 10:58:04 -0800] rev 27738
exchange: make clone bundles non-experimental and enabled by default The clone bundles feature was introduced in Mercurial 3.6 behind an experimental and disabled by default flag. The feature has been enabled on hg.mozilla.org for a few months and has served many terabytes of clones. Users have been encouraged to use the feature and reception has been very positive (mainly due to faster clones as a result of connecting to a CDN). I have heard no feedback about changing the feature other than inquiries about when it will be enabled by default. So, I think the feature is ready to be enabled by default. This patch renames experimental.clonebundles to ui.clonebundles, documents the option, and enables it by default. References to the experimental state of clone bundles have been removed. The remaining config option docs in clonebundles.py have been removed because they are redudant with `hg help config`. There are some oddities with behavior of clone bundles. Because clones with clone bundles are effectively 2 `hg pull` operations, there may be 2 transactions. This could result in hooks running twice. If the subsequent pull is aborted, it could result in partial rollback and an incomplete clone. This behavior is a bit wonky and should probably be documented. If this patch is accepted, I'll send a follow-up to document it. I don't think this behavior should prevent the feature being enabled by default. Reworking the clone mechanism to support interrupted or multi-part clones feels like a major new feature and something that when implemented can change the hook and rollback semantics of clone bundles. Besides, partial clone is better than full rollback and hooks running on initial clone are likely rare, so I think the impact is minimal.
Fri, 08 Jan 2016 10:57:01 -0800 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 08 Jan 2016 10:57:01 -0800] rev 27737
exchange: make clonebundleprefers non-experimental In preparation for making the feature enabled by default.
Fri, 08 Jan 2016 10:53:07 -0800 clonebundles: remove advertisement of feature
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 08 Jan 2016 10:53:07 -0800] rev 27736
clonebundles: remove advertisement of feature I screwed up. When clone bundles is enabled on the server and a compatible client without the feature enabled clones, the server sends down an advertisement saying to enable the feature. The server creates the message which is printed verbatim on the client as an "output" part. There are 2 problems: 1) The message doesn't respect the client's localization 2) The message contains a reference to the "experimental.clonebundles" option. Since clone bundles is about to be marked as non-experimental and the goal of the advertisement was to encourage clients to test the experimental feature, let's just remove the broken advertisement since it no longer serves a purpose.
Fri, 08 Jan 2016 21:14:08 -0800 changegroup: remove now-unused 'wasempty' variable and parameter
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 21:14:08 -0800] rev 27735
changegroup: remove now-unused 'wasempty' variable and parameter
Fri, 08 Jan 2016 21:13:06 -0800 treemanifests: set bundle2 part parameter indicating treemanifest
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Jan 2016 21:13:06 -0800] rev 27734
treemanifests: set bundle2 part parameter indicating treemanifest By adding a mandatory 'treemanifest' parameter in the bundle2 part, we make it possible for the recipient to set repo requirements before the manifest revlog is accessed.
Wed, 06 Jan 2016 20:05:18 +0000 docchecker: scan for missing space before :hg:
timeless <timeless@mozdev.org> [Wed, 06 Jan 2016 20:05:18 +0000] rev 27733
docchecker: scan for missing space before :hg:
(0) -10000 -3000 -1000 -300 -100 -56 +56 +100 +300 +1000 +3000 +10000 tip