Tue, 07 Mar 2017 14:19:08 -0800 rebase: clear updatestate during rebase --abort in more cases
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 14:19:08 -0800] rev 31222
rebase: clear updatestate during rebase --abort in more cases Previously, rebase --abort would only call update if you were on a node that had already been rebased. This meant that if the rebase failed during the rebase of the first commit, the working copy would be left dirty (with a .hg/updatestate file) and rebase --abort would not have update to clean it up. The fix is to also perform an update if you're still on the target node or on the original working copy node (since the working copy may be dirty, we still need to do the update). We don't want to perform an update in all cases though because of issue4009. A subsequent patch makes this case much more common, since it causes the entire rebase transaction to rollback during unexpected exceptions. This causes the existing test-rebase-abort.t to cover this case.
Wed, 08 Mar 2017 00:49:15 +0530 repoview: convert attribute names to unicodes on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 08 Mar 2017 00:49:15 +0530] rev 31221
repoview: convert attribute names to unicodes on Python 3 In Python 3, the attribute names must be strings i.e. unicodes.
Wed, 08 Mar 2017 00:45:19 +0530 parsers: alias long to int on Python 3
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 08 Mar 2017 00:45:19 +0530] rev 31220
parsers: alias long to int on Python 3
Wed, 08 Mar 2017 00:40:15 +0530 store: slice over a bytestring to get characters instead of ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 08 Mar 2017 00:40:15 +0530] rev 31219
store: slice over a bytestring to get characters instead of ascii values On Python 2, >>> a = b'abc' >>> a[1] 'b' Whereas on python 3, >>> a = b'abc' >>> a[1] 98 >>> a[1:2] b'b' This does not change behaviour on python 2.
Thu, 02 Mar 2017 13:27:42 +0100 vfs: use 'vfs' module directly in 'mercurial.hg'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 13:27:42 +0100] rev 31218
vfs: use 'vfs' module directly in 'mercurial.hg' Now that the 'vfs' classes moved in their own module, lets use the new module directly. We update code iteratively to help with possible bisect needs in the future.
Wed, 01 Mar 2017 11:00:12 +0100 vfs: extract 'vfs' class and related code to a new 'vfs' module (API)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Mar 2017 11:00:12 +0100] rev 31217
vfs: extract 'vfs' class and related code to a new 'vfs' module (API) The 'scmutil' is growing large (1500+ lines) and 2/5 of it is related to vfs. We extract the 'vfs' related code in its own module get both module back to a better scale and clearer contents. We keep all the references available in 'scmutil' for now as many reference needs to be updated.
Thu, 02 Mar 2017 03:52:36 +0100 vfs: replace 'scmutil.opener' usage with 'scmutil.vfs'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 03:52:36 +0100] rev 31216
vfs: replace 'scmutil.opener' usage with 'scmutil.vfs' The 'vfs' class is the first class citizen for years. We remove all usages of the older API. This will let us remove the old API eventually.
Tue, 07 Mar 2017 12:52:00 -0800 fsmonitor: remove use of repo.opener
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 12:52:00 -0800] rev 31215
fsmonitor: remove use of repo.opener This has been deprecated, so we need to switch to the appropriate vfs apis.
Tue, 28 Feb 2017 15:19:08 +0100 help: align description of 'base rev' with reality [issue5488]
Kim Alvefur <zash@zash.se> [Tue, 28 Feb 2017 15:19:08 +0100] rev 31214
help: align description of 'base rev' with reality [issue5488] The text about revlogs seems to be wrong about -1 being used to indicate the start of a delta chain. Attempt to correct this.
Wed, 01 Mar 2017 18:37:34 -0800 help: fix internals.changegroups
Kyle Lippincott <spectral@google.com> [Wed, 01 Mar 2017 18:37:34 -0800] rev 31213
help: fix internals.changegroups Add information about tree manifests, copy edit the text and fix up a few ambiguities. The document also contains a few additional fixes from Siddharth Agarwal <sid0@fb.com>, who used it to build a parser for changegroups in Rust.
Fri, 03 Mar 2017 00:11:51 +0900 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org> [Fri, 03 Mar 2017 00:11:51 +0900] rev 31212
share: drop 'relshared' requirement as well
Fri, 03 Mar 2017 00:11:18 +0900 share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org> [Fri, 03 Mar 2017 00:11:18 +0900] rev 31211
share: fix typo to drop 'shared' requirement on unshare This must be a typo and it seems correct to drop the requirement since the repo is no longer a shared repository.
Fri, 03 Mar 2017 02:57:06 +0900 similar: compare between actual file contents for exact identity
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 03 Mar 2017 02:57:06 +0900] rev 31210
similar: compare between actual file contents for exact identity Before this patch, similarity detection logic (for addremove and automv) depends entirely on SHA-1 digesting. But this causes incorrect rename detection, if: - removing file A and adding file B occur at same committing, and - SHA-1 hash values of file A and B are same This may prevent security experts from managing sample files for SHAttered issue in Mercurial repository, for example. https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html https://shattered.it/ Hash collision itself isn't so serious for core repository functionality of Mercurial, described by mpm as below, though. https://www.mercurial-scm.org/wiki/mpm/SHA1 This patch compares between actual file contents after hash comparison for exact identity. Even after this patch, SHA-1 is still used, because it is reasonable enough to quickly detect existence of "(almost) same" file. - replacing SHA-1 causes decreasing performance, and - replacement of it has ambiguity, yet Getting content of removed file (= rfctx.data()) at each exact comparison should be cheap enough, even though getting content of added one costs much. ======= ============== ===================== file fctx data() reads from ======= ============== ===================== removed filectx in-memory revlog data added workingfilectx storage ======= ============== =====================
Thu, 02 Mar 2017 21:49:30 -0800 localrepo: handle rename with hardlinks properly
Jun Wu <quark@fb.com> [Thu, 02 Mar 2017 21:49:30 -0800] rev 31209
localrepo: handle rename with hardlinks properly In "aftertrans", we rename "journal.*" to "undo.*". We expect "journal.*" files to disappear after renaming. However, if "journal.foo" and "undo.foo" refer to a same file (hardlink), rename may be a no-op, leaving both files on disk, according to Linux manpage [1]: If oldpath and newpath are existing hard links referring to the same file, then rename() does nothing, and returns a suc‐ cess status. The POSIX specification [2] is not very clear about what to do. To be safe, remove "undo.*" before the rename so "journal.*" cannot be left on disk. [1]: http://man7.org/linux/man-pages/man2/rename.2.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/
Wed, 01 Mar 2017 18:21:06 -0800 dirstate: avoid unnecessary load+dump during backup
Jun Wu <quark@fb.com> [Wed, 01 Mar 2017 18:21:06 -0800] rev 31208
dirstate: avoid unnecessary load+dump during backup Previously, dirstate.savebackup unconditionally dumps the dirstate map to disk. It may require loading dirstate first to be able to dump it. Those operations could be expensive if the dirstate is big, and could be avoided if we know the dirstate file is up-to-date. This patch avoids the read and write if the dirstate is clean. In that case, we just do a plain copy without any serialization. This should make commands which use transactions but do not touch dirstate faster. For example, "hg bookmark -r REV NAME".
Wed, 01 Mar 2017 17:59:21 -0800 dirstate: try to use hardlink to backup dirstate
Jun Wu <quark@fb.com> [Wed, 01 Mar 2017 17:59:21 -0800] rev 31207
dirstate: try to use hardlink to backup dirstate This should be more efficient once util.copyfile has real hardlink support.
Sun, 05 Mar 2017 16:20:07 -0800 dirstate: track updated files to improve write time
Durham Goode <durham@fb.com> [Sun, 05 Mar 2017 16:20:07 -0800] rev 31206
dirstate: track updated files to improve write time Previously, dirstate.write() would iterate over the entire dirstate to find any entries that needed to be marked 'lookup' (i.e. if they have the same timestamp as now). This was O(working copy) and slow in large repos. It was most visible when rebasing or histediting multiple commits, since it gets executed once per commit, even if the entire rebase/histedit is wrapped in a transaction. The fix is to track which files have been editted, and only check those to see if they need to be marked as 'lookup'. This saves 25% on histedit times in very large repositories. I tested this by adding temporary debug logic to verify that the old files processed in the loop matched the new files processed in the loop and running the test suite.
Mon, 06 Mar 2017 03:09:15 -0800 hook: give exthooks tags for blocking time
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:09:15 -0800] rev 31205
hook: give exthooks tags for blocking time The ui.system autogenerated tag isn't really useful - as they're named, let's use the name the user gave us.
Mon, 06 Mar 2017 03:19:40 -0800 filemerge: tag merge tool for blocked times
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:19:40 -0800] rev 31204
filemerge: tag merge tool for blocked times Merge tools can take a while - let's ensure that they're appropriately tagged
Mon, 06 Mar 2017 03:27:52 -0800 hgk: set a blocked tag when the user invokes view
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:27:52 -0800] rev 31203
hgk: set a blocked tag when the user invokes view
Mon, 06 Mar 2017 03:27:41 -0800 transplant: set a blockedtag when invoking external filter
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:27:41 -0800] rev 31202
transplant: set a blockedtag when invoking external filter
Mon, 06 Mar 2017 03:27:24 -0800 config: set blockedtag when invoking configuration edit
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:27:24 -0800] rev 31201
config: set blockedtag when invoking configuration edit
Mon, 06 Mar 2017 03:26:30 -0800 bisect: set a blockedtag when running the check command
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:26:30 -0800] rev 31200
bisect: set a blockedtag when running the check command So that the hg bisect data clearly shows the bisect command separately to the main data set.
Mon, 06 Mar 2017 03:25:44 -0800 dispatch: set a blockedtag when running an external alias
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:25:44 -0800] rev 31199
dispatch: set a blockedtag when running an external alias
Mon, 06 Mar 2017 03:25:29 -0800 patch: set a blockedtag when running an external filter
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:25:29 -0800] rev 31198
patch: set a blockedtag when running an external filter
Mon, 06 Mar 2017 03:25:09 -0800 sshpeer: set a blockedtag when starting ssh
Simon Farnsworth <simonfar@fb.com> [Mon, 06 Mar 2017 03:25:09 -0800] rev 31197
sshpeer: set a blockedtag when starting ssh So that the data is readable.
Mon, 06 Mar 2017 14:11:21 +0100 revert: always display hunks reversed when reverting to parent
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 14:11:21 +0100] rev 31196
revert: always display hunks reversed when reverting to parent When reverting to the parent of working directory, operation is "discard" so we want hunks to be presented in the same order as the diff (i.e. "reversed"). So we do not query the experimental.revertalternateinteractivemode option in this case and always set "reversehunks" to True.
Fri, 03 Mar 2017 14:08:20 +0100 fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 03 Mar 2017 14:08:20 +0100] rev 31195
fileset: add a 'status(...)' predicate to control evaluation context Same as 'revs', this predicate does not select files but switches the evaluation context. This allow to match file according arbitrary status call. We can now express the same query as 'hg status'. The API (two 'revsingle' class) have been picked instead of a single 'revs' revset for multiple reasons: * it is less confusing to express * it allow to express more query (eg: backward status, cross branch status)
Fri, 03 Mar 2017 14:08:06 +0100 fileset: allow to specify a basectx for status
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 03 Mar 2017 14:08:06 +0100] rev 31194
fileset: allow to specify a basectx for status This will be used for a predicates that defines the status range of a match.
Fri, 03 Mar 2017 12:44:56 +0100 fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 03 Mar 2017 12:44:56 +0100] rev 31193
fileset: add revs(revs, fileset) to evaluate set in working directory Unlike other functions, "revs()" does not select files but switches the evaluation context. This allow to match file with property in another revision that the one currently evaluated. This changeset is based on work from Yuya Nishihara.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip