Fri, 04 Sep 2020 11:55:07 +0200 hg-core: Add a limited read only `revlog` implementation
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 04 Sep 2020 11:55:07 +0200] rev 45526
hg-core: Add a limited read only `revlog` implementation Only covers the needs of the upcoming `rhg debugdata` command. Differential Revision: https://phab.mercurial-scm.org/D8958
Wed, 16 Sep 2020 18:09:32 +0530 mergestate: define NO_OP_ACTION in module scope instead of inside mergeresult
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Sep 2020 18:09:32 +0530] rev 45525
mergestate: define NO_OP_ACTION in module scope instead of inside mergeresult This makes sure it isn't intended to be overridden by subclasses. Thanks to Yuya for the nice suggestion. Differential Revision: https://phab.mercurial-scm.org/D9025
Wed, 09 Sep 2020 16:49:19 +0530 mergestate: introduce a new ACTION_KEEP_NEW
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 09 Sep 2020 16:49:19 +0530] rev 45524
mergestate: introduce a new ACTION_KEEP_NEW `ACTION_KEEP` is overloaded and it's hard to figure out how we end up with this KEEP, what was the state of things. In a previous patch, we introduced `ACTION_KEEP_ABSENT` which represents files which are kept absent in the working directory. There is another special case where we keep the file when it's not present on both ancestor and remote side. We introduce a dedicated action for that. The goal is to use these information to make bid merge smarter. Differential Revision: https://phab.mercurial-scm.org/D9002
Wed, 23 Sep 2020 15:36:15 -0700 repoview: don't crash if mergestate points to non-existent node stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 23 Sep 2020 15:36:15 -0700] rev 45523
repoview: don't crash if mergestate points to non-existent node Differential Revision: https://phab.mercurial-scm.org/D9078
Wed, 23 Sep 2020 16:07:14 -0700 tests: demonstrate crash caused by pinning of non-existent mergestate node stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 23 Sep 2020 16:07:14 -0700] rev 45522
tests: demonstrate crash caused by pinning of non-existent mergestate node If the mergestate somehow contains a reference to a non-existent node, it causes most commands to crash since aaeccdb6e654 (repoview: pin revisions for `local` and `other` when a merge is active, 2020-09-04). This patch adds a test showing that. Differential Revision: https://phab.mercurial-scm.org/D9077
Mon, 21 Sep 2020 10:23:25 -0400 git: also convert timezone to int (issue6359)
Augie Fackler <augie@google.com> [Mon, 21 Sep 2020 10:23:25 -0400] rev 45521
git: also convert timezone to int (issue6359) Credit to moshez for testing this in the wild. Differential Revision: https://phab.mercurial-scm.org/D9062
Fri, 18 Sep 2020 16:26:37 -0700 chg: fallback to original hg if stdio fds are missing
Jun Wu <quark@fb.com> [Fri, 18 Sep 2020 16:26:37 -0700] rev 45520
chg: fallback to original hg if stdio fds are missing If stdio fds are missing (ex. fd 0 is not present), chg might open fds that take the numbers 0, and attachio would send the wrong fds to the client, which might cause unwanted behaviors. Avoid that by detecting the missing fds and falling back to the original hg. Differential Revision: https://phab.mercurial-scm.org/D9058
Fri, 18 Sep 2020 08:27:43 -0700 locking: remove support for inheriting locks in subprocess
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 08:27:43 -0700] rev 45519
locking: remove support for inheriting locks in subprocess This seems to have been added for merge driver, and since merge driver is now gone... Differential Revision: https://phab.mercurial-scm.org/D9053
Thu, 17 Sep 2020 22:34:36 -0700 mergedriver: delete it
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 22:34:36 -0700] rev 45518
mergedriver: delete it The merge driver code was added in late 2015. I think '406a654b::6f045b56 & user("sid0")' is a reasonable revset for finding the relevant commits, including preparation for it. The code is very poorly tested, which makes it very hard to maintain. It seems it's only used by FB and they don't use this code base anymore, so let's remove the code to make it easier for us to maintain our product. Differential Revision: https://phab.mercurial-scm.org/D9041
Sun, 06 Sep 2020 10:33:12 +0200 rust-cpython: switch logging facade from `simple_logger` to `env_logger`
Raphaël Gomès <rgomes@octobus.net> [Sun, 06 Sep 2020 10:33:12 +0200] rev 45517
rust-cpython: switch logging facade from `simple_logger` to `env_logger` `simple_logger` is just too simple. `env_logger` supports logging to `stderr`, and logging filtering, for example, which are becoming necessary now. The project is nicely active. Differential Revision: https://phab.mercurial-scm.org/D8990
Tue, 22 Sep 2020 09:06:09 -0400 git: pass `id` attribute of `pygit2.Tree` object
Connor Sheehan <sheehan@mozilla.com> [Tue, 22 Sep 2020 09:06:09 -0400] rev 45516
git: pass `id` attribute of `pygit2.Tree` object `pygit2`'s Repository object expects an instance of `Oid` to return the corresponding object, instead of the object itself. After this change and D9062, `hg commit -i` seems to work, unless it hits a case folding assertion (ie trying to add a file like `README.md`). Differential Revision: https://phab.mercurial-scm.org/D9068
Wed, 16 Sep 2020 12:13:46 -0700 branchmap: add a cache validation cache, avoid expensive re-hash on every use
Kyle Lippincott <spectral@google.com> [Wed, 16 Sep 2020 12:13:46 -0700] rev 45515
branchmap: add a cache validation cache, avoid expensive re-hash on every use In a pathological `hg log` case, we end up executing the branchmap validity checking twice per commit displayed. Or maybe we always do, and I just noticed because it's really slow in this repo for some reason. Before: ``` Time (mean ± σ): 9.816 s ± 0.071 s [User: 9.435 s, System: 0.392 s] Range (min … max): 9.709 s … 9.920 s ``` After: ``` Time (mean ± σ): 8.671 s ± 0.078 s [User: 8.309 s, System: 0.392 s] Range (min … max): 8.594 s … 8.816 s ``` Differential Revision: https://phab.mercurial-scm.org/D9023
Mon, 21 Sep 2020 15:05:38 -0400 merge with stable
Augie Fackler <augie@google.com> [Mon, 21 Sep 2020 15:05:38 -0400] rev 45514
merge with stable
Wed, 16 Sep 2020 19:32:53 +0200 run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351)
Antoine cezar<acezar@chwitlabs.fr> [Wed, 16 Sep 2020 19:32:53 +0200] rev 45513
run-test: allow relative path in `--blacklist` and `--whitelist` (issue6351) When specifying a test with `--blacklist` or `--whitelist` with path relatives to the repository root (eg: `tests/test-check-commit.t`) the file is not taken into account. It only works when the name of the test is given. It would be better if `--blacklist` and `--whitelist` behaviors where compatible with `--test-list`. This patch allows to use relative path with `--blacklist` and `--whitelist` while staying compatible with the old behavior by checking the test relative path in addition to its name. Differential Revision: https://phab.mercurial-scm.org/D9024
Fri, 18 Sep 2020 15:10:14 -0700 rebase: stop clearing on-disk mergestate when running in memory
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 15:10:14 -0700] rev 45512
rebase: stop clearing on-disk mergestate when running in memory In-memory merge no longer uses on-disk mergestate since 19590b126764 (merge: use in-memory mergestate when using in-memory context, 2020-09-15). This patch removes the clearing from two places in the in-memory rebase code. I've verified that the one with a TODO was indeed fixed by the aforementioned commit. The other instance doesn't seem to have any test coverage, but I'm pretty confident it's also safe to remove. Differential Revision: https://phab.mercurial-scm.org/D9057
Fri, 18 Sep 2020 10:15:13 -0700 rebase: delete unused p1 argument to _concludenode()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 10:15:13 -0700] rev 45511
rebase: delete unused p1 argument to _concludenode() Unused since a0192a03216d (rebase: remove now unnecessary logic to allow empty commit when branch changes, 2020-07-09). Differential Revision: https://phab.mercurial-scm.org/D9055
Fri, 18 Sep 2020 10:04:02 -0700 rebase: fix an inconsistent hyphenation in a debug message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 10:04:02 -0700] rev 45510
rebase: fix an inconsistent hyphenation in a debug message We used "rebasing on disk" but "rebasing in-memory". I believe the former is correct, so I used that. Differential Revision: https://phab.mercurial-scm.org/D9054
Fri, 18 Sep 2020 12:20:28 +0200 strip: with --keep, consider all revs "removed" from the wcp (issue6270) stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 18 Sep 2020 12:20:28 +0200] rev 45509
strip: with --keep, consider all revs "removed" from the wcp (issue6270) The current code was blink to change from other branches when stripping merges that are ancestors of the working copy parents.
Fri, 18 Sep 2020 12:10:12 +0200 test-strip: display more information highlight buggy behavior stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 18 Sep 2020 12:10:12 +0200] rev 45508
test-strip: display more information highlight buggy behavior When using `hg strip --keep` on a set of changeset that contains a merge, the set of file considered when rebuilding the dirstate is missing files updated by changeset that are not directly inside the `new-parent::old-parent` range. We start with updating the test with new output highlighting the issue. This issue was spotted because that dirstate inconsistency made the test flaky. The new command make the test less flaky (but still wrong).
Tue, 15 Sep 2020 15:03:07 +0200 changing-files: implement equality checking
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Sep 2020 15:03:07 +0200] rev 45507
changing-files: implement equality checking This makes debugging simpler.
Thu, 17 Sep 2020 11:21:13 +0200 changing-files: document the various sets
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 17 Sep 2020 11:21:13 +0200] rev 45506
changing-files: document the various sets The content of some sets (eg: added, removed) is not always obvious so we document them.
Fri, 18 Sep 2020 10:48:43 -0400 merge with stable
Augie Fackler <augie@google.com> [Fri, 18 Sep 2020 10:48:43 -0400] rev 45505
merge with stable
Fri, 18 Sep 2020 20:19:52 +0900 share: do not write working-copy requirements twice
Yuya Nishihara <yuya@tcha.org> [Fri, 18 Sep 2020 20:19:52 +0900] rev 45504
share: do not write working-copy requirements twice Follows up d252f51ab032. Maybe it is a copy-paste error.
Sun, 13 Sep 2020 15:59:23 +0900 py3: fix formatting of LookupError for workingctx stable
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Sep 2020 15:59:23 +0900] rev 45503
py3: fix formatting of LookupError for workingctx Spotted while writing broken tests for "hg grep -fr'wdir()'". basectx._fileinfo() raises ManifestLookupError(self._node, ..), but _node of the workingctx is None for historical reasons.
Thu, 17 Sep 2020 22:45:51 -0700 phabricator: fix loadhgrc() override broken by D8656
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 22:45:51 -0700] rev 45502
phabricator: fix loadhgrc() override broken by D8656 This fixes some failing `test-check*` tests (at least `test-check-code.t` was broken). Differential Revision: https://phab.mercurial-scm.org/D9044
Thu, 17 Sep 2020 23:09:47 -0700 mergestate: move commit() from base class to on-disk subclass
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 23:09:47 -0700] rev 45501
mergestate: move commit() from base class to on-disk subclass The commit message doesn't do anything in the in-memory case, and it's `_makerecords()` is also not needed in that case, so let's move it down to the on-disk subclass (i.e. the `mergestate` class). Sorry I missed this earlier. Differential Revision: https://phab.mercurial-scm.org/D9043
Thu, 17 Sep 2020 23:12:48 -0700 mergestate: make in-memory mergestate not clear on-disk mergestate on reset()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 23:12:48 -0700] rev 45500
mergestate: make in-memory mergestate not clear on-disk mergestate on reset() Oops, I thought I had remove the `rmtree()` call earlier. Maybe I accidentally got it back in a histedit or something. Differential Revision: https://phab.mercurial-scm.org/D9042
Tue, 15 Sep 2020 16:10:16 -0700 merge: use in-memory mergestate when using in-memory context
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Sep 2020 16:10:16 -0700] rev 45499
merge: use in-memory mergestate when using in-memory context This is my version of Augie's D8568. It makes it so we don't touch the mergestate on disk when using an in-memory context. The reason that I want this is not the same as the reason that Augie write his patch (though I agree with that reason too). My hope is to make in-memory rebase not fall back to on-disk rebase when there are conflict. I plan to do that by adding a `overlayworkingctx.reflect_in_workingcopy()`. The idea is that that will update the working copy, the dirstate and the mergestate as necessary. Differential Revision: https://phab.mercurial-scm.org/D9040
Tue, 15 Sep 2020 11:17:24 -0700 mergestate: extract a base class to be shared by future memmergestate
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Sep 2020 11:17:24 -0700] rev 45498
mergestate: extract a base class to be shared by future memmergestate This extracts a new base class from `mergestate` and leaves all the vfs-touching code in `mergestate`. Differential Revision: https://phab.mercurial-scm.org/D9039
Tue, 15 Sep 2020 11:33:26 -0700 mergestate: extract overridable methods for making/restoring file backups
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Sep 2020 11:33:26 -0700] rev 45497
mergestate: extract overridable methods for making/restoring file backups In-memory merge currently still uses on-disk mergestate. That's mostly harmless (I don't think I've seen any problem it's actually caused). It's still a little weird. I'm planning to add an in-memory mergestate, which will be used with `overlayworkingctx`. This patch prepares for that by extracting that logic, so it's easier to change per subclass. Differential Revision: https://phab.mercurial-scm.org/D9038
Wed, 16 Sep 2020 13:39:26 -0700 mergestate: initialize all properties in __init__()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 16 Sep 2020 13:39:26 -0700] rev 45496
mergestate: initialize all properties in __init__() This is hopefully not very controverial. I found the initialization before this patch unorthodox. It wasn't clear which properties the object was supposed to have. Differential Revision: https://phab.mercurial-scm.org/D9037
Thu, 17 Sep 2020 19:33:55 -0700 mergestate: remove unnecessary clearing of `localctx` and `otherctx`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 19:33:55 -0700] rev 45495
mergestate: remove unnecessary clearing of `localctx` and `otherctx` As noted in the previous commit, there are no callers that (re-)use the instance after calling `reset()`. There are also no callers that call `_read()` after doing anything with the instance (it's only called right after an instance is created). If reviewers feel that this is too risky, I can extract and reuse the poisoning code that indygreg once added for poisining repo instances. Differential Revision: https://phab.mercurial-scm.org/D9036
Wed, 16 Sep 2020 13:25:49 -0700 mergestate: move most of of reset() into start()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 16 Sep 2020 13:25:49 -0700] rev 45494
mergestate: move most of of reset() into start() `ms.reset()` has somehow become a combination of two different things: 1. A constructor-like function creating an empty instance 2. A call to `shutil.rmtree()` to clear the mergestate. It seems that all callers now care only about the latter (since we changed one caller to use the new `ms.start()` method instead). Let's move the code for the former into `start()`, since that's the only place it's needed. Differential Revision: https://phab.mercurial-scm.org/D9035
Thu, 17 Sep 2020 09:23:21 -0700 mergestate: make clean() only be about creating a clean mergestate
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 09:23:21 -0700] rev 45493
mergestate: make clean() only be about creating a clean mergestate This is similar to the previous patch, but moves the separation one step further out, to `merge.py`. Differential Revision: https://phab.mercurial-scm.org/D9034
Wed, 16 Sep 2020 10:09:37 -0700 mergestate: split up reset() for its two use cases
Martin von Zweigbergk <martinvonz@google.com> [Wed, 16 Sep 2020 10:09:37 -0700] rev 45492
mergestate: split up reset() for its two use cases We only have one place that calls `ms.reset()` with any arguments. That place is `mergestate.clean()`. The callers that call the function with no arguments seem to all just want delete the mergestate -- none of them look at the instance after calling `reset()`. Let's separate out the two different use cases to make the code clearer. I'll clean up further soon. Differential Revision: https://phab.mercurial-scm.org/D9033
Tue, 15 Sep 2020 23:19:14 -0700 mergestate: simplify reset(), knowing that `other` and `node` go together
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Sep 2020 23:19:14 -0700] rev 45491
mergestate: simplify reset(), knowing that `other` and `node` go together There's only one caller of `reset()` that passes any arguments at all, and that originates from `merge.py:1371`. That code always passes values for both `node` and `other`. Differential Revision: https://phab.mercurial-scm.org/D9032
Tue, 15 Sep 2020 22:40:26 -0700 mergestate: make some callers not pass pointless node argument
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Sep 2020 22:40:26 -0700] rev 45490
mergestate: make some callers not pass pointless node argument The node argument is set on the created `mergestate` instance, but these callers don't even look at that instance. Differential Revision: https://phab.mercurial-scm.org/D9031
Thu, 17 Sep 2020 09:56:05 -0700 py3: don't risk passing a None value to error.ManifestLookupError()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Sep 2020 09:56:05 -0700] rev 45489
py3: don't risk passing a None value to error.ManifestLookupError() This makes the test case added in 20dd2a259b0f (test-grep: add tests for --follow with/without --diff and/or paths, 2020-09-11) pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D9030
Thu, 03 Sep 2020 13:25:29 +0530 merge: move initial handling of mergeactions near to later one
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 13:25:29 +0530] rev 45488
merge: move initial handling of mergeactions near to later one We build `mergeactions` in the beginning and use it in end. Let's build it just before where it will be used. Helps making code much easier to understand. Differential Revision: https://phab.mercurial-scm.org/D8983
Thu, 25 Jun 2020 13:16:55 +0530 upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 25 Jun 2020 13:16:55 +0530] rev 45487
upgrade: support running upgrade if repository has share-safe requirement This helps us in testing changing requirements of source repository and checking that the shared repository works. Differential Revision: https://phab.mercurial-scm.org/D8660
Thu, 17 Sep 2020 18:49:57 -0700 config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 17 Sep 2020 18:49:57 -0700] rev 45486
config: add `--shared` flag to edit config file of shared source With `format.exp-share-safe` enabled, we now read the `.hg/hgrc` of the shared source also. This patch adds `--shared` flag to `hg config` command which can be used to edit that shared source config file. It only works if the repository is shared one and is shared using the safe method. Differential Revision: https://phab.mercurial-scm.org/D8659
Thu, 02 Jul 2020 16:23:36 +0530 localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 02 Jul 2020 16:23:36 +0530] rev 45485
localrepo: load the share source .hg/hgrc also in share-safe mode (API) The second part of the Share Safe Plan is to share source repo config also. This patch adds logic to load the source repo .hg/hgrc if we are in share safe mode. On unshare, we copy and prepend source config to current repo so that config which was shared is persisted. A test is added to show that now if we enable a hook on the source repo, that also runs on the shared repositories. API change as a new optional argument sharedvfs added to localrepo.loadhgrc() Differential Revision: https://phab.mercurial-scm.org/D8656
Fri, 07 Aug 2020 17:42:15 +0530 helptext: document exp-sharesafe in internals/requirements.txt
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Aug 2020 17:42:15 +0530] rev 45484
helptext: document exp-sharesafe in internals/requirements.txt `exp-sharesafe` is a new requirement and we should document it. Differential Revision: https://phab.mercurial-scm.org/D8914
Tue, 14 Apr 2020 21:07:09 +0530 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 14 Apr 2020 21:07:09 +0530] rev 45483
share: introduce config option to store requires in .hg/store This introduces a config option which enabled stores the requirements on a repository in store instead. When enabled, `.hg/requires` will contain the `share-safe` requirement which marks that the requirements are present in the store. This is done so that repository requirements can be shared with shares made using `hg share` command. After this patch, `hg share` checks whether the source repository has share-safe requirement, if yes, it does not copy the requirements. Test for the new functionality is added and a test case in exitsing share tests is also added. Differential Revision: https://phab.mercurial-scm.org/D8633
Fri, 07 Aug 2020 16:11:19 +0530 scmutil: introduce filterrequirements() to split reqs into wc and store ones
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Aug 2020 16:11:19 +0530] rev 45482
scmutil: introduce filterrequirements() to split reqs into wc and store ones In upcoming patches where we try to implement requirements in store, we will need a mechanism to split all requirements on some basis and decide which one goes to `.hg/requires` and which one goes to `.hg/store/requires`. This patch introduce a separate function for that. Filtering logic for now is put under an `if False:`. In upcoming patches it will be removed. Differential Revision: https://phab.mercurial-scm.org/D8913
Thu, 17 Sep 2020 18:28:53 -0700 remotefilelog: acquire lock before writing requirements on clone
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 17 Sep 2020 18:28:53 -0700] rev 45481
remotefilelog: acquire lock before writing requirements on clone Performing a shallow clone in remotefilelog does not acquire lock. This leads to following warning when we try to write some requirements in store: ``` --- /home/gps/src/hg-committed/tests/test-remotefilelog-share.t +++ /home/gps/src/hg-committed/tests/test-remotefilelog-share.t#safe.err @@ -28,6 +28,7 @@ $ hgcloneshallow ssh://user@dummy/master source --noupdate -q + devel-warn: write with no lock: "requires" at: /home/gps/src/hg-committed/mercurial/scmutil.py:1505 (writerequires) $ hg share source dest updating working directory 1 files updated, 0 files merged, 0 files removed, 0 files unresolved ``` Let's lock before writing the requirements file. Another solution which I can think of is not warn about missing lock when writing to requires file in store. Differential Revision: https://phab.mercurial-scm.org/D8952
Thu, 10 Sep 2020 14:23:12 +0900 grep: make -frREV follow history from the specified revision (BC)
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2020 14:23:12 +0900] rev 45480
grep: make -frREV follow history from the specified revision (BC) This is close to what "log -frREV" will do, and is backported from 8b4b9ee6001a, "log: make -fr show complete history from the given revs" except for the "del opts['follow']" bit. I'm planning to rewrite cmdutil.walkchangerevs() to share the core logic with logcmdutil, and this is the first step towards that. There are still many broken tests, but the fundamental behavior should be fixed by this patch. .. bc:: `hg grep -fr REV` now follows history from the specified `REV`, works in the same way as `hg log -fr REV`. The previous behavior was to limit the search space to `REV` while following the history.
Fri, 11 Sep 2020 18:33:41 +0900 cmdutil: make walkchangerevs() gracefully handle wdir parents
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 18:33:41 +0900] rev 45479
cmdutil: make walkchangerevs() gracefully handle wdir parents This code will be completely rewritten, but test-grep.t would fail without fixing it.
Thu, 10 Sep 2020 13:30:34 +0900 grep: fix --follow with no --diff nor --rev to not fall back to plain grep
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2020 13:30:34 +0900] rev 45478
grep: fix --follow with no --diff nor --rev to not fall back to plain grep Before, "grep --follow" would only print matches in the working directory. Since --follow is the option to specify the search space, it should disable the plain (i.e. wdir) grep.
Fri, 11 Sep 2020 12:39:45 +0900 test-grep: add tests for --follow with/without --diff and/or paths
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 12:39:45 +0900] rev 45477
test-grep: add tests for --follow with/without --diff and/or paths This tests the behavior of cmdutil.walkchangerevs(). I'm going to rewrite cmdutil.walkchangerevs() to leverage the "log -f" logic, but the code coverage looked quite small. And the history traversal of "grep -f" goes wrong in various ways.
Thu, 10 Sep 2020 13:10:53 +0900 grep: clarify that --all works exactly the same way as --diff
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2020 13:10:53 +0900] rev 45476
grep: clarify that --all works exactly the same way as --diff 7fbb5d76c555 "grep: add --diff flag" says as such, but the help strings have diverged since, and it's getting fuzzier what this --all will do.
Thu, 17 Sep 2020 15:34:13 +0200 churn: add an usage example in docstring
"Stephane" <stephane@yaal.fr> [Thu, 17 Sep 2020 15:34:13 +0200] rev 45475
churn: add an usage example in docstring
Thu, 17 Sep 2020 15:47:19 +0530 tests: run test-check-py3-compat only in pure python mode
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 17 Sep 2020 15:47:19 +0530] rev 45474
tests: run test-check-py3-compat only in pure python mode This test was added few years ago to detect syntax and import related warnings and kickstart the python-3 porting efforts. It tries to parse the ast and import the module. When using in strict modes like `HGMODULEPOLICY=rust` or `HGMODULEPOLICY=c`, the test fails. Let's run the test only on pure python mode. We now have full test suite being run with python 3 and some people even use hg with python 3 in production (like me).
Sat, 12 Sep 2020 07:23:47 +0900 log: make -frREV PATH detect missing files before falling back to slow path
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 07:23:47 +0900] rev 45473
log: make -frREV PATH detect missing files before falling back to slow path If -rREV isn't specified, "log --follow" would abort on nonexistent paths. Let's implement this behavior for "-frREV" case as we have ctx.hasdir() now. Otherwise "log -frREV PATH" would silently fall back to slow path and files wouldn't be followed across renames. The loop is quadratic (as before), but the size of the startctxs and match.files() should be small in general. Some tests are marked as BROKEN since file renames aren't tracked in the slow path. This is a known limitation of the current history traversal function.
Fri, 11 Sep 2020 15:13:35 +0900 log: fix -fr'wdir()' PATH to follow newly added file
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 15:13:35 +0900] rev 45472
log: fix -fr'wdir()' PATH to follow newly added file Testing filelog doesn't make sense in this case because the file existence is tested against the specified changectxs. If the filelog is empty and if startctxs != [wctx], 'f not in c' should be triggered.
Fri, 11 Sep 2020 15:08:58 +0900 log: reorganize if-else and for loop in logcmdutil._makematcher()
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 15:08:58 +0900] rev 45471
log: reorganize if-else and for loop in logcmdutil._makematcher() The test conditions are branchy depending on --follow and --rev options, so it should be better to switch first by --follow --rev. Note that revs is not empty so "if follow and startctxs" can be replaced with "if follow and opts.get(b'rev')".
Wed, 26 Aug 2020 16:37:23 +0530 merge: update commitinfo from all mergeresults during bid merge
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 26 Aug 2020 16:37:23 +0530] rev 45470
merge: update commitinfo from all mergeresults during bid merge During bid merge, it's not clear which commitinfo should be stored and which one should not. This depends on which side the bid merge chooses for a file. For this we will need to refactor bid merge code and commitinfo handling. For now, we just blindly updates info since we hardly have any users of commitinfo and this will help us in testing and clearing out further path. Differential Revision: https://phab.mercurial-scm.org/D8965
Mon, 24 Aug 2020 17:22:28 +0530 merge: add missing ACTION_KEEP when both remote and ancestor are not present
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 17:22:28 +0530] rev 45469
merge: add missing ACTION_KEEP when both remote and ancestor are not present Previous patch may lead to confusion that the related criss-cross merge is consistent when done from any of the parents. However this is not true and we were missing setting an ACTION_KEEP. This patch now exposes that bid-merge favors ACTION_KEEP always and the result of merge is different when started from different parents. This change also effects a test case above where bid merge was wrongly picking `r` because it was missing keep related information from one of the ancestor. After this test, we are back in a state in the criss-cross merge tests where the result depends on which parent we are merging from. Differential Revision: https://phab.mercurial-scm.org/D8941
Mon, 24 Aug 2020 15:20:09 +0530 merge: store ACTION_KEEP_ABSENT when we are keeping the file absent locally
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 15:20:09 +0530] rev 45468
merge: store ACTION_KEEP_ABSENT when we are keeping the file absent locally If a file is not present on the local side, and it's unchanged between other merge parent and ancestor, we don't use any action, neither we had a if-else branch for that condition. This leads to bid-merge missing that there is a such action possible which can be performed. As test changes demonstrate, we now choose the locally deleted side instead of choosing the remote one consistently. This is also wrong behavior which is resulted because of missing possible action. It will be fixed in next patch. This whole logic is not acurrate as we should prompt user on what to do when this kind of criss-cross merge is in play. Differential Revision: https://phab.mercurial-scm.org/D8940
Tue, 01 Sep 2020 17:08:26 +0530 merge: add `ACTION_KEEP_ABSENT` to represent files we want to keep absent
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 01 Sep 2020 17:08:26 +0530] rev 45467
merge: add `ACTION_KEEP_ABSENT` to represent files we want to keep absent There are files which were deleted/not present in working copy parent but were present on other side of merge. On merge, we might decide to keep them deleted. We want to track such cases more closely, rather all kind of cases which results from some kind of merging logic. We do have `ACTION_KEEP` but having a dedicated action for the absent case is more cleaner. Initially I named the action as `ACTION_KEEP_DELETED` but later realized that file can be not-present because of other reasons than deletion like rename, hence decided to use more generic name `ACTION_KEEP_ABSENT`. Differential Revision: https://phab.mercurial-scm.org/D8974
Mon, 14 Sep 2020 13:51:39 +0530 mergeresult: introduce dedicated tuple for no-op actions
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Sep 2020 13:51:39 +0530] rev 45466
mergeresult: introduce dedicated tuple for no-op actions This will help us in adding more no-op actions in next patch while keeping the code cleaner.
Fri, 19 Jun 2020 13:27:46 +0200 tests: add criss cross merging tests whose behavior need to be fixed
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Jun 2020 13:27:46 +0200] rev 45465
tests: add criss cross merging tests whose behavior need to be fixed Merging two changesets can mark a file as removed post merge. However, in some cases, a user might not want to remove that file and they revert the removal back and commit the merge. All this works perfectly well. However, when we do criss-cross merges with such merge where user explicitly choose to revert the removal with one where another user choose the removal, we does not get any conflict. The intent here is conflicting and merge should result in conflicts. One user merged and want to keep the file while other user merged and want to remove the file. Merging those merges should result in conflicts. This patch adds test cases for these cases. Differential Revision: https://phab.mercurial-scm.org/D8939
Fri, 11 Sep 2020 15:52:06 -0700 repo: avoid copying/updating a dict on every `repo.__getitem__`
Kyle Lippincott <spectral@google.com> [Fri, 11 Sep 2020 15:52:06 -0700] rev 45464
repo: avoid copying/updating a dict on every `repo.__getitem__` This has some mild performance benefits. I'm looking into a pathological case where one of our `hg log` invocations takes several seconds, and according to hyperfine this reduces the wall time of the entire operation (running in chg) from: ``` Time (mean ± σ): 7.390 s ± 0.106 s [User: 7.058 s, System: 0.271 s] Range (min … max): 7.300 s … 7.625 s ``` to: ``` Time (mean ± σ): 7.046 s ± 0.091 s [User: 6.714 s, System: 0.279 s] Range (min … max): 6.916 s … 7.169 s ``` Note: the log command is slow due to an issue in our custom stuff executing `repo[<arg>]` 298,800 times. This performance improvement is likely not noticeable during normal operation, but I don't feel like it's making the code more difficult to understand, and every small bit helps. Differential Revision: https://phab.mercurial-scm.org/D9022
Thu, 23 Jul 2020 20:23:44 +0200 obsstore: refactor v1 logic to fix 32 byte hash support
Joerg Sonnenberger <joerg@bec.de> [Thu, 23 Jul 2020 20:23:44 +0200] rev 45463
obsstore: refactor v1 logic to fix 32 byte hash support Refactor the v1 logic to determine the node parsing based on the flag. Move the predecessor out of the fixed part and handle it like the other nodes, removing most of the duplicated code for parsing 20/32 bytes hashes. Differential Revision: https://phab.mercurial-scm.org/D8801
Mon, 14 Sep 2020 11:32:24 -0400 fsmonitor: increase the threshold before we recommend it, when using rust
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Mon, 14 Sep 2020 11:32:24 -0400] rev 45462
fsmonitor: increase the threshold before we recommend it, when using rust 50k files works just fine with the rust status, and it's annoying to get told "consider using fsmonitor" when we have another solution to the status speed. 400k files was not chosen in any rigorous way. I know 200k files is fine. Twice as many files should still be fine. Differential Revision: https://phab.mercurial-scm.org/D9021
Fri, 19 Jun 2020 06:15:06 +0200 copy-tracing: test case where a merge reverted a file deletion
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Jun 2020 06:15:06 +0200] rev 45461
copy-tracing: test case where a merge reverted a file deletion This case is currently broken for commit centric copy tracing. So we add an official case for it with a note about it being broken. Fixing it will requires multiples change in code related to merge, commit and copy tracing, so we introduce it beforehand for simplicity. Also, I have been sitting on this test for 3 months so I would rather have it upstream.
Fri, 19 Jun 2020 06:04:48 +0200 copy-tracing: test case where we go across a changed/deleted merge
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Jun 2020 06:04:48 +0200] rev 45460
copy-tracing: test case where we go across a changed/deleted merge This case is currently broken in the commit centric case. So we add an official case for it with a note about it being broken. Fixing it will requires multiples change in code related to merge, commit and copy tracing, so we introduce it beforehand for simplicity. Also, I have been sitting on this test for 3 months so I would rather have it upstream.
Wed, 26 Aug 2020 17:20:53 +0530 merge: show list of bids for each file in bid-merge in ui.debug()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 26 Aug 2020 17:20:53 +0530] rev 45459
merge: show list of bids for each file in bid-merge in ui.debug() Earlier, we were showing the list of bids only when we were ambiguously picking. However, the cases where we unambiguously picked a side may not always be correct and need to be fixed. Having list of bids for all files will be helpful in debugging. Differential Revision: https://phab.mercurial-scm.org/D8966
Mon, 14 Sep 2020 19:39:51 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Mon, 14 Sep 2020 19:39:51 +0900] rev 45458
merge with stable
Sun, 13 Sep 2020 17:52:24 +0900 cmdutil: reimplement finddate() without using walkchangerevs()
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Sep 2020 17:52:24 +0900] rev 45457
cmdutil: reimplement finddate() without using walkchangerevs() It's simpler and slightly faster maybe because a fewer Python ops would run. Unscientific benchmark: $ python -m timeit \ -s 'from mercurial import hg, ui, cmdutil; repo = hg.repository(ui.ui())' \ 'cmdutil.finddate(repo.ui, repo, "<2008-01-01")' (orig) 10 loops, best of 3: 1.45 sec per loop (new) 10 loops, best of 3: 1.25 sec per loop Now "hg churn" and "hg grep" are the only users of walkchangerevs(), which I want to refactor and fix bugs.
Sun, 13 Sep 2020 18:14:51 +0900 test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Sep 2020 18:14:51 +0900] rev 45456
test-simple-update: add test for -d DATE option I couldn't find any tests for cmdutil.finddate() except for the abort case.
Sun, 13 Sep 2020 17:46:48 +0900 largefiles: walk history in ascending order while downloading all lfiles
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Sep 2020 17:46:48 +0900] rev 45455
largefiles: walk history in ascending order while downloading all lfiles I don't think the order matters. Maybe it's purely because of the use of walkchangerevs(), which was originally designed for "hg log" command. Surprisingly, the number of objects fetched in test-largefiles.t has changed. According to the --verbose output, the order of the following fetches flipped and the latter got deduplicated. getting large3:eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store getting sub/large4:eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store
Sun, 13 Sep 2020 17:43:19 +0900 largefiles: replace use of walkchangerevs() with simple revset query
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Sep 2020 17:43:19 +0900] rev 45454
largefiles: replace use of walkchangerevs() with simple revset query Since it does nothing in prepare(), what we're doing is just walking revisions matching ".hglf" in reverse order.
Fri, 11 Sep 2020 10:47:17 +0900 largefiles: remove unused 'rev' parameter from downloadlfiles()
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 10:47:17 +0900] rev 45453
largefiles: remove unused 'rev' parameter from downloadlfiles() It's no longer used since 83ead8cb0ff2 "largefiles: implement pull --all-largefiles as a special case of --lfrev."
Sat, 12 Sep 2020 11:18:12 -0700 resourceutil: document when we expect to take the importlib.resouces code path
Martin von Zweigbergk <martinvonz@google.com> [Sat, 12 Sep 2020 11:18:12 -0700] rev 45452
resourceutil: document when we expect to take the importlib.resouces code path Differential Revision: https://phab.mercurial-scm.org/D9018
Thu, 10 Sep 2020 22:00:00 -0700 templater: fix reading of templates in frozen binaries with py3 < 3.7
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Sep 2020 22:00:00 -0700] rev 45451
templater: fix reading of templates in frozen binaries with py3 < 3.7 When using a frozen binary with py3 < 3.7, there's no `importlib.resources` module, so we use the code path that reads the resources from the file system. That code path expects bytes for package name and resource name. Differential Revision: https://phab.mercurial-scm.org/D9008
Fri, 11 Sep 2020 09:35:49 -0700 histedit: cache description line
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Sep 2020 09:35:49 -0700] rev 45450
histedit: cache description line Navigating the curses-based histedit interface can be pretty slow because it redraws everything whenever you make a change. This patch simply replaces `@property` by `@util.propertycache` on the `histeditrule.desc()` function so it's not re-calculated every time the screen needs to be re-rendered. I timed it on an example of 30 simple commits, where I moved the top commit down 25 steps and then up 25 steps after. Before this patch, that (the whole `hg histedit` invocation) took 11.6 s of CPU and after this patch it took 0.8 s). Differential Revision: https://phab.mercurial-scm.org/D9016
Fri, 11 Sep 2020 09:55:08 -0700 tests: make emacs test less strict
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 Sep 2020 09:55:08 -0700] rev 45449
tests: make emacs test less strict It was failing like this for me: ``` @@ -2,7 +2,7 @@ $ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \ > -f ert-run-tests-batch-and-exit Running 1 tests (*) (glob) - passed 1/1 hg-test-mode--compilation-mode-support + passed 1/1 hg-test-mode--compilation-mode-support (0.045732 sec) - Ran 1 tests, 1 results as expected (*) (glob) + Ran 1 tests, 1 results as expected, 0 unexpected (2020-09-11 16:49:56+0000, 0.046034 sec) ``` Differential Revision: https://phab.mercurial-scm.org/D9017
Thu, 10 Sep 2020 13:12:34 -0700 graphlog: use '%' only if there are *unresolved* conflicts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 10 Sep 2020 13:12:34 -0700] rev 45448
graphlog: use '%' only if there are *unresolved* conflicts In 14d0e89520a2, I made graphlog use '%' for the "other" context when there's an existing merge state. However, that has confused many people because it shows up even if all conflicts are already resolved, which makes it show up even after e.g. `hg update -m` with automatically resolved conflicts. This patch makes it so we show the '%' only if there still unresolved conflicts. This patch replaces my earlier attempt in D8930, where I decided to automatically clear the mergestate if there are no remaining conflicts. That had the problem that it wouldn't let the user re-resolve the conflicts using `hg resolve`. Note that an in-progress "proper" merge (one that will result in a commit with two parents, such as after `hg merge`) will already have two dirstate parents before the commit happens. That means that both sides of the merge will get drawn as '@' in the graph, since "is dirstate parent" takes precedence over "is involved in merge conflict". Differential Revision: https://phab.mercurial-scm.org/D9007
Wed, 26 Aug 2020 17:24:22 +0530 merge: show number of ancestors in bid merge debug notes
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 26 Aug 2020 17:24:22 +0530] rev 45447
merge: show number of ancestors in bid merge debug notes A good number of times, we don't generate an action for a file in manifestmerge() which can result in bid merge doing the wrong thing. Mentioning the number of ancestors from which we are bidding will help spot such cases where we are not returning an action. Differential Revision: https://phab.mercurial-scm.org/D8967
Thu, 03 Sep 2020 14:45:16 +0530 debugmergestate: sort extras before printing
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 14:45:16 +0530] rev 45446
debugmergestate: sort extras before printing Prevents flaky output. Differential Revision: https://phab.mercurial-scm.org/D8986
Mon, 24 Aug 2020 18:59:19 +0530 debugmergestate: show extras for files which are not in mergestate
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 18:59:19 +0530] rev 45445
debugmergestate: show extras for files which are not in mergestate With recent changes and future changes, we will like to store extras information about files which were merged automatically. Hence, we will have merge extras for files which are not in the mergestate. Differential Revision: https://phab.mercurial-scm.org/D8942
Thu, 10 Sep 2020 16:51:40 +0530 tests: update lockdelay.py to handle the `wait` argument
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 10 Sep 2020 16:51:40 +0530] rev 45444
tests: update lockdelay.py to handle the `wait` argument Spotted by a future change.
Thu, 03 Sep 2020 14:14:04 +0530 commit: pass mergestate into _filecommit() instead of re-reading it
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 14:14:04 +0530] rev 45443
commit: pass mergestate into _filecommit() instead of re-reading it mergestate reading although cheap is not free. Let's read mergestate once on top and pass it into `_filecommit()`. In upcoming patches, we will be reading mergestate more in `_filecommit()`. Differential Revision: https://phab.mercurial-scm.org/D8984
Fri, 11 Sep 2020 13:04:05 +0530 py3: fix bytes and str mixup in run-tests
Sushil khanchi <sushilkhanchi97@gmail.com> [Fri, 11 Sep 2020 13:04:05 +0530] rev 45442
py3: fix bytes and str mixup in run-tests Differential Revision: https://phab.mercurial-scm.org/D9009
Mon, 17 Aug 2020 10:59:30 +0200 hg-core: fix some `clippy` warnings
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 17 Aug 2020 10:59:30 +0200] rev 45441
hg-core: fix some `clippy` warnings Differential Revision: https://phab.mercurial-scm.org/D8957
Mon, 17 Aug 2020 16:55:43 +0200 rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 17 Aug 2020 16:55:43 +0200] rev 45440
rhg: print error message when argument parsing fails Differential Revision: https://phab.mercurial-scm.org/D8956
Thu, 13 Aug 2020 16:36:42 +0200 rhg: fix `clippy` warnings
Antoine Cezar <antoine.cezar@octobus.net> [Thu, 13 Aug 2020 16:36:42 +0200] rev 45439
rhg: fix `clippy` warnings Differential Revision: https://phab.mercurial-scm.org/D8955
Tue, 04 Aug 2020 16:11:23 +0200 rhg: pass `ui` to `Command` `run`
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 04 Aug 2020 16:11:23 +0200] rev 45438
rhg: pass `ui` to `Command` `run` Allow implementation of `From<clap::ArgMatches> for Command` Differential Revision: https://phab.mercurial-scm.org/D8954
Mon, 03 Aug 2020 11:55:59 +0200 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 03 Aug 2020 11:55:59 +0200] rev 45437
rhg: add harness tests for rhg files Differential Revision: https://phab.mercurial-scm.org/D8873
Thu, 30 Jul 2020 16:55:44 +0200 rhg: make output of `files` relative to the current directory and the root
Raphaël Gomès <rgomes@octobus.net> [Thu, 30 Jul 2020 16:55:44 +0200] rev 45436
rhg: make output of `files` relative to the current directory and the root This matches the behavior of `hg files`. The util is added in `hg-core` instead of `rhg` because this operation could be useful for other external tools. (this was definitely not prompted by rust issue #50784, I swear) Differential Revision: https://phab.mercurial-scm.org/D8872
Tue, 08 Sep 2020 19:36:40 +0530 tags: take lock instead of wlock before writing hgtagsfnodes1 cache
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 08 Sep 2020 19:36:40 +0530] rev 45435
tags: take lock instead of wlock before writing hgtagsfnodes1 cache This cache is shared across stores and hence we should take store lock before writing to it. Otherwise there will be race where one share with wlock is writing to this cache and other share with wlock is trying to read it simultaneously. Differential Revision: https://phab.mercurial-scm.org/D9001
Thu, 10 Sep 2020 13:37:35 +0530 statichttprepo: use LockUnavailable() instead of Abort() for lock (API)
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 10 Sep 2020 13:37:35 +0530] rev 45434
statichttprepo: use LockUnavailable() instead of Abort() for lock (API) If we try to get a lock on statichttprepo, we get `error.Abort()` instead of subclass of `error.LockError()`. The callers which catches `error.LockError` fails to catch this case as the correct error is not raised. Raising `error.LockUnavaible()` is same as what is done for wlock also.
Tue, 08 Sep 2020 18:46:01 +0530 localrepo: warn if we are writing to cache without a lock
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 08 Sep 2020 18:46:01 +0530] rev 45433
localrepo: warn if we are writing to cache without a lock From quite sometime we have two types of cache, `cache` and `wcache`. The later one is a working copy cache and the first one is a store cache. Let's add a check for warning if we are missing store lock while writing to these caches. This is inspired from some tag cache breakage which is observed when multiple shares are in play. The interesting part is that although we are still taking wlock to write store caches at many places, but still the test pases. Differential Revision: https://phab.mercurial-scm.org/D9000
Thu, 03 Sep 2020 14:14:40 +0530 commit: fix a wrong argument name in documentation
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 14:14:40 +0530] rev 45432
commit: fix a wrong argument name in documentation Differential Revision: https://phab.mercurial-scm.org/D8985
Thu, 10 Sep 2020 17:03:38 +0530 git: remove unrequired assignment of listignored and listunknown
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 10 Sep 2020 17:03:38 +0530] rev 45431
git: remove unrequired assignment of listignored and listunknown Caught by test-check-pyflakes.t
Wed, 09 Sep 2020 11:41:18 +0900 grep: fix hash(linestate) to not include linenum
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 11:41:18 +0900] rev 45430
grep: fix hash(linestate) to not include linenum linestate.__eq__() just compares the line values whereas __hash__() does hash both self.line and self.linenum, which violates the rule. __hash__() was added at fb502719c75c, "python 2.6 compatibility: add __hash__ to classes that have __eq__" with no additional remarks, so this would probably be a simple mistake. The test output changed because difflib.SequenceMatcher() internally uses a dict. As you can see, the line "export" is unchanged at the revision 2, so the new output is correct.
Tue, 08 Sep 2020 21:38:10 +0900 test-grep: document that trivially moved lines might not be detected
Yuya Nishihara <yuya@tcha.org> [Tue, 08 Sep 2020 21:38:10 +0900] rev 45429
test-grep: document that trivially moved lines might not be detected I'm not going to fix this. I just learned "grep --diff" does clever thing than a simple grep(patch.diff(context=0)), and I think it's better to document how things work.
Wed, 09 Sep 2020 11:51:51 +0900 revset: remove indirect indexing of status tuple
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 11:51:51 +0900] rev 45428
revset: remove indirect indexing of status tuple Just use the attribute name.
Tue, 25 Aug 2020 23:18:42 -0400 rewriteutil: relax the sha1 hash references to handle future hash types
Matt Harbison <matt_harbison@yahoo.com> [Tue, 25 Aug 2020 23:18:42 -0400] rev 45427
rewriteutil: relax the sha1 hash references to handle future hash types Per discussion with nbjoerg in IRC. Differential Revision: https://phab.mercurial-scm.org/D8951
Mon, 24 Aug 2020 18:51:25 -0400 phabricator: update the hashes in commit messages as they get submitted
Matt Harbison <matt_harbison@yahoo.com> [Mon, 24 Aug 2020 18:51:25 -0400] rev 45426
phabricator: update the hashes in commit messages as they get submitted Due to the sequence of actions (posting, amending the local commit, and then updating the Differential properties), the message in the commit is updated on the initial send but the message displayed in Phabricator is not. It should get updated there if the review is reposted. The data in the Commits tab is accurate for the first `phabsend`. Differential Revision: https://phab.mercurial-scm.org/D8950
Mon, 24 Aug 2020 18:44:15 -0400 rewriteutil: also consider pending obsoletes when updating hashes in messages
Matt Harbison <matt_harbison@yahoo.com> [Mon, 24 Aug 2020 18:44:15 -0400] rev 45425
rewriteutil: also consider pending obsoletes when updating hashes in messages Phabricator builds up the replacement commits and mapping in a single transaction, and then finalizes everything once the commits have been rewritten. That's too late when trying to update the messages for those commits. I'm a little concerned that this isn't a generic enough interface, since it doesn't mimic the list of list return of `obsutil.successorssets()`. But this is the type of mapping that phabricator maintains, and I don't think the methods that would be interested in calling this need to worry about split and divergence. We can fix that later if the need arises. Differential Revision: https://phab.mercurial-scm.org/D8949
Mon, 24 Aug 2020 12:43:53 -0400 rewriteutil: extract evolve code used to replace obsolete hashes in commits
Matt Harbison <matt_harbison@yahoo.com> [Mon, 24 Aug 2020 12:43:53 -0400] rev 45424
rewriteutil: extract evolve code used to replace obsolete hashes in commits The evolve command uses it, but there are core things like `phabsend` and `rebase` that would also benefit. Differential Revision: https://phab.mercurial-scm.org/D8948
Mon, 07 Sep 2020 17:16:16 -0400 git: fix index handling of removed files during commit (issue6398)
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 17:16:16 -0400] rev 45423
git: fix index handling of removed files during commit (issue6398) Other changes in this series also changed the behavior here in positive ways, but this was the final step that actually fixed things. Differential Revision: https://phab.mercurial-scm.org/D8999
Mon, 07 Sep 2020 17:14:59 -0400 git: make dirstate actually support listclean parameter
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 17:14:59 -0400] rev 45422
git: make dirstate actually support listclean parameter As far as I can tell listignored and listunknown should already work. I'm vexed that there doesn't seem to be a way to get clean files out of the pygit2 status method, but this at least makes things work better. Differential Revision: https://phab.mercurial-scm.org/D8998
Mon, 07 Sep 2020 17:13:45 -0400 git: make dirstate status() respect matcher
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 17:13:45 -0400] rev 45421
git: make dirstate status() respect matcher As with other changes in this stack, we appear to have been getting lucky in the past. An upcoming change behaved _very_ oddly without this fix. Differential Revision: https://phab.mercurial-scm.org/D8997
Mon, 07 Sep 2020 17:12:29 -0400 git: fix up dirstate use of index
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 17:12:29 -0400] rev 45420
git: fix up dirstate use of index This was super-broken before, and somehow none of the existing attempts to use this code tripped on the defects here. Sigh. Differential Revision: https://phab.mercurial-scm.org/D8996
Mon, 07 Sep 2020 16:27:12 -0400 git: correctly handle "nothing changed" commits
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 16:27:12 -0400] rev 45419
git: correctly handle "nothing changed" commits I guess localrepo.commit() actually returns an Optional[node], which is a bit of a surprise to me. Differential Revision: https://phab.mercurial-scm.org/D8995
Mon, 07 Sep 2020 16:25:16 -0400 localrepo: use functools.wraps() in unfilteredmethod decorator
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 16:25:16 -0400] rev 45418
localrepo: use functools.wraps() in unfilteredmethod decorator This makes it easier to figure out what function you're holding on to when doing printf-style debugging. Differential Revision: https://phab.mercurial-scm.org/D8994
Mon, 07 Sep 2020 16:13:10 -0400 git: actually copy treemanifest instances in .copy() (issue6398)
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 16:13:10 -0400] rev 45417
git: actually copy treemanifest instances in .copy() (issue6398) The implementation here is so simple I honestly have no idea why I didn't do it at the time. Hopefully there's not some nuance past-me forgot to write down. Differential Revision: https://phab.mercurial-scm.org/D8993
Fri, 11 Sep 2020 14:41:05 +0900 log: fix crash and bad filematcher lookup by -fr'wdir()' PATH stable
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 14:41:05 +0900] rev 45416
log: fix crash and bad filematcher lookup by -fr'wdir()' PATH "-fr'wdir()' ADDED-PATH" is still wrong, which will be fixed in default branch.
Wed, 09 Sep 2020 14:48:55 -0400 hgdemandimport: bypass demandimport for _ast module (issue6407) stable
Augie Fackler <augie@google.com> [Wed, 09 Sep 2020 14:48:55 -0400] rev 45415
hgdemandimport: bypass demandimport for _ast module (issue6407) This is broken on Python 3.9rc1, and while it sounds like there may be a fix in Python, we probably also should have this workaround in place in hg. See the bug for more details (including on bugs at redhat and b.p.o). Differential Revision: https://phab.mercurial-scm.org/D9004
Mon, 07 Sep 2020 15:46:56 -0400 git: restore basic functionality after b3040b6739ce
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 15:46:56 -0400] rev 45414
git: restore basic functionality after b3040b6739ce We don't yet have a formal interface for the changelog, but it's mostly specified. Sadly, b3040b6739ce added a semi-private pseudo-enum that we need to cope with, so it's probably high time that someone (me?) attempts to define that interface to prevent future backsliding. Differential Revision: https://phab.mercurial-scm.org/D8992
Mon, 07 Sep 2020 15:31:34 -0400 git: convert tz offset to int (issue6359)
Augie Fackler <raf@durin42.com> [Mon, 07 Sep 2020 15:31:34 -0400] rev 45413
git: convert tz offset to int (issue6359) Differential Revision: https://phab.mercurial-scm.org/D8991
Fri, 04 Sep 2020 15:21:02 -0400 repoview: pin revisions for `local` and `other` when a merge is active stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 04 Sep 2020 15:21:02 -0400] rev 45412
repoview: pin revisions for `local` and `other` when a merge is active I've hit this a couple of times, where pulling with a dirty `wdir` obsoletes `p1` and updating to the successor results in merge conflicts. The problem was resolving them failed immediately, complaining that the old checkout was filtered. The change in `test-rebase-obsolete.t` is because there's an outstanding merge conflict in a rebase operation. The summary prompt to merge seems incorrect for this scenario, but that's an existing issue. Differential Revision: https://phab.mercurial-scm.org/D8980
Mon, 07 Sep 2020 15:20:31 -0400 merge with stable
Augie Fackler <augie@google.com> [Mon, 07 Sep 2020 15:20:31 -0400] rev 45411
merge with stable
Wed, 02 Sep 2020 19:46:55 +0530 extdiff: refactor cmdline and gui calculation login in a separate fn
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 02 Sep 2020 19:46:55 +0530] rev 45410
extdiff: refactor cmdline and gui calculation login in a separate fn This is some good logic with handling of many config items and various ways of specifying it. I want to reuse in `diff --tool` and hence refatcored it in a separate function of it's own.
Wed, 02 Sep 2020 19:17:31 +0530 extdiff: reorder an if-else conditional
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 02 Sep 2020 19:17:31 +0530] rev 45409
extdiff: reorder an if-else conditional This brings continue part on top and will help in next patch where we will like to introduce utility functions for rest of the code.
Wed, 02 Sep 2020 23:09:45 +0530 run-tests: extract logic to get errpath in a utility func
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 02 Sep 2020 23:09:45 +0530] rev 45408
run-tests: extract logic to get errpath in a utility func Differential Revision: https://phab.mercurial-scm.org/D8979
Sat, 22 Aug 2020 16:31:34 +0530 run-tests: refactor filtering logic for --retest flag
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 22 Aug 2020 16:31:34 +0530] rev 45407
run-tests: refactor filtering logic for --retest flag How I got to this: While re-running failed tests using --retest I noticed that the output: "running x tests using y parallel processes". was not actually correct, because x was the total number of tests present in the directory, but it should be the number of failed tests. Although it would run only the failed tests and later will say that remaining tests were skipped. Changes in test files reflect the fixed behaviour. This patch change and move the logic for filtering failed test for --retest option and make sure that we create instances of class Test only for the tests we need to run. As mentioned in the deleted text (in this patch itself) the logic for --retest should be outside of TestSuite. Differential Revision: https://phab.mercurial-scm.org/D8938
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip