Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Aug 2020 16:11:19 +0530] rev 45493
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
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 17 Sep 2020 18:28:53 -0700] rev 45492
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
Yuya Nishihara <yuya@tcha.org> [Thu, 10 Sep 2020 14:23:12 +0900] rev 45491
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.
Yuya Nishihara <yuya@tcha.org> [Fri, 11 Sep 2020 18:33:41 +0900] rev 45490
cmdutil: make walkchangerevs() gracefully handle wdir parents
This code will be completely rewritten, but test-grep.t would fail without
fixing it.