Mon, 10 Jul 2017 21:09:46 -0700 sslutil: check for missing certificate and key files (issue5598)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 10 Jul 2017 21:09:46 -0700] rev 33381
sslutil: check for missing certificate and key files (issue5598) Currently, sslutil._hostsettings() performs validation that web.cacerts exists. However, client certificates are passed in to the function and not all callers may validate them. This includes httpconnection.readauthforuri(), which loads the [auth] section. If a missing file is specified, the ssl module will raise a generic IOException. And, it doesn't even give us the courtesy of telling us which file is missing! Mercurial then prints a generic "abort: No such file or directory" (or similar) error, leaving users to scratch their head as to what file is missing. This commit introduces explicit validation of all paths passed as arguments to wrapsocket() and wrapserversocket(). Any missing file is alerted about explicitly. We should probably catch missing files earlier - as part of loading the [auth] section. However, I think the sslutil functions should check for file presence regardless of what callers do because that's the only way to be sure that missing files are always detected.
Fri, 07 Jul 2017 08:55:12 -0700 match: override matchfn instead of __call__ for consistency
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jul 2017 08:55:12 -0700] rev 33380
match: override matchfn instead of __call__ for consistency The matchers that were recently moved into core from the sparse extension override __call__, while the previously existing matchers override matchfn. Let's switch to the latter for consistency.
Sun, 09 Jul 2017 17:02:09 -0700 match: express anypats(), not prefix(), in terms of the others
Martin von Zweigbergk <martinvonz@google.com> [Sun, 09 Jul 2017 17:02:09 -0700] rev 33379
match: express anypats(), not prefix(), in terms of the others When I added prefix() in 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28), we already had always(), isexact(), and anypats(), so it made sense to write it in terms of them (a prefix matcher is one that isn't any of the other types). It's only now that I realize that it's much more natural to define prefix() explicitly (it's one that uses path: patterns, roughly speaking) and let anypats() be defined in terms of the others. Remember that these methods are all used for determining which fast paths are possible. anypats() simply means that no fast paths are possible (it could be called complex() instead). Further evidence is that rootfilesin:some/dir does not have any patterns, but it's still considered to be an anypats() matcher. That's because anypats() really just means that it's not a prefix() matcher (and not always() and not isexact()). This patch thus changes prefix() to return False by default and anypats() to return True only if the other three are False. Having anypats() be True by default also seems like a good thing, because it means forgetting to override it will lead only to performance bugs, not correctness bugs. Since the base class's implementation changes, we're also forced to update the subclasses. That change exposed and fixed a bug in the differencematcher: for example when both its two input matchers were prefix matchers, we would say that the result was also a prefix matcher, which is incorrect, because e.g "path:dir - path:dir/foo" no longer matches everything under "dir" (which is what prefix() means).
Sun, 09 Jul 2017 15:19:27 -0700 match: make nevermatcher an exact matcher and a prefix matcher
Martin von Zweigbergk <martinvonz@google.com> [Sun, 09 Jul 2017 15:19:27 -0700] rev 33378
match: make nevermatcher an exact matcher and a prefix matcher The m.isexact() and m.prefix() methods are used by callers to determine whether m.files() can be used for fast paths. It seems safe to let callers to any fast paths it can that rely on the empty m.files().
Mon, 10 Jul 2017 10:56:40 -0700 revset: define successors revset
Jun Wu <quark@fb.com> [Mon, 10 Jul 2017 10:56:40 -0700] rev 33377
revset: define successors revset This revset returns all successors, including transit nodes and the source nodes (to be consistent with existing revsets like "ancestors"). To filter out transit nodes, use `successors(X)-obsolete()`. To filter out divergent case, use `successors(X)-divergent()-obsolete()`. The revset could be useful to define rebase destination, like: `max(successors(BASE)-divergent()-obsolete())`. The `max` is to deal with splits. There are other implementations where `successors` returns just one level of successors, and `allsuccessors` returns everything. I think `successors` returning all successors by default is more user friendly. We have seen cases in production where people use 1-level `successors` while they really want `allsuccessors`. So it seems better to just have one single revset returning all successors by default to avoid user errors. In the future we might want to add `depth` keyword argument to it and for other revsets like `ancestors` etc. Or even build some flexible indexing syntax [1] to satisfy people having the depth limit requirement. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-July/101140.html
Mon, 10 Jul 2017 21:55:43 -0700 sparse: shorten try..except block in updateconfig()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 10 Jul 2017 21:55:43 -0700] rev 33376
sparse: shorten try..except block in updateconfig() It now only covers refreshwdir(). This is what importfromfiles() does. I think it is the more appropriate behavior.
Mon, 10 Jul 2017 21:43:19 -0700 sparse: clean up updateconfig()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 10 Jul 2017 21:43:19 -0700] rev 33375
sparse: clean up updateconfig() * Use context manager for wlock * Rename oldsparsematch to oldmatcher * Always call parseconfig() because parsing an empty string yields the same result as the old code
Mon, 10 Jul 2017 21:39:49 -0700 sparse: move config updating function into core
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 10 Jul 2017 21:39:49 -0700] rev 33374
sparse: move config updating function into core As part of the move, the ui argument was dropped. Additional fixups will be made in a follow-up commit.
Sat, 08 Jul 2017 16:18:04 -0700 dirstate: expose a sparse matcher on dirstate (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 16:18:04 -0700] rev 33373
dirstate: expose a sparse matcher on dirstate (API) The sparse extension performs a lot of monkeypatching of dirstate to make it sparse aware. Essentially, various operations need to take the active sparse config into account. They do this by obtaining a matcher representing the sparse config and filtering paths through it. The monkeypatching is done by stuffing a reference to a repo on dirstate and calling sparse.matcher() (which takes a repo instance) during each function call. The reason this function takes a repo instance is because resolving the sparse config may require resolving file contents from filelogs, and that requires a repo. (If the current sparse config references "profile" files, the contents of those files from the dirstate's parent revisions is resolved.) I seem to recall people having strong opinions that the dirstate object not have a reference to a repo. So copying what the sparse extension does probably won't fly in core. Plus, the dirstate modifications shouldn't require a full repo: they only need a matcher. So there's no good reason to stuff a reference to the repo in dirstate. This commit exposes a sparse matcher to dirstate via a property that when looked up will call a function that eventually calls sparse.matcher(). The repo instance is bound in a closure, so it isn't exposed to dirstate. This approach is functionally similar to what the sparse extension does today, except it hides the repo instance from dirstate. The approach is not optimal because we have to call a proxy function and sparse.matcher() on every property lookup. There is room to cache the matcher instance in dirstate. After all, the matcher only changes if the dirstate's parents change or if the sparse config changes. It feels like we should be able to detect both events and update the matcher when this occurs. But for now we preserve the existing semantics so we can move the dirstate sparseness bits into core. Once in core, refactoring becomes a bit easier since it will be clearer how all these components interact. The sparse extension has been updated to use the new property. Because all references to the repo on dirstate have been removed, the code for setting it has been removed.
Sat, 08 Jul 2017 15:42:11 -0700 sparse: use self instead of repo.dirstate
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 15:42:11 -0700] rev 33372
sparse: use self instead of repo.dirstate "self" here is the dirstate instance. I'm pretty confident that self and repo.dirstate will be the exact same object. So remove a dependency on repo by just looking at self.
Sat, 08 Jul 2017 14:15:07 -0700 sparse: move code for importing rules from files into core
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 14:15:07 -0700] rev 33371
sparse: move code for importing rules from files into core This is a pretty straightforward port. Some code cleanup was performed. But no major changes to the logic were made. I'm not a huge fan of this function because it does multiple things. I'd like to get things into core first to facilitate refactoring later. Please also note the added inline comment about the oddities of writeconfig() and the try..except to undo it. This is because of the hackiness in which the sparse matcher is obtained by various consumers, notably dirstate. We'll need a massive refactor to address this. That refactor is effectively blocked on having the sparse dirstate hacks live in core.
Sat, 08 Jul 2017 14:01:32 -0700 sparse: refactor activeprofiles into a generic function (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 14:01:32 -0700] rev 33370
sparse: refactor activeprofiles into a generic function (API) activeprofiles() is a special case of a more generic function. Furthermore, that generic function is essentially already implemented inline in the sparse extension. So, refactor activeprofiles() to a generic activeconfig(). Change the only consumer of activeprofiles() to use it. And have the inline implementation in the sparse extension use it.
Fri, 07 Jul 2017 15:11:11 -0400 check-code: prohibit `if False` antipattern
Augie Fackler <raf@durin42.com> [Fri, 07 Jul 2017 15:11:11 -0400] rev 33369
check-code: prohibit `if False` antipattern Differential Revision: https://phab.mercurial-scm.org/D20
Fri, 07 Jul 2017 15:08:23 -0400 convert: remove `if False` block
Augie Fackler <raf@durin42.com> [Fri, 07 Jul 2017 15:08:23 -0400] rev 33368
convert: remove `if False` block This code has never run since its introduction on July 18th, 2007. It's time for it to go. Differential Revision: https://phab.mercurial-scm.org/D19
Fri, 07 Jul 2017 15:07:36 -0400 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com> [Fri, 07 Jul 2017 15:07:36 -0400] rev 33367
filterpyflakes: move self-test into test file This will avoid a false positive on an upcoming check-code rule. Differential Revision: https://phab.mercurial-scm.org/D18
Sun, 09 Jul 2017 16:38:04 -0400 test-subrepo: demonstrate a status problem when merge deletes a file
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 16:38:04 -0400] rev 33366
test-subrepo: demonstrate a status problem when merge deletes a file At the interactive update prompt, if (c) is chosen and then followed by `hg rm`, both `status -R` and `status -S` show the file as 'R', and `files -R` shows no files (OK, because explicitly removed files aren't supposed to be listed). If `rm` follows selecting (c), then both flavors of `status` list the file as '!', and `files -R` lists the missing file. So somehow, the (d) option has followed a third path.
Sun, 09 Jul 2017 16:13:30 -0400 subrepo: make the output references to subrepositories consistent
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 16:13:30 -0400] rev 33365
subrepo: make the output references to subrepositories consistent Well, mostly. The annotation on subrepo functions tacks on a parenthetical to the abort message, which seems reasonable for a generic mechanism. But now all messages consistently spell out 'subrepository', and double quote the name of the repo. I noticed the inconsistency in the change for the last commit.
Sun, 09 Jul 2017 02:55:46 -0400 subrepo: consider the parent repo dirty when a file is missing
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 02:55:46 -0400] rev 33364
subrepo: consider the parent repo dirty when a file is missing This simply passes the 'missing' argument down from the context of the parent repo, so the same rules apply. subrepo.bailifchanged() is hardcoded to care about missing files, because cmdutil.bailifchanged() is too. In the end, it looks like this addresses inconsistencies with 'archive', 'identify', blackbox logs, 'merge', and 'update --check'. I wasn't sure how to implement this in git, so that's left for someone more familiar with it.
Sun, 09 Jul 2017 02:46:03 -0400 archival: flag missing files as a dirty wdir() in the metadata file (BC)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 02:46:03 -0400] rev 33363
archival: flag missing files as a dirty wdir() in the metadata file (BC) Since the identify command adds a '+' for missing files, it's reasonable that this does too. Perhaps the node field's hex value should be p1+p2 for merges?
Sun, 09 Jul 2017 00:53:16 -0400 cmdutil: simplify the dirty check in howtocontinue()
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 00:53:16 -0400] rev 33362
cmdutil: simplify the dirty check in howtocontinue() This is equivalent to the previous code. But it seems to me that if the user is going to be prompted that a commit is needed, missing files should be ignored, but branch and merge changes shouldn't be.
Sun, 09 Jul 2017 00:23:03 -0400 blackbox: simplify the dirty check
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 00:23:03 -0400] rev 33361
blackbox: simplify the dirty check Same idea (and possibly incorrect behavior) as the previous commit.
Sun, 09 Jul 2017 00:19:03 -0400 identify: simplify the dirty check
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 00:19:03 -0400] rev 33360
identify: simplify the dirty check This is equivalent to the previous code, but it seems better to be explicit about what aspects of dirty are being ignored. Perhaps they shouldn't be, since the help text says 'followed by a "+" if the working directory has uncommitted changes'. Both merges and branch changes are committable, even if the files are unchanged. Additionally, this will make the `identify` command notice missing subrepo files, once subrepos are taught to look for missing files.
Sun, 09 Jul 2017 00:05:31 -0400 tests: tweak the subrepo dirty state tests
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Jul 2017 00:05:31 -0400] rev 33359
tests: tweak the subrepo dirty state tests This is a continuation of 439b4d005b4a. I overlooked that blackbox logs also have a dirty marker. Also, the `hg update --check` test was updating to a revision where the deleted file wasn't tracked, which is why status seemed to show the deleted file was restored.
Sun, 09 Jul 2017 23:01:11 -0700 match: combine regex code for path: and relpath:
Martin von Zweigbergk <martinvonz@google.com> [Sun, 09 Jul 2017 23:01:11 -0700] rev 33358
match: combine regex code for path: and relpath: The regexes for path: and relpath: patterns are the same (since the paths have already been normalized at the point we create the regexes). I don't think the "if pat == '.'" will have any effect relpath: because relpath: patterns will have the root directory already normalized to '' by pathutil.canonpath() (unlike path:, for which the root gets normalized to '.' by util.normpath()).
Sun, 09 Jul 2017 22:53:02 -0700 match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com> [Sun, 09 Jul 2017 22:53:02 -0700] rev 33357
match: remove unnecessary '^' from regexes The regexes are passed to re.match(), which matches against the beginning of the input, so the '^' doesn't do anything. Note that unrooted patterns, such as globs and regexes from .hgignore are instead achieved by adding '.*' to the expression given by the user. (That's unless the user's expression started with '^', in which case the '.*' is not added, perhaps to keep the regex cleaner?)
Thu, 06 Jul 2017 22:20:38 -0700 sparse: access status fields by name instead of deconstructing it
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jul 2017 22:20:38 -0700] rev 33356
sparse: access status fields by name instead of deconstructing it The status tuples has had named fields for a few years now.
Sat, 08 Jul 2017 13:34:19 -0700 sparse: move printing of sparse config changes function into core
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 13:34:19 -0700] rev 33355
sparse: move printing of sparse config changes function into core As part of the port, all arguments now have default values of 0. Strings are now also given the i18n treatment.
Sat, 08 Jul 2017 13:19:38 -0700 sparse: move code for clearing rules to core
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Jul 2017 13:19:38 -0700] rev 33354
sparse: move code for clearing rules to core This is a pretty straightforward port.
Fri, 07 Jul 2017 11:51:10 -0700 sparse: move post commit actions into core
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Jul 2017 11:51:10 -0700] rev 33353
sparse: move post commit actions into core Instead of wrapping committablectx.markcommitted(), we inline the call into workingctx.markcommitted(). Per smf's review, workingctx is the proper location for this code, as committablectx is the shared base class for it and memctx. Since this code touches the working directory, it belongs in workingctx.
Sun, 09 Jul 2017 15:11:19 +0200 cleanupnode: do not use generator for node mapping
Octobus <contact@octobus.net> [Sun, 09 Jul 2017 15:11:19 +0200] rev 33352
cleanupnode: do not use generator for node mapping The 'successors' part of the mappings used of be a tuple. This avoid issue from code consuming the generator "by mistake". For example, an extension inspecting the mapping content used to be able to iterate over the successors mapping without consequence. Since the mapping are small we do not expect any performance impact we use tuple again for this.
Sat, 08 Jul 2017 16:50:31 -0700 histedit: use scmutil.cleanupnodes (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:50:31 -0700] rev 33351
histedit: use scmutil.cleanupnodes (BC) This is marked as BC because the strip backup file name has changed.
Sat, 08 Jul 2017 16:50:31 -0700 histedit: unify strip backup files on success (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:50:31 -0700] rev 33350
histedit: unify strip backup files on success (BC) Previously we wrote two different strip backup files on success. This patch unifies them. It will make scmutil.cleanupnodes migration more smooth.
Sat, 08 Jul 2017 16:50:31 -0700 histedit: pass multiple nodes to strip (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:50:31 -0700] rev 33349
histedit: pass multiple nodes to strip (BC) Previously, histedit.cleanupnode pass root nodes one by one. Since repair.strip takes multiple nodes and can handle them just fine, pass all strip roots at once. This is BC because the number of strip backup files may change from N to 1.
Sat, 08 Jul 2017 16:50:31 -0700 histedit: remove "name" parameter from cleanupnode functions
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:50:31 -0700] rev 33348
histedit: remove "name" parameter from cleanupnode functions The "name" parameter is not used any longer so let's remove it.
Sat, 08 Jul 2017 16:50:31 -0700 histedit: remove "should strip" debug message
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:50:31 -0700] rev 33347
histedit: remove "should strip" debug message The debug message was not used anywhere. Removed it to make scmutil.cleanupnodes migration easier to reason about.
Sat, 08 Jul 2017 16:47:25 -0700 histedit: move topmost bookmark movement to a separate function
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:47:25 -0700] rev 33346
histedit: move topmost bookmark movement to a separate function histedit treats topmost bookmark movement specially. The rest of the bookmark movement could be handled by scmutil.cleanupnodes. So let's move the special logic out to make the patch easier to review.
Sat, 08 Jul 2017 16:04:21 -0700 histedit: remove moving bookmarks message on verbose (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 16:04:21 -0700] rev 33345
histedit: remove moving bookmarks message on verbose (BC) This is more consistent with other commands, like "commit -v" won't show bookmark movement messages. It will make migrating to scmutil.cleanupnodes easier.
Sat, 08 Jul 2017 18:47:50 -0400 test-largefiles-update: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 18:47:50 -0400] rev 33344
test-largefiles-update: conditionalize output instead of tests
Sat, 08 Jul 2017 18:46:43 -0400 test-status-rev: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 18:46:43 -0400] rev 33343
test-status-rev: conditionalize output instead of tests
Sat, 08 Jul 2017 18:46:12 -0400 test-mq: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 18:46:12 -0400] rev 33342
test-mq: conditionalize output instead of tests
Sat, 08 Jul 2017 18:38:44 -0400 test-annotate: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 18:38:44 -0400] rev 33341
test-annotate: conditionalize output instead of tests
Sat, 08 Jul 2017 18:37:41 -0400 test-addremove: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 18:37:41 -0400] rev 33340
test-addremove: conditionalize output instead of tests
Sat, 08 Jul 2017 14:21:11 -0400 test-tools: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 14:21:11 -0400] rev 33339
test-tools: conditionalize output instead of tests
Sat, 08 Jul 2017 14:15:01 -0400 test-rebase: conditionalize output instead of tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 14:15:01 -0400] rev 33338
test-rebase: conditionalize output instead of tests This should help prevent breakage like was fixed in the last patch.
Sat, 08 Jul 2017 14:10:10 -0400 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Jul 2017 14:10:10 -0400] rev 33337
tests: stabilize on Windows I'm not sure if the difference on Windows for test-sparse.t is expected or not. It looks like unless the leading '/' is followed by a drive letter, '/' is resolved to 'C:/MinGW/msys/1.0'. But both cases abort with "not under root" instead of just warning.
Sat, 24 Jun 2017 15:29:42 -0700 revset: make repo.anyrevs accept customized alias override (API)
Jun Wu <quark@fb.com> [Sat, 24 Jun 2017 15:29:42 -0700] rev 33336
revset: make repo.anyrevs accept customized alias override (API) Previously repo.anyrevs only expand aliases in [revsetalias] config. This patch makes it more flexible to accept a customized dict defining aliases without having to couple with ui. revsetlang.expandaliases now has the signature (tree, aliases, warn=None) which is more consistent with templater.expandaliases. revsetlang.py is now free from "ui", which seems to be a good thing.
Fri, 07 Jul 2017 01:05:20 -0400 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 07 Jul 2017 01:05:20 -0400] rev 33335
tests: quote $PYTHON for Windows When unquoted, MSYS sees the colon between the drive letter and path as a Unix path separator and unhelpfully splits on it, feeding only the drive letter as the command. Much chaos ensues. I vaguely remember trying to get the test runner to use /letter/path/to/exe syntax the last time this happened, without success. I doubt a check-code rule would work, since sometimes it is quoted, and sometimes the quotes are escaped.
Mon, 26 Jun 2017 15:28:28 -0700 amend: use scmutil.cleanupnodes (BC)
Jun Wu <quark@fb.com> [Mon, 26 Jun 2017 15:28:28 -0700] rev 33334
amend: use scmutil.cleanupnodes (BC) This is marked as BC because the strip backup file name has changed.
Fri, 07 Jul 2017 19:03:03 -0700 rebase: remove "if True"
Jun Wu <quark@fb.com> [Fri, 07 Jul 2017 19:03:03 -0700] rev 33333
rebase: remove "if True" The "if True" block was to make the last patch easier to review. This patch removes "if True" and unindents the block.
Fri, 07 Jul 2017 18:51:46 -0700 rebase: use scmutil.cleanupnodes (issue5606) (BC)
Jun Wu <quark@fb.com> [Fri, 07 Jul 2017 18:51:46 -0700] rev 33332
rebase: use scmutil.cleanupnodes (issue5606) (BC) This patch migrates rebase to use scmutil.cleanupnodes API. It simplifies the code and makes rebase code reusable inside a transaction. This is a BC because the backup file is no longer strip-backup/*-backup.hg, but strip-backup/*-rebase.hg. The latter looks more reasonable since the directory name is "strip-backup" so there is no need to repeat "backup". I think the backup file name change is probably fine as a BC, since we have changed it before (aa4a1672583e) and didn't get complains. The end result of this series will be a much more consistent and unified backup names: command | old backup file suffix | new backup file suffix ------------------------------------------------------------------- amend | amend-backup.hg | amend.hg histedit | backup.hg (could be 2 files) | histedit.hg (single file) rebase | backup.hg | rebase.hg strip | backup.hg | backup.hg (note: backup files are under .hg/strip-backup) It also fixes issue5606 as a side effect because the new "delayedstrip" code path will carefully examine nodes (safestriproots) to make sure orphaned changesets won't get stripped by accident. Some warning messages are changed to the new "warning: orphaned descendants detected, not stripping HASHES", which provides more information about exactly what changesets are left behind. Another minor behavior change is when there is an obsoleted changeset with a successor in the destination branch, bookmarks pointing to that obsoleted changeset will not be moved. I have commented in test-rebase-obsolete.t explaining why that is more desirable.
Mon, 26 Jun 2017 13:13:51 -0700 scmutil: make cleanupnodes delete divergent bookmarks
Jun Wu <quark@fb.com> [Mon, 26 Jun 2017 13:13:51 -0700] rev 33331
scmutil: make cleanupnodes delete divergent bookmarks cleanupnodes takes care of bookmark movement, and bookmark movement could cause bookmark divergent resolution as a side effect. This patch adds such bookmark divergent resolution logic so future rebase migration will be easier. The revset is carefully written to be equivalent to what rebase does today. Although I think it might make sense to remove divergent bookmarks more aggressively, for example: F book@1 | E book@2 | | D book | | | C |/ B book@3 | A When rebase -s C -d E, "book@1" will be removed, "book@3" will be kept, and the end result is: D book | C | F | E book@2 (?) | B book@3 | A The question is should we keep book@2? The current logic keeps it. If we choose not to (makes some sense to me), the "deleterevs" revset could be simplified to "newnode % oldnode". For now, I just make it compatible with the existing behavior. If we want to make the "deleterevs" revset simpler, we can always do it in the future.
Mon, 26 Jun 2017 15:08:37 -0700 scmutil: make cleanupnodes handle filtered node
Jun Wu <quark@fb.com> [Mon, 26 Jun 2017 15:08:37 -0700] rev 33330
scmutil: make cleanupnodes handle filtered node In some valid usecases, the "mapping" received by scmutil.cleanupnodes have filtered nodes. Use unfiltered repo to access them correctly. The added test case will fail with the old cleanupnodes code. This is important to migrate histedit to use the cleanupnodes API.
Fri, 07 Jul 2017 08:33:10 +0200 configitems: add alias support in config
David Demelier <demelier.david@gmail.com> [Fri, 07 Jul 2017 08:33:10 +0200] rev 33329
configitems: add alias support in config Aliases define optional alternatives to existing options. For example the old option ui.user was deprecated and replaced by ui.username. With this mechanism, it's even possible to create an alias to an option in a different section. Add ui.user as alias to ui.username as an example of this concept. The old alternates principle in ui.config is removed as it was used only for this option.
Mon, 03 Jul 2017 13:04:35 +0200 hgweb: use ui._unset to prevent a warning in configitems
David Demelier <demelier.david@gmail.com> [Mon, 03 Jul 2017 13:04:35 +0200] rev 33328
hgweb: use ui._unset to prevent a warning in configitems
Fri, 07 Jul 2017 00:13:53 -0700 dispatch: fix typo suggestion for disabled extension
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jul 2017 00:13:53 -0700] rev 33327
dispatch: fix typo suggestion for disabled extension If the matching command lives in an in-tree extension (which is all we scan for), and the user has disabled that extension with "extensions.<name>=!", we were not finding it, because the path in _disabledextensions was the empty string. If the user had set "extensions.<name>=!<valid path>" it would work, so it seems like just a mistake that it didn't work.
Fri, 07 Jul 2017 00:12:44 -0700 tests: add tests for typoed commands
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jul 2017 00:12:44 -0700] rev 33326
tests: add tests for typoed commands This includes one test showing how disabling a command with e.g. "extensions.rebase=!" results in the command not being suggested. We'll fix that next.
Thu, 06 Jul 2017 16:10:28 -0700 sparse: inline signature cache clearing
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Jul 2017 16:10:28 -0700] rev 33325
sparse: inline signature cache clearing It is a trivial one-liner. No need to have a separate function.
Thu, 06 Jul 2017 14:53:08 -0700 sparse: move working directory refreshing into core
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Jul 2017 14:53:08 -0700] rev 33324
sparse: move working directory refreshing into core This is a pretty straightforward move of the code. I converted the "force" argument to a keyword argument. Like other recent changes, this code is tightly coupled with working directory update code in merge.py. I suspect the code will become more tightly coupled over time, possibly even moved to merge.py. For now, let's get the code in core.
Thu, 06 Jul 2017 16:29:31 -0700 sparse: refactor update actions filtering and call from core
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Jul 2017 16:29:31 -0700] rev 33323
sparse: refactor update actions filtering and call from core merge.calculateupdates() now filters the update actions through sparse by default. The filtering no-ops if sparse isn't enabled or no sparse config is defined. The function has been refactored to behave more like a filter instead of a wrapper of merge.calculateupdates(). We should arguably take sparse into account earlier in merge.calculateupdates(). This patch preserves the old behavior of applying sparse at the end of update calculation, which is the simplest and safest approach.
Thu, 06 Jul 2017 16:17:35 -0700 sparse: move update action filtering into core
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Jul 2017 16:17:35 -0700] rev 33322
sparse: move update action filtering into core This is a relatively straight port of the function. It is pretty large. So refactoring will be postponed to a subsequent commit.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip