Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 14:06:23 +0200] rev 45595
hg-core: return `Err` on decompression error (D8958#inline-15004 followup)
Differential Revision: https://phab.mercurial-scm.org/D9100
Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 14:01:57 +0200] rev 45594
hg-core: remove useless code (D8958#inline-14988 followup)
Differential Revision: https://phab.mercurial-scm.org/D9099
Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 13:55:47 +0200] rev 45593
hg-core: minor docstring update (D8958#inline-14991 followup)
Differential Revision: https://phab.mercurial-scm.org/D9097
Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 13:53:11 +0200] rev 45592
hg-core: minor code style change (D8958#inline-14986 followup)
Differential Revision: https://phab.mercurial-scm.org/D9096
Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 13:51:16 +0200] rev 45591
hg-core: Explain offset override of first revision
(D8958#inline-14992 followup)
Differential Revision: https://phab.mercurial-scm.org/D9095
Antoine cezar<acezar@chwitlabs.fr> [Mon, 28 Sep 2020 13:46:14 +0200] rev 45590
hg-core: minor code style change (D8958#inline-14993 followup)
Differential Revision: https://phab.mercurial-scm.org/D9083
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 24 Sep 2020 09:32:07 +0200] rev 45589
changing-files: move default constructor value to None
According to Augie Fackler, using tuple as default value confuse PyType when
actual values are passed at init time.
Differential Revision: https://phab.mercurial-scm.org/D9086
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Sep 2020 11:16:12 +0200] rev 45588
rust: format with rustfmt
I suppose I ran the formatter on the tip but not on every patch.
Differential Revision: https://phab.mercurial-scm.org/D9093
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Aug 2020 15:35:34 +0530] rev 45587
merge: store cases when a file is absent post merge in commitinfo
Some merges can result in file being absent form working directory. This can be
one of file was kept deleted or file was removed by merge code.
User might revert the file back before committing. In such cases we will like to
have better handling and create new filenodes.
We store this info in mergestate as commitinfo so that we can use it while
committing to create new filenode if required.
Differential Revision: https://phab.mercurial-scm.org/D9003
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Sep 2020 15:08:15 +0530] rev 45586
tests: add some more debugmergestate calls in `test-merge-criss-cross.t`
Differential Revision: https://phab.mercurial-scm.org/D9029
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 13:58:14 +0530] rev 45585
commit: force create a new filenode if it was set in mergestate by merge
For reasons mentioned in previous commits, we will like to forcefully create a
new filenode sometimes.
Combination of this patch and previous one, we fixed a case in
`test-merge-combination.t`.
This does not yet results in conflict where it should, I need to investigate
more about what's happening as it should be a change-delete conflict now.
Differential Revision: https://phab.mercurial-scm.org/D8989
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 13:44:06 +0530] rev 45584
merge: store commitinfo if these is a dc or cd conflict
delete-changed or changed-delete conflicts can either be resolved by mergetool,
if some tool is passed and using or by user choose something on prompt or user
doing some `hg revert` after choosing the file to remain conflicted.
If the user decides to keep the changed side, on commit we just reuse the parent
filenode. This is mostly fine unless we are in a distributed environment and
people are doing criss-cross merges.
Since, we don't have recursive merges or any other way of describing the end
result of the merge was an explicit choice and it should be differentiated from
it's ancestors, merge algo during criss-cross merges fails to take in account
the explicit choice made by user and end up with a what-can-be-said-wrong-merge.
The solution which we are trying to fix this is by creating a filenode on commit
instead of reusing the parent filenode. This helps differentiate between
pre-merged filenode and post-merge filenode and kind of tells about the choice
user made.
To implement creating new filenode functionality, we store info about these
files in mergestate so that we can read them on commit and force create a new
filenode.
Differential Revision: https://phab.mercurial-scm.org/D8988
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 Sep 2020 13:58:05 +0530] rev 45583
mergestate: update _stateextras instead of reassinging
`merge.applyupdates()` can store extras for a file and _stateextras may not be
empty always. Hence reassigning loses the old values.
We can directly update like this because we switched to using
`collections.defaultdict` for `_stateextras` sometime ago.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Sep 2020 14:11:45 +0530] rev 45582
tests: add some debugmergestate calls in `test-merge-criss-cross.t`
This will help notice the change in upcoming patches much better.
Differential Revision: https://phab.mercurial-scm.org/D9028
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Sep 2020 13:54:46 +0530] rev 45581
tests: add few debugrevlogindex and a log call to see changes in next test
In upcoming patches, we will create a new filenode in couple of cases. Let's add
some debugrevlogindex and a log call so that we can observe those changes
better.
Differential Revision: https://phab.mercurial-scm.org/D8987
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Sep 2020 14:40:12 +0530] rev 45580
merge: disable `m2-vs-ma` optimization if new filenode config is true
The `m2-vs-ma` optimization filters out the file which have not changed between
second parent and the ancestor of the merge. This results in the m1-vs-m2 diff
not processing those files. These files will be required when we are creating
new filenode for salvaged cases as we need to track them to store in mergestate
that file can be salvaged.
Differential Revision: https://phab.mercurial-scm.org/D9027
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Sep 2020 14:31:23 +0530] rev 45579
configitems: add a new config option to control new filenode functionality
This series is adding functionality where we can force create a new filenode for
some files on a merge-commit. This is meant to represent an explicit choice made
by user and hence distingusing the file in the merged commit with the file in
parent by creating a new filenode instead of using the parent one.
This introduces a experimental config option under which this functionality
will be hidden.
A new testcase is added in tests/test-merge-criss-cross.t to test the new
functionality while making the option does not break other scenarios.
Differential Revision: https://phab.mercurial-scm.org/D9026
Connor Sheehan <sheehan@mozilla.com> [Wed, 23 Sep 2020 14:20:49 -0400] rev 45578
git: add test showing `hg commit -i` working on a git repo
Shows `hg commit -i` working on a git repo via the `git`
extension. Adds working directory changes to files `alpha` and
`beta`, then selects only `alpha` changes and commits them.
As of now this would fail for a filename that
includes uppercase characters due to the lack of case folding
support in the extension.
Differential Revision: https://phab.mercurial-scm.org/D9081
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Sep 2020 11:53:44 -0700] rev 45577
merge: replace calls to hg.updaterepo() by merge.update()
The former no longer buys us anything.
Differential Revision: https://phab.mercurial-scm.org/D9067
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Sep 2020 09:57:29 -0700] rev 45576
merge: add a higher-level update() for the common `hg update` use case
This is different from the `update()` function that I just made
private. The new function is specifically for the normal `hg update`
use case. It doesn't do a merge and it doesn't do a clean (forced)
update.
Differential Revision: https://phab.mercurial-scm.org/D9066
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Sep 2020 15:16:35 +0200] rev 45575
sidedata: simply read p2copies files from the `ChangingFiles` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Sep 2020 15:16:16 +0200] rev 45574
sidedata: simply read p1copies files from the `ChangingFiles` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Sep 2020 15:16:01 +0200] rev 45573
sidedata: simply read removed files from the `ChangingFiles` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Sep 2020 15:15:46 +0200] rev 45572
sidedata: simply read added files from the `ChangingFiles` object
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 Sep 2020 15:13:44 +0200] rev 45571
sidedata: add a `decode_files_sidedata` function
Right now the function mostly gather existing code to build a consistent object.
However having this function allow us prepare all user code independently from
the actual side data format change (and associated encoding/decoding changes)
Strictly speaking, we could not need to passe the sidedata explicitly since we
have access to it though the `changelogrevision` object. However, the short
term goal is to drop that first parameter to only pass the sidedata binaries.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Sep 2020 15:37:32 +0200] rev 45570
changelog: add a `changes` property on `changelogrevision`
For the sidedata storage we are moving toward "all in one" block containing the
equivalent of a "ChangingFiles" instance. We do various refactoring beforehand
to prepare the usage of theses new data in the code.
Since the object use slots, the "property cache" tricks cannot be used, and we
cache the value manually.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 22 Sep 2020 10:27:35 +0200] rev 45569
sidedata: rename `encode_copies_sidedata` to `encode_files_sidedata`
We are storing more than copies information, so lets make it clear.
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 21:45:37 +0900] rev 45568
log: pass around --rev option by walkopts
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 21:39:58 +0900] rev 45567
log: parse --limit option by logcmdutil.parseopts()
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 21:35:26 +0900] rev 45566
log: pass around --follow/--follow-first options by walkopts
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 21:06:16 +0900] rev 45565
log: introduce struct that carries log traversal options
I tried to refactor logcmdutil.getrevs() without using an options struct,
but none of these attempts didn't work out. Since every stage of getrevs()
needs various log command options (e.g. both matcher and revset query need
file patterns), it isn't possible to cleanly split getrevs() into a command
layer and a core logic.
So, this patch introduces a named struct to carry command options in slightly
abstracted way, which will be later used by "hg grep" and "hg churn". More
fields will be added to the walkopt struct.
Type hints aren't verified. I couldn't figure out how to teach pytype to
load its own attr type stubs in place of our .thirdparty.attr. Conditional
import didn't work. s/^from \.thirdparty // is the only way I found pytype
could parse the @attr.ib decorator.
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 16:19:01 +0900] rev 45564
log: remove unused argument from _makerevset()
I want to make getrevs() reusable for other commands, but the dependency graph
of this getrevs() function is a mess. Let's minimize it first.
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Sep 2020 16:11:10 +0900] rev 45563
log: remove stale comment about order of user revset
_makerevset() no longer depends on the computed revs since
ea3320015d54 "log:
remove dead code to follow descendants if ascending revisions specified."
Raphaël Gomès <rgomes@octobus.net> [Fri, 25 Sep 2020 17:51:34 +0200] rev 45562
rust: add `dirstate_tree` module
Mercurial needs to represent the filesystem hierarchy on which it operates, for
example in the dirstate. Its current on-disk representation is an unsorted, flat
structure that gets transformed in the current Rust code into a `HashMap`.
This loses the hierarchical information of the dirstate, leading to some
unfortunate performance and algorithmic compromises.
This module adds an implementation of a radix tree that is specialized for
representing the dirstate: its unit is the path component. I have made no
efforts to optimize either its memory footprint or its insertion speed: they're
pretty bad for now.
Following will be a few patches that modify the dirstate.status logic to use
that new hierarchical information, fixing issue 6335 in the same swing.
Differential Revision: https://phab.mercurial-scm.org/D9085
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Oct 2020 19:19:01 +0530] rev 45561
Added signature for changeset
07731064ac41
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Oct 2020 19:18:54 +0530] rev 45560
Added tag 5.5.2 for changeset
07731064ac41
Ludovic Chabant <ludovic@chabant.com> [Tue, 29 Sep 2020 14:38:46 -0700] rev 45559
hgdemandimport: exclude more sqlalchemy modules
We could potentially exclude the entire sqlalchemy library.
Raphaël Gomès <rgomes@octobus.net> [Fri, 24 Jul 2020 16:35:02 +0200] rev 45558
rust-dirstatemap: add #[timed] to dirstatemap read for comparison
Differential Revision: https://phab.mercurial-scm.org/D9084
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Sep 2020 11:12:58 -0700] rev 45557
merge: make low-level update() private (API)
We have very few callers left that call the low-level `merge.update()`
function. I think it's time to make it private. I'll remove the
remaining callers in coming patches, except for one call from the
`rebase` module. I hope to eventually fix that too, but it's more
complex because it requires teaching `merge.graft()` to work with a
dirty working copy.
Differential Revision: https://phab.mercurial-scm.org/D9065
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Sep 2020 10:09:39 -0700] rev 45556
merge: use merge.clean_update() when applicable
We have had this higher-level function (higher than `merge.update()`,
that is) for a while. Let's simply some callers by using it. I don't
know why I didn't do this when I introduced the function.
After this patch, there are no remaining callers that call
`hg.updaterepo()` with `overwrite=True`. We'll clean that up soon.
Differential Revision: https://phab.mercurial-scm.org/D9063
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 15:03:06 -0700] rev 45555
rebase: teach in-memory rebase to not restart with on-disk rebase on conflict
When in-memory rebase runs into conflicts, it redoes the whole rebase
operation. This patch teaches it to instead discard just the current
`overlayworkingctx` and redo that node on disk.
I've tested this by enabling in-memory rebase by default and checking
that there are no unexpected differences after this patch.
The next step is to make it so that `hg rebase --continue` can use
in-memory merge.
Differential Revision: https://phab.mercurial-scm.org/D9076
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Sep 2020 16:30:17 +0200] rev 45554
rust: update Cargo.lock
Differential Revision: https://phab.mercurial-scm.org/D9080
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Sep 2020 16:30:00 +0200] rev 45553
rust-tests: add test to check if `Cargo.lock` is up-to-date
An out-of-date `Cargo.lock` is the source of rebase conflicts, prevents a
reproductible build, introduces desync between the series that introduces a
change in dependencies and the one that eventually commits the `Cargo.lock`,
and is just a general annoyance.
This commit demonstrates that the test works, the next one fixes the
currently out-of-date `Cargo.lock`.
Differential Revision: https://phab.mercurial-scm.org/D9079
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 01 Sep 2020 18:08:24 +0530] rev 45552
scmutil: introduce function to check whether repo uses treemanifest or not
In an upcoming patch, I wanted to check whether current repo uses treemanifest
or not.
I looked for a function and found that at all places we manually check for the
requirement in repo requirements. I guess having a dedicated function for that
is much better.
Differential Revision: https://phab.mercurial-scm.org/D8981
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Thu, 03 Sep 2020 11:07:47 -0400] rev 45551
chg: make is possible to call by default an hg binary located next to chg
When a single version of hg is in use and it's in the PATH, using chg
is just a matter of calling chg.
But when there are multiple installations of hg+chg around, and hg is
referred to with an absolute path, using chg is more annoying because
it requires both changing the invocation to hg to use chg, but also
setting CHGHG.
Currently, we set HGPATH when we build chg to remove the need to set
CHGHG in the previous paragraph. But that means chg now hardcodes its
installation path, which makes the installation not relocatable. Hence
this proposal to make chg find ./hg relative to itself (as opposed to
CHGHG=./hg which find hg relative to cwd).
This only works on linux as written, but since it's opt-in, it sounds
fine.
Tested by hand, as I'm not sure how else to test this.
Differential Revision: https://phab.mercurial-scm.org/D9006
Joerg Sonnenberger <joerg@bec.de> [Wed, 23 Sep 2020 14:44:21 +0200] rev 45550
phases: fix performance regression with Python 2
Unlike Python 3, xrange doesn't support efficient "in" and uses a linear
time scan instead. Expand the condition to handle it fast.
Differential Revision: https://phab.mercurial-scm.org/D9072
Martin von Zweigbergk <martinvonz@google.com> [Wed, 23 Sep 2020 09:04:32 -0700] rev 45549
rebase: move check for unresolved conflicts into lower-level rebasenode()
I want to add another call to `rebasenode()` and it's better to not
have to duplicate the check.
Differential Revision: https://phab.mercurial-scm.org/D9075
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 15:40:26 -0700] rev 45548
rebase: add dryrun property to rebaseruntime
I want to be able to check the property in
`rebaseruntime._rebasenode()`. Passing the value via the runtime is a
convenient way.
Differential Revision: https://phab.mercurial-scm.org/D9074
Martin von Zweigbergk <martinvonz@google.com> [Wed, 23 Sep 2020 09:21:26 -0700] rev 45547
rebase: when collapsing, p1 == dest, so use the former only
`dest` is the destination we're rebasing onto, which is always the
same as `p1` when using `--collapse`. This lets us simplify a bit.
Differential Revision: https://phab.mercurial-scm.org/D9073
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Sep 2020 15:37:03 -0700] rev 45546
rebase: remove redundant isinmemory argument from _origrebase()
The argument is redundant with `rbst.inmemory`, which makes it unclear
what to do if they were somehow different.
Differential Revision: https://phab.mercurial-scm.org/D9070
Martin von Zweigbergk <martinvonz@google.com> [Tue, 22 Sep 2020 23:18:37 -0700] rev 45545
largefiles: prevent in-memory merge instead of switching to on-disk
I enabled in-memory merge by default while testing some changes. I
spent quite some time troubleshooting why largefiles was still
creating an on-disk mergestate. Then I found out that it ignores the
callers `wc` argument to `mergemod._update()` and always uses on-disk
merge. This patch changes that so we raise an error if largefiles is
used with in-memory merge. That way we'll notice if in-memory merge is
used with largefiles instead of silently replacing ignoring the
`overlayworkingctx` instance and updating the working copy instead.
I felt a little bad that this would break things more for users with
both largefiles and in-memory rebase enabled. So I also added a
higher-level override to make sure that largefiles disables in-memory
rebase. It turns out that that fixes `run-tests.py -k largefiles
--extra-config-opt rebase.experimental.inmemory=1`.
Differential Revision: https://phab.mercurial-scm.org/D9069
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Sep 2020 09:56:48 -0700] rev 45544
merge: add a back_out() function to encapsulate update()
I've sent several earlier patches adding `merge.clean_update()`,
`merge.merge()` etc, one function for each use case. This patch
continues that work. I plan to hide the complex `update()` eventually.
Differential Revision: https://phab.mercurial-scm.org/D9064
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 18 Sep 2020 17:19:49 +0530] rev 45543
tests: update test-share-safe to work with non-zstd versions
zstd is not available always like pure py versions. Hence we wrap that part
around `#if zstd`. To make sure the functionality is tested on pure version
as well, I have added another requirement addition test.
Differential Revision: https://phab.mercurial-scm.org/D9045
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 15 Sep 2020 16:51:11 +0200] rev 45542
rhg: add a limited `rhg cat -r` subcommand
It only supports revision specification (rev or full hash) and the list of files
to cat.
Differential Revision: https://phab.mercurial-scm.org/D9052
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 11 Sep 2020 17:32:53 +0200] rev 45541
hg-core: add a `CatRev` operation
Differential Revision: https://phab.mercurial-scm.org/D9051
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 15 Sep 2020 16:46:57 +0200] rev 45540
hg-core: add `files_with_nodes` to `Manifest`
Differential Revision: https://phab.mercurial-scm.org/D9050
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 15 Sep 2020 16:45:27 +0200] rev 45539
hg-core: add path_encode
Differential Revision: https://phab.mercurial-scm.org/D9049
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 15 Sep 2020 10:52:28 +0200] rev 45538
hg-core: impl TryFrom<PathBuff> for HgPathBuf
Differential Revision: https://phab.mercurial-scm.org/D9048
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 09 Sep 2020 14:53:15 +0200] rev 45537
rhg: add `--revision` argument to `rhg files`
Add the option to list the tracked files of a revision given its number
or full node id.
Benched on a clone of moz-central
where tip is 1671467:
81deaa1a68ebb28db0490954034ab38ab269409d
files -r
81deaa1a68ebb28db0490954034ab38ab269409d > out.txt
hg 0m1.633s
rhg 0m0.157s
files -r
81deaa1a68ebb28db0490954034ab38ab269409d > /dev/null
hg 0m0.415s
rhg 0m0.143s
Differential Revision: https://phab.mercurial-scm.org/D9015
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 18 Sep 2020 16:52:16 +0200] rev 45536
hg-core: add a `ListRevTrackedFiles` operation
List files tracked at a given revision.
Differential Revision: https://phab.mercurial-scm.org/D9014
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 09 Sep 2020 12:12:11 +0200] rev 45535
hg-core: simplify `list_tracked_files` operation
Use directly `ListDirstateTrackedFiles` rather than having an operation builder.
Differential Revision: https://phab.mercurial-scm.org/D9013
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 18 Sep 2020 16:52:08 +0200] rev 45534
hg-core: add `Revlog.get_node_rev`
Find the revision of a node given its full hash.
Differential Revision: https://phab.mercurial-scm.org/D9012
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 09 Sep 2020 14:50:58 +0200] rev 45533
hg-core: add `Manifest` a specialized `Revlog`
A facade to `Revlog` to provide a `manifest` specific interface.
Differential Revision: https://phab.mercurial-scm.org/D9011
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 09 Sep 2020 16:25:23 +0200] rev 45532
hg-core: add `Changlog` a specialized `Revlog`
A facade to `Revlog` to provide a `changelog` specific interface.
Differential Revision: https://phab.mercurial-scm.org/D9010
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 02 Sep 2020 15:23:25 +0200] rev 45531
hg-core: check data integrity in `Revlog`
Check that the hash of the data reconstructed from deltas
matches the hash stored in the revision.
Differential Revision: https://phab.mercurial-scm.org/D9005
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 23 Sep 2020 12:26:16 +0200] rev 45530
rhg: Add debug timing
Differential Revision: https://phab.mercurial-scm.org/D8962
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 17 Aug 2020 16:56:39 +0200] rev 45529
rhg: add a limited `rhg debugdata` subcommand
Differential Revision: https://phab.mercurial-scm.org/D8961
Antoine Cezar <antoine.cezar@octobus.net> [Wed, 09 Sep 2020 12:07:05 +0200] rev 45528
rhg: add a `DebugData` `Command` to prepare the `rhg debugdata` subcommand
Differential Revision: https://phab.mercurial-scm.org/D8960
Antoine Cezar <antoine.cezar@octobus.net> [Thu, 13 Aug 2020 16:22:15 +0200] rev 45527
hg-core: define a `DebugData` `Operation`
Read the content of a `revlog` at a given revision.
Differential Revision: https://phab.mercurial-scm.org/D8959
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
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
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
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
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
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
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
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
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
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
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
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
Augie Fackler <augie@google.com> [Mon, 21 Sep 2020 15:05:38 -0400] rev 45514
merge with stable
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
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
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
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
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.
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).
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.
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.
Augie Fackler <augie@google.com> [Fri, 18 Sep 2020 10:48:43 -0400] rev 45505
merge with stable
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.
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.
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
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
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