Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 22:02:49 +0200] rev 42727
rawdata: register the method for `ifiledata`
The interface have a `revision(..., raw=False)` method so it should get a
`rawdata` one. I am not sure why nothing complained about the lack of it
earlier.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 21:17:48 +0200] rev 42726
rawdata: implement the method for `unionrepo` too
This is required for all implementations.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:51:52 +0200] rev 42725
rawdata: implement the method for `remotefilelog` too
This is needed for all storage implementations.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 20:48:05 +0200] rev 42724
rawdata: implement `rawdata` for `simplestore` too
This is needed for all implementation.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 22:08:04 +0200] rev 42723
rawdata: forward `rawdata` call on `manifestlog`
This needs to be sent to the underlying `revlog` too.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 22:01:52 +0200] rev 42722
rawdata: implement `rawdata` for `sqlitestore` too
This is a different store, it needs it declared.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 22:00:57 +0200] rev 42721
rawdata: add the method to bundlerevlog
The bundlerepo logic has its own `revision` method on its own `revlog` object.
We need to "implement" `rawdata` there too.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 21:59:20 +0200] rev 42720
rawdata: forward the method call on `filelog` object
We have a new method, we need to expose it.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 21:54:29 +0200] rev 42719
rawdata: introduce a `rawdata` method on revlog
This method aims at replacing `revision(..., raw=True)` call. The purpose of
data returned without and without raw are different enough that having two
different method would make sense.
This split is motivated by other work aiming at storing data on the side of the
main revision of a revlog. Having a cleaner API makes it simpler to add this
work.
The series following this first changesets is organised as follow:
1) add `rawdata` method everywhere it is useful
2) update all caller
3) implement all `rawdata` method without using `revision`
4) deprecate the `rawdata` parameter of `revision`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Aug 2019 17:14:48 +0200] rev 42718
revlog: split a `_revisiondata` method to file `revision` job
We are about to introduce more public method to access revision data (eg:
`rawdata`). revset subclass tend to recursively call `revision` which will
create all kind of issue with the coming series. To avoid them we introduce an
explicit difference between the internal call and the public all. This will be
useful for later work anyway (so the subclass issue is just moving it earlier in
the series). I am not sure if the subclass are actually doing something
sensible. However, I am certain I don't want to be rabbit holed into figuring it
out right now.
Taapas Agrawal <taapas2897@gmail.com> [Wed, 24 Jul 2019 18:32:36 +0530] rev 42717
continue: added support for transplant
This creates a seperate function `continuetransplant()`
containing logic for resuming transplant from interrupted
state.
`continuetransplant()` is then registered as `continuefunc`
for state detection API.
Results are shown in tests.
Differential Revision: https://phab.mercurial-scm.org/D6689
Augie Fackler <augie@google.com> [Fri, 09 Aug 2019 05:09:54 -0400] rev 42716
merge with stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Mon, 12 Aug 2019 14:00:19 -0400] rev 42715
fncache: make debugrebuildfncache not fail on broken fncache
The code reading the fncache changed in 5.0, to complain if the file
is not \n terminated. This makes apparent the fact that the fncache
gets corrupted.
Make it possible to recover, instead of having `hg
debugrebuildfncache` failing by saying `(run hg debugrebuildfncache)`.
The corruption itself is most likely due to hg not using fsync in
general, and so various bad things can happen. Here, the reported
problems happened when running out of disk space. So I suspect that
because the fncache is much bigger than the average commit/pull, when
running out of disk space, the bulk of the pull may succeed, but the
new fncache may get half-written and still renamed into place.
Differential Revision: https://phab.mercurial-scm.org/D6722
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Mon, 12 Aug 2019 13:22:27 -0400] rev 42714
fncache: show that debugrebuildfncache is partly broken
Differential Revision: https://phab.mercurial-scm.org/D6721
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Aug 2019 13:11:27 +0200] rev 42713
test: further fixes to matching for run-tests.py bug
The fix in
bac24a8a095a did not fix the full issue, because the extra number
also eat some of the separator space. Since we are already matching arbitrary
number of space, we easily fix the matching.
Kyle Lippincott <spectral@google.com> [Mon, 05 Aug 2019 13:31:12 -0700] rev 42712
branchmap: explicitly warm+write all subsets of the branchmap caches
'full' claims it will warm all of the caches that are known about, but this was
not the case - it did not actually warm the branchmap caches for subsets that we
haven't requested, or for subsets that are still considered "valid". By
explicitly writing them to disk, we can force the subsets for ex: "served" to be
written ("immutable" and "base"), making it cheaper to calculate "served" the
next time it needs to be updated.
Differential Revision: https://phab.mercurial-scm.org/D6710
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jun 2019 13:42:52 +0100] rev 42711
changectx: extract explicit computechangesetfilesremoved method from context
Right now, the logic around changeset centric removed files data are buried into
the "changectx" code. We extract this code in a dedicated method (in the scmutil
module) for clarity. This clarity will help to explicitly compute and caches
these data in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jun 2019 13:42:22 +0100] rev 42710
changectx: extract explicit computechangesetfilesadded method from context
Right now, the logic around changeset centric added files data are buried into
the "changectx" code. We extract this code in a dedicated method (in the scmutil
module) for clarity. This clarity will help to explicitly compute and caches
these data in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Aug 2019 11:06:13 +0200] rev 42709
demandimport: explicitly declare `_session` at the module level
The `_session` module level variable is set within a function using the `global`
keyword. This confuses my `test-check-pyflakes.t`. Explicitly declaring the
variable at the top level solves the issue (and seems absolutely reasonable).
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Aug 2019 10:55:06 +0200] rev 42708
tests: give more room for slowness in test-run-tests.t
The test expected any run-test.py run to end in less than 10 seconds. On slower
loaded CI machine, this gets slower than that. We give a bit more room to the
regexp.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 06 Aug 2019 03:17:40 +0200] rev 42707
copies: extract an explicit `computechangesetcopie` method from context
Right now, the logic around changeset centric copies data are buried into the
"changectx" code. We extract this code in a dedicated method (in the copies
module) for clarity. This clarity will help to explicitly compute and caches
these data in the future.
Navaneeth Suresh <navaneeths1998@gmail.com> [Wed, 07 Aug 2019 19:18:20 +0530] rev 42706
config: fix fm.data() handling of defaultvalue
This is a follow-up patch to rHG
51a2e3102db2. This moves
`fm.data()` out of the if block in `commands.config()`.
Differential Revision: https://phab.mercurial-scm.org/D6720
Navaneeth Suresh <navaneeths1998@gmail.com> [Sat, 03 Aug 2019 12:14:34 +0530] rev 42705
config: remove pycompat.bytestr() for defaultvalue
This is a follow-up patch to
51a2e3102db2. This removes
`pycompat.bytestr` to preserve `None` in `commands.config()`.
Differential Revision: https://phab.mercurial-scm.org/D6712
Navaneeth Suresh <navaneeths1998@gmail.com> [Sat, 27 Jul 2019 12:19:51 +0530] rev 42704
unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
On a partial unshelve, `shelvedstate` was not cleared and `_finishunshelve()`
was not called. Ideally, these should be called on this case. This patch makes
`shelvedstate` to delete after a successful partial unshelve and calls
`_finishunshelve()` in the same case.
Differential Revision: https://phab.mercurial-scm.org/D6708
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 25 Jul 2019 22:01:15 +0530] rev 42703
unshelve: delete shelvedstate after a successful unshelve --continue
`unshelve --continue` was preventing the deletion of `shelvedstate` on
a partial `unshelve`. Ideally, `shelvedstate` should be deleted after
a successful `unshelve`. Now, the behavior of `unshelve --continue`
will be as follows in interactive mode:
1] The user tried to `unshelve` changes interactively but, ran into
conflicts.
2] They resolved the conflicts and triggered `unshelve --continue`
but, unshelved changes partially.
3] Now, on trying to do `unshelve --continue` again will abort as
the last `unshelve` was successful and we are deleting the
`shelvedstate`.
4] If they want to unshelve the remaining shelved change, they
need to trigger `unshelve` without `--continue`.
Differential Revision: https://phab.mercurial-scm.org/D6694
Navaneeth Suresh <navaneeths1998@gmail.com> [Wed, 24 Jul 2019 18:15:27 +0530] rev 42702
unshelve: handle stripping changesets on interactive mode
On interactive mode, changesets on `nodestoremove` should be
stripped regardless of the shelve is partial or not. This patch
modifies `unshelvecontinue()` to do that.
Differential Revision: https://phab.mercurial-scm.org/D6686
Raphaël Gomès <rgomes@octobus.net> [Tue, 06 Aug 2019 14:54:25 +0200] rev 42701
byteify-strings: add --version argument
This is indispensable for automated tools to detect changes in behavior.
Raphaël Gomès <rgomes@octobus.net> [Tue, 06 Aug 2019 14:49:30 +0200] rev 42700
byteify-strings: add space in special comments to silence flake8 error
This is done soon enough that nobody has had the time to use this feature yet.
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jul 2019 17:10:38 +0800] rev 42699
revset: drop argument when it's None
getstack's definition is `getstack(repo, rev=None)`, so providing None
explicitly is unnecessary. Moreover, when x is not None, it's definitely not a
revision but a part of a parsed tree of revset arguments.
Differential Revision: https://phab.mercurial-scm.org/D6707
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jul 2019 17:07:34 +0800] rev 42698
stack: remove unnecessary reverse() predicate
Stack already sorts revisions, so no need to do it twice.
This change was a part of D2400, which didn't land for other reasons. See also
D2399, where this change was suggested.
Differential Revision: https://phab.mercurial-scm.org/D6706
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Aug 2019 16:47:49 -0700] rev 42697
automation: increase root volume size on Linux
It is close to full in the AMI. I actually ran out of space running
tests without increasing the volume size!
Differential Revision: https://phab.mercurial-scm.org/D6716
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Aug 2019 16:03:11 -0700] rev 42696
automation: install Rust in Linux environment
This will install Rust 1.31.1, 1.34.2, and whatever stable is at
the time the install runs. We install 1.31.1 as our minimum supported
Rust version (I think that's what we're currently targeting) and
1.34 because that's what Debian 10 is shipping.
Differential Revision: https://phab.mercurial-scm.org/D6715
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Aug 2019 14:17:41 -0700] rev 42695
automation: update packages in requirements files
We like keeping up to date. The content of the autogenerated files
changed slightly because I used a newer version of `pip-compile`
than what was used previously.
Differential Revision: https://phab.mercurial-scm.org/D6714
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Aug 2019 14:04:31 -0700] rev 42694
automation: install latest Python versions
This required bumping the pyenv commit so the new versions are
available.
Differential Revision: https://phab.mercurial-scm.org/D6713
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2019 03:15:58 +0200] rev 42693
upgrade: introduce the internal code for revlog cloning selection
For now we still clone every single revlogs but all the selection mechanism is
now in place in the lower layer.
The next changesets will introduce the user interface part of the selection.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 01 Aug 2019 11:02:12 -0700] rev 42692
relnotes: copy "next" to "5.1" and clear "next"
To avoid merge conflicts, we want to avoid modifying the file on
multiple branches in parallel. This patch is therefore meant to be
applied to the stable branch and then quickly be merged to default (at
least before edits are made to relnotes/next there).
Another option would have been to copy the file on the stable branch
and to clear it on the default branch. However, that still results in
conflicts if the copy is edited on the stable branch (Mercurial would
try to apply the changes from the default branch to it).
We could also delete the file in one commit and recreate it in another
commit. However, Mercurial is quite inconsistent in what it considers
a break in history (see test-copies-unrelated.t), so I'd like to avoid
that.
Differential Revision: https://phab.mercurial-scm.org/D6705
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 30 Jul 2019 19:58:44 +0200] rev 42691
upgrade: introduce a _copyrevlog method
This function copies a revlog from the old store to the new one, without
re-adding all deltas manually. This will eventually save a lot of time when some
revlog does not needs any conversions.
Code actually using this will be introduced in later changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 Jul 2019 19:25:47 +0200] rev 42690
upgrade: rename `_copyrevlogs` to `_clonerevlogs`
The underlying revlog method is named `clone`, keeping the naming consistent
seems clearer. This is motivated to clarify the difference with an (upcoming)
function that simply copy revlog files as is.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 27 Jul 2019 19:58:17 +0200] rev 42689
upgrade: walk the source store file only once
I don't expect this to have a significant performance impact, but it seems
simpler and saner to do the operation only once and to keep the result around.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 12 Jun 2019 14:22:49 +0100] rev 42688
upgrade: always use full text if "full-add" mode is enable
We should not be using a delta since the goal is to perform a full addition from
scratch in all cases.
Without this patch, `hg debugupgraderepo --optimize re-delta-fulladd --run` can
crash.
Raphaël Gomès <rgomes@octobus.net> [Sun, 04 Aug 2019 22:14:26 +0200] rev 42687
byteify-strings: fix misalignment with multi-line parenthesis
This improves the current fix to also take into account cases where the last
line ended on the opening `(`, `[` or `{` and adds a regression test.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 16:54:02 +0200] rev 42686
byteify-strings: add test for byteify-strings.py
This tests the basic features expected from this script, some cases may not
be covered yet.
A future patch will demonstrate an issue with multi-line `(`, `[` and `{`
alignment and propose a fix.
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Aug 2019 20:59:21 +0900] rev 42685
merge with stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 03 Aug 2019 12:13:51 -0700] rev 42684
automation: push changes affecting .hgtags
When I went to build the 5.1 tag using the in-repo automation, the
automatic version calculation failed to deduce the clean 5.1 version
string because we had only pushed the changeset corresponding to the 5.1
tag and not the changeset containing the 5.1 tag. So from the
perspective of the remote repo, the 5.1 tag didn't exist yet and
automatic version deduction failed.
This commit changes the `hg push` to also push all changesets affecting
the .hgtags file, ensuring the remote has up-to-date tags information.
I tested this by creating a local draft changeset with a dummy tag
value on a different DAG head and instructed the automation to build
a revision that didn't have this change to .hgtags. The tag was
successfully pushed and the built package had a version number
incorporating that tag.
Sending this to stable so the 5.1.1 automation hopefully "just works."
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 16:17:02 +0200] rev 42683
byteify-strings: add cli argument to handle `attr*()` when they are methods
Certain code bases have useful utils that wrap the builtin functions, and are
called like `util.setattr`.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jun 2019 03:50:40 +0200] rev 42682
bookmarks: actual fix for race condition deleting bookmark
This is a simple but efficient fix to prevent the issue tested in
`test-bookmarks-corner-case.t`. It might be worth pursuing a more generic
approach where filecache learn to depend on each other, but that would not be
suitable for stable.
The issue is complicated enough that I documented the race and its current
solution as inline comment. See this comment for details on the fix.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2019 16:22:47 +0200] rev 42681
strip: access bookmark before getting a reference to changelog
Bookmark access might invalidate the current changelog (to make sure both are in
a reasonable synchronisation state). So we should grab the reference to
changelog after we access bookmark. Otherwise we risk using a dead object for
the whole strip process.
(note: this dead object business probably requires a new layers of checking)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2019 15:59:52 +0200] rev 42680
test: use a more verbose output in the test
While debugging some test failure, I released the test never checks if the
relevant changesets were preserved. So I am updating the test from `hg parents`
usage to `hg log -G` with a special template. This increase the area covered by
the test and clarify the test failures.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 16:14:00 +0200] rev 42679
byteify-strings: simplify default value for `--treat-as-kwargs`
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 10:18:22 +0200] rev 42678
byteify-strings: add --treat-as-kwargs argument to handle kwargs-like objects
This argument will help extensions move to Python 3 as keyword arguments
should not be byte-prefixed. Most of the time, code bases will call this
object `kwargs`, but other conventions exist like `opts`, so it should make
sense to allow for custom names.
This is a best effort solution that does minimal static checking; cases like
`options = [o for o in ('a', 'b', 'c') if kwargs.get(o)]`
and other just as complicated will not be detected.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 10:10:23 +0200] rev 42677
byteify-strings: add helpers to check for item access or method call
These helpers will be used in a future patch, split for ease of review.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:55:32 +0200] rev 42676
byteify-strings: add support for ignore comments
Our simple token analysis is sometimes not clever enough, we need to be able
to turn off our script for parts of the code.
This change introduces three special comments:
- `#no-py3-transform` to tell `byteify-strings` ignore the next line
- `#py3-transform: off` to ignore everything until the end of the file
- `#py3-transform: on` to stop ignoring
The last two can be particularly useful within Python 2/3 compatibility files.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:48:13 +0200] rev 42675
byteify-strings: handle triple quoted strings if they are not docstrings
As with anything in this script, this is a best effort approach. Most of the
time, when a triple quoted string is assigned to something, it's not a
docstring.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:44:11 +0200] rev 42674
byteify-strings: handle multi-line strings in _ensuresysstr
The current implementation did not handle calls like
`repo.ui.log("first line"
"other line")`
correctly.
Danny Hooper <hooper@google.com> [Wed, 22 May 2019 16:22:06 -0700] rev 42673
fix: run fixer tools in the repo root as cwd so they can use the working copy
This lets fixer tools do things like find configuration files, with the caveat
that they'll only see the version of that file in the working copy, regardless
of what revisions are being fixed.
Differential Revision: https://phab.mercurial-scm.org/D6440
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 01 Aug 2019 22:03:52 +0530] rev 42672
config: add defaultvalue template keyword
This patch tries to fix one of the issues mentioned in
issue6014.
This adds a new `defaultvalue` template keyword to be used with
`hg showconfig` to get the default value of the config item.
Differential Revision: https://phab.mercurial-scm.org/D6704