The old version of this test relied on the sendflat config being set to false so
it would only send the trees. Since that config is gone, the test then started
sending flat manifests, so it wasn't actually testing what it should've been.
This patch fixes that by making it push a tree only commit and ensuring the
commit hook executes correctly. The test changed a bit, because the hash changed
after the push, because it was a tree only commit on the client (and therefore
used the tree hash) but a hybrid commit on the server (and therefore used the
flat hash).
Differential Revision: https://phab.mercurial-scm.org/D1267
Previously the sendflat config decided if we should send flat manifests or not.
To reduce the number of config permutations we have to handle, let's change the
code to always send the flat manifests, if it exists.
Differential Revision: https://phab.mercurial-scm.org/D1266
Previously we were relying on config values to determine when to send or not
send tree and flat manifests. This resulted in complicated permutations to test.
Let's remove these config values and always send trees if we have them. A future
patch will do the same for flat manifests.
Differential Revision: https://phab.mercurial-scm.org/D1265
Previously, hiddenoverride only unpins nodes when createmarkers gets called.
However, with scmutils.cleanupnodes, createmarkers will not get called when
the nodes are already obsoleted. This patch makes hiddenoverride check
cleanupnodes too to unpin nodes properly.
Differential Revision: https://phab.mercurial-scm.org/D994
Summary:
Use python instead of jq in pullbackup test
fixes breakage reported in D6186148
Test Plan:
Run unit tests
Verify build runs without a hitch
Reviewers: swhitaker
Differential Revision: https://phabricator.intern.facebook.com/D6208705
This patch adds support to fold for outputting node changes as a part of it's
json output.
The nodechanges is a dictionary having predecessor as key and list of successors
as value. The successor is a list as we can have multiple successor for a
predecessor in case of split and having a generic format will be helpful.
After this patch, if you want json output from fold, do
`hg fold ..args.. -Tjson -q`
To just get the dictionary of hash changes, do
`hg fold ..args.. -T '{nodechanges|json}' -q`
-q is required to prevent the ui.status output coming from hg.update and rebase
part.
Since we have added support to fold for nodechanges, it has been added to
blacklist for cleanupnodes wrapper in tweakdefaults.
Differential Revision: https://phab.mercurial-scm.org/D1041
The logic of pushvars extension was moved to core and the extension here just
used to set a config which defaults to False in core. Let's move that config
setting to tweakdefaults and drop the extension.
Differential Revision: https://phab.mercurial-scm.org/D1275
Summary:
Instead of making an autobackup, make hg pullbackup simply
write the backup state from the recently restored backup.
Test Plan:
cd ~/facebook-hg-rpms/fb-hgext/tests
source ../../hg-dev
rt test-infinitepush-*.t
Reviewers: #mercurial, cdown, stash
Reviewed By: stash
Subscribers: mjpieters, medson
Differential Revision: https://phabricator.intern.facebook.com/D6186148
Tasks: T22856338
Tags: bootcamp
Signature: 6186148:1509457565:e66cefc6e95d9b1cfb91e9bf8fa5c40b05e4fb82
pushrebase can't use the standard rev.manifest() or rev[filepath] accessors
because they aren't aware of treemanifests. Let's refactor our manifest and
filectx accessor patterns into a separate function and use it in the two places
that need manifests.
test-treemanifest-server.t was failing before this. One test was modified
because the does-it-have-the-tree check is now done earlier, before the lock is
taken, so we abort before the output is printed.
Differential Revision: https://phab.mercurial-scm.org/D1251
This test looked like it's been funky since it was introduced. It harded code
an exception from a bug. The bug was that we're storing bundle manifests in a
cache during pushrebase, and because those manifests are hybrid manifests they
haven't actually loaded from disk. Later we close the bundle, then after that we
try to access these cached manifests, which throws because they can't read from
the file.
The recent change to read the copied files from the manifest before the lock is
taken, forces these manifests to be in loaded, thus fixing the problem. So let's
update the test.
When checking the bundle contents against the revisions it is being rebased
over, include the sources of renames, as changes made in those files also
conflict with the bundle.
Differential Revision: https://phab.mercurial-scm.org/D1199
In the old version of this extension it was too difficult to determine how to
resume or abort the command that generated conflicts. Let's add that
information so consumers can programatically continue or abort.
Differential Revision: https://phab.mercurial-scm.org/D713
Upstream has added devel warnings that require us to register all the configs
and remove the defaults that are specified at read time. This doesn't fix all
the cases, but is the start.
Differential Revision: https://phab.mercurial-scm.org/D1206
Upstream has renamed this config. Since the old config name was still an alias
for the new name, it was technically only breaking the test output where we
hardcoded the config name in the output. But I went ahead and updated every
place anyways.
Differential Revision: https://phab.mercurial-scm.org/D1209
In 272dd7d8a1bb1b2e93697b5b65183b08c8bf0853 upstream hg commit phase pushes
started to use separate bundle2 part. Because of that:
1) pushkey hook is not called when updating phases.
2) pushkey bundle2 part doesn't process phases anymore, 'phase-heads' part do
it instead.
It caused breakages in pushrebase. This diff fixes it.
Test Plan:
Run tests test-pushrebase* and test-treemanifest*
Differential Revision: https://phab.mercurial-scm.org/D1204
This is what happened to D1048 and D1050. Pushrebase should ideally check
the copy source in additional to modified files and block the push.
Differential Revision: https://phab.mercurial-scm.org/D1172
urlgrabber is not available on Windows machines; urllib3 is MIT licensed so can
safely be bundled.
Test Plan:
Run the tests, run hg ssl against a repository with valid arcanist config.
Differential Revision: https://phab.mercurial-scm.org/D1026
Summary:
This is a new test which is broken due to D1118. Ideally, this would
have been fixed in D1118 itself but since it was introduced later, it has to be
fixed now.
Test Plan: Ran the test again.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D1171
Summary:
The config 'histeditng' was removed in upstream recently and is
therefore, no longer required. This commit removes the config and fixes some
tests which were dependent on it.
Test Plan: Ran all the tests.
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D1118
Summary: show extension: 'hg show --stat' should not show patch, just like 'git show --stat'
Test Plan: test-show.t
'hg show --stat' shoes diffstat, not patch
'hg show' shows patch, but no stat
Reviewers: rmcelroy,phillco
Subscribers: ianj
Tags:
Tasks: 22546204
Blame Revision:
Summary:
Renaming this config to `obsshelve.maxbackups` for now eliminates the overlap with the
`shelve.maxbackups` config and fixes the root problem that D995 was trying to solve.
Reviewers: #fbhgext, durham
Reviewed By: #fbhgext, durham
Subscribers: durham
Differential Revision: https://phab.mercurial-scm.org/D1054
This avoids conflict with the core extension (`hgext/sparse.py`). In
development mode, the `hgext` version takes precedence and people can easily
use the wrong sparse extension.
`sparse.py` is kept for compatibility.
Differential Revision: https://phab.mercurial-scm.org/D1048
With shared working directories, infinitepush must always read the backup state
from the source repo. Currently it does that for pushing backups, but not for
commands that just query the backup state.
Differential Revision: https://phab.mercurial-scm.org/D1052
Upstream recently added path conflicts as a concept. Update the
conflictinfo extension to understand and show path conflicts.
Path conflicts are different to other kinds of conflicts, so appear
in a separate list in the form:
"pathconflicts:" [{
"path": "path/to/directory",
"fileorigin": "local", # or "remote"
"renamedto": "path/to/renamedfile"
}]
Differential Revision: https://phab.mercurial-scm.org/D1051
Add a new `histedit` verb: `graft`. This allows grafting (copying) of
changesets from outside of the history that is being edited, using the
node hash of the other changeset.
The other changeset is left intact - its contents are duplicated in a new
changeset.
The other changeset must not be one of the changesets that are being
edited as part of the histedit.
Differential Revision: https://phab.mercurial-scm.org/D1025
This patch drops the uncommit extensions which has been moved to core. The
in-core extension does not allow bare `hg uncommit` on dirty working directory.
One need to set `experimental.uncommitondirtywdir = True` to do `hg uncommit` on
dirty working directory.
So this patch also set the required config to True in tweakdeafults.py to
maintain the behaviour.
Differential Revision: https://phab.mercurial-scm.org/D751
Summary:
Update the workingfilectxdata() to check that this is actually a sparse
repository before trying to call repo.sparsematch()
Test Plan: Update the test to confirm that "hg diff" works instead of crashes now.
Reviewers: #fbhgext, mbthomas
Reviewed By: #fbhgext, mbthomas
Differential Revision: https://phab.mercurial-scm.org/D1023
Summary:
Add a test to make sure the sparse extension works with non-sparse
repositories. The share extension can cause the sparse extension to be loaded
even if the current working directory is not sparse.
Currently "hg diff" crashes in this scenario. After the changes in D788, it
now tries to run `repo.sparsematch()` without first checking to see if the
repository is actually a sparse repository.
Test Plan: Ran it.
Reviewers: #fbhgext, mbthomas
Reviewed By: #fbhgext, mbthomas
Differential Revision: https://phab.mercurial-scm.org/D1022
The upstream test has this exclusion, and without it, commits that pass because of it will fail in our own CI. So let's add it.
Differential Revision: https://phab.mercurial-scm.org/D1010