Commit Graph

1645 Commits

Author SHA1 Message Date
Pulkit Goyal
0e479f3794 pushvars: move config setting in tweakdefaults and drop the extension
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
2017-11-01 01:41:55 +05:30
Maxime Montinet
ae3b7f2364 infinitepush: prevent hg pullbackup from doing an automatic backup
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
2017-10-31 07:00:31 -07:00
Phil Cohen
9d8a77b7df tests: remove the unused blacklist-sqldirstate file
Differential Revision: https://phab.mercurial-scm.org/D976
2017-10-30 20:56:08 -07:00
Durham Goode
f64fb99447 pushrebase: fix support for tree manifests
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
2017-10-26 14:29:55 -07:00
Durham Goode
0ea8bce203 pushrebase: update fastmanifest test
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.
2017-10-26 13:40:59 -07:00
Mark Thomas
7098f7d4b5 pushrebase: check sources of renames when looking for conflicts
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
2017-10-26 02:47:39 -07:00
Phil Cohen
8b5727a6d0 tests: fix missing entry in test-merge-conflictinfo.t 2017-10-25 22:25:24 -07:00
Phil Cohen
ca7d60b943 conflictinfo: add more information about the conflict-causing command
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
2017-10-25 22:20:32 -07:00
Kostia Balytskyi
a3dca2b53f test-merge-conflictinfo: include expected failures according to sid's hotfix 2017-10-24 17:54:02 -07:00
Durham Goode
29bb657526 tests: fix fastmanifest tests
Changing the config defaults to be part of the config registrar caused the unit
tests to fail (since they don't load the registrar).
2017-10-23 20:13:13 -07:00
Durham Goode
f260c80298 configs: register more of our configs
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
2017-10-23 20:02:57 -07:00
Durham Goode
6db0ad3d03 config: rename allowdivergence to evolution.allowdivergence
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
2017-10-23 19:31:43 -07:00
Stanislau Hlebik
808ae58590 pushrebase: handle pushing phases through separate bundle2 part
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
2017-10-23 10:36:16 -07:00
Jun Wu
ef11eb995c test-pushrebase: add a test case about modifying copy source
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
2017-10-20 17:15:01 -07:00
Martijn Pieters
3044b639af phabricator: if no cert file has been specified, suppress the urllib3 warning
Differential Revision: https://phab.mercurial-scm.org/D1202
2017-10-20 18:27:43 +01:00
Martijn Pieters
6753dfa28e phabricator: use urllib3 to handle conduit HTTP
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
2017-10-18 11:47:16 +01:00
Saurabh Singh
3de34cd5f6 test-fbhistedit-graft: fix the test after removal of 'histeditng' config
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
2017-10-17 14:51:43 -07:00
Jun Wu
5b2261bcad test-infinitepush: allow database password to be empty
When mysql password is empty, we should not pass `-p` flag.
2017-10-17 13:05:18 -07:00
Jun Wu
602840105f test-p4fastimport-import: update with latest p4 output
It seems the output might be different:

```
   $ p4 files test.c
-  //depot/test.c#2 - edit change 4 (ktext)
+  //depot/test.c#2 - edit change 4 (text+k)
```
2017-10-17 13:05:18 -07:00
Jun Wu
145b5fd5d5 test-smartlog: only test template keywords exported by fb-hgext
`successorsset` is not from fb-hgext and should not affect the test output.
2017-10-17 13:05:18 -07:00
Jun Wu
090d0eb5b7 tests: update tests output
Upstream 4a405ffd8b20 ("transaction-summary: show the range of new revisions
upon pull/unbundle (BC)", 2017-10-12) has changed the output.
2017-10-17 13:05:18 -07:00
Saurabh Singh
73f2ea65a0 fbhistedit: removing the experimental config 'histeditng'
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
2017-10-17 11:56:27 -07:00
Catherine Gasnier
796266c8c5 hg show --stat should not show patch
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:
2017-10-16 02:07:53 -07:00
Ryan McElroy
5e93d8bd89 obsshelve: register maxbackups config
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
2017-10-16 01:58:29 -07:00
Jun Wu
fedc57fd93 tests: remove uncommit tests
It should be removed with D751.
2017-10-13 14:57:59 -07:00
Jun Wu
87e672961e sparse: rename to fbsparse
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
2017-10-13 14:51:27 -07:00
Mark Thomas
f14cd2e5d5 infinitepush: always read local backup state from source shared repo
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
2017-10-13 06:59:27 -07:00
Mark Thomas
2908eadaa8 conflictinfo: handle path conflicts
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
2017-10-13 06:59:27 -07:00
Mark Thomas
b5903c56c2 fbhistedit: add graft histedit action
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
2017-10-13 04:05:55 -07:00
Pulkit Goyal
7e0360a6af uncommit: drop the extension from fb-hgext as it was moved to core
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
2017-10-13 12:15:20 +05:30
Adam Simpkins
db0d906e58 sparse: don't crash in non-sparse repositories
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
2017-10-12 14:08:50 -07:00
Adam Simpkins
04525b995f sparse: add a test where sparse gets loaded in an non-sparse repository
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
2017-10-12 14:08:50 -07:00
Zhihui Huang
ba9a6009ff p4fastimporter: optimize sync import - do not write dup filelogs
Differential Revision: https://phabricator.intern.facebook.com/D5966218
2017-10-11 17:49:48 -07:00
Phil Cohen
99c432abfc tests: add #no-check-commit support to test-check-commit-hg.t
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
2017-10-11 11:21:28 -07:00
Phil Cohen
8950244fd8 test-check-confog-hg: remove hiteditng override
D942 removed histeditng, so this should go as well.
2017-10-10 19:56:51 -07:00
Zhihui Huang
a6d5ff8f57 p4fastimport: fix sync commit - complete workflow
Differential Revision: https://phabricator.intern.facebook.com/D5966213
2017-10-10 10:14:00 -07:00
Durham Goode
cb67413bf8 sqldirstate: remove test
sqldirstate is now gone, so let's remove this test dependency.
2017-10-05 13:06:56 -07:00
Durham Goode
19168fe362 tests: update remotefilelog test with phase head capability
Upstream added a new capability, so the tests need updating to show it.
2017-10-04 18:47:11 -07:00
Phil Cohen
29af53de91 test-check-config-hg.t: remove spurious entries 2017-10-04 18:21:28 -07:00
Durham Goode
20612dfe95 tests: update to match upstream changes
Upstream added a new capability about phase heads, so we need to update wire
protocol output.
2017-10-04 18:16:44 -07:00
Durham Goode
eb70db8aaa treemanifest: update the test due to upstream change
10e162bb9bf in upstream hg changed how phases are sent, which changed this
output. It's a benign update.
2017-10-04 18:11:24 -07:00
Phil Cohen
edd23c893d test-check-config-hg.t: revert some changes that shouldn't have been included 2017-10-04 18:02:38 -07:00
Phil Cohen
fe9bb9c641 test-check-config-hg.t: new values post-sqldirstate 2017-10-04 17:58:03 -07:00
Phil Cohen
ad9a59cbe3 progressfile: update test to account for D820
D820 makes the estimation more accurate, so new values are expected.
2017-10-04 17:56:36 -07:00
Phil Cohen
82f05b3c75 sqldirstate: remove
We no longer use this experiment and the upstream refactor breaks it. Let's remove it.

Test Plan:
all sqldirstate tests pass now

Differential Revision: https://phab.mercurial-scm.org/D944
2017-10-04 17:53:40 -07:00
David Soria Parra
a52fe379df p4fastimport: fix resetting file flags
When a file changed to include a flag and then the flag is removed we did not
correctly remove the flag. We now correctly set flags for all revisions.

Differential Revision: https://phab.mercurial-scm.org/D920
2017-10-04 12:57:27 -07:00
Stanislau Hlebik
2502bb5d2c infinitepush: revert D721
Summary:
This diff caused a regression - clients may not have a tree manifests entries
for old commits. That causes infinitepush fail with

```
 KeyError: ('', 'f6db63080ed0d9a81adf2cb266646cf5cf73bb79')
```

Test Plan: Run infinitepush with this diff reverted, make sure it doesn't fail

Reviewers: #fbhgext, ryanmce, durham

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D921
2017-10-03 05:49:06 -07:00
Ryan McElroy
56bc2afcf0 tweakdefaults: add abort flag for colon revset
Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D904
2017-10-03 02:09:23 -07:00
Ryan McElroy
49a8dc8d10 tweakdefaults: minimize revsets test
Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D903
2017-10-03 02:09:23 -07:00
Ryan McElroy
fd9b2e03b1 tweakdefaults: split out revset tests
Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D902
2017-10-03 02:09:23 -07:00