Commit Graph

13697 Commits

Author SHA1 Message Date
Jun Wu
8fd207a853 revset: stop supporting origin() and destination()
Summary: They will be replaced by successors and predecessors.

Reviewed By: singhsrb

Differential Revision: D14000097

fbshipit-source-id: 07f0c97edd7eb16ad665c00886c00212d516ae72
2019-02-12 21:45:11 -08:00
Jun Wu
9210419543 test-graft: rewrite test cases to use smaller repo
Summary:
Rewrite "graft --force" and "empty graft" test cases to not depend on the
previous repo state. Remove the "same origin policy" test since eventually
we'll use mutation history to test origins and the code path here would be
rewritten.

This makes it easier to change the rest of the test.

Differential Revision: D14000100

fbshipit-source-id: 26002774c370a965a9bca157e08246c89aa5e274
2019-02-12 21:45:10 -08:00
Jun Wu
7ed91e39b1 test-commit-amend: rewrite the entire test
Summary:
The test has many problems. Namely, it depends too much on previous repo state,
uses legacy features like named branches, revision numbers, unsafe strip, and rollback,
and is too verbose and over-testing a lot of things (ex. test commit template
many times, test diff output many times, test bundle debug output
unnecessarily, etc).

Rewrite the test to solve all of the above issues:
- Every individual test case uses separate small repos.
- Do not use revision numbers.
- Do not use legacy strip.
- Do not use named branch.

This also reveals that amending a merge commit is buggy in many ways. We can
probably fix them up when cleaning up the commit/merge logic.

Differential Revision: D13993825

fbshipit-source-id: 9e1ff8054741b4356319ce37daea3c5184933927
2019-02-12 21:45:10 -08:00
Jun Wu
c8868a0d31 test-commit-interactive: avoid using branches
Summary:
The use of branches is only to create a merge commit. Use drawdag to do that
instead.

Differential Revision: D13993829

fbshipit-source-id: b5f217e7d9ba535b7fd379ec4ca31b899350de02
2019-02-12 21:45:10 -08:00
Jun Wu
cd10b49318 test-push-warn: remove the test
Summary:
The test is mainly about warnings of new heads, which we might want to remove
entirely (see D8148016). The test is also deeply coupled with named branches,
which will be removed.

Differential Revision: D13993828

fbshipit-source-id: 950f0cb98cd6cb2c8192f1ff36ce2d6b642d1225
2019-02-12 21:45:10 -08:00
Jun Wu
ef58a086e5 test-tag: replace the test with a simple local tag test
Summary:
test-tag.t uses named branches too much. Since global tags are also going away,
replace the test with a simple one about local tags. The local tag portion in
test-tag.t is not too much, though.

Differential Revision: D13993827

fbshipit-source-id: b3a86fa1e07b945fc2926f00ef9de31a4506ba37
2019-02-12 21:45:10 -08:00
Jun Wu
688f14a527 test-shelve: remove test cases about named branches
Summary: They won't pass with the new code.

Differential Revision: D13993826

fbshipit-source-id: e5156da05ef922940198c2fcf7458a086ce23bb4
2019-02-12 21:45:10 -08:00
Jun Wu
87b87d5490 rebase: remove --keepbranches flag
Summary: Branches are going away. Remove related features.

Differential Revision: D13993824

fbshipit-source-id: 8afb01912df016bda08be5bc22ac52be7f5168eb
2019-02-12 21:45:10 -08:00
Jun Wu
e8b4af8f69 test-rebase-collapse: rewrite the entire test
Summary:
Rewrite the test:
- Use drawdag to create test repos.
- Use commit hash instead of revision numbers for new test cases.
- Remove unrelated test cases (ex. strip, branch heads).
- Remove use of named branch.

Differential Revision: D13993823

fbshipit-source-id: d20954dec1b39313f08699f796d5db167dfee641
2019-02-12 21:45:10 -08:00
Jun Wu
5310a34e3f test-rebase-cache: remove the test
Summary:
The "cache" refers to branch and tag caches. Both of them are planned for
removal. Therefore remove the test.

Reviewed By: singhsrb

Differential Revision: D13978569

fbshipit-source-id: 8593f54af4ecd3fb759d2a3a0fe00eb9d8505112
2019-02-12 21:45:10 -08:00
Jun Wu
140d127066 test-strip: remove tests about branches
Summary: Branches are going away.

Differential Revision: D13978567

fbshipit-source-id: a071d7bc032a456a4eb69587152f85fd772f014f
2019-02-12 21:45:10 -08:00
Jun Wu
ab062b1fc8 test-url-rev: do not use named branches
Summary: Use bookmarks instead.

Differential Revision: D13978564

fbshipit-source-id: 9ffe90500addbb6c82cb1a5d12d2d72216f00da0
2019-02-12 21:45:10 -08:00
Jun Wu
fbccd19ed7 patchbomb: remove the extension
Summary:
`test-patchbomb.t` uses named branches and does not look simple to fix.
We don't use email patches internally, and it's not hard to write scripts
around `hg export`. Therefore drop the extension and its tests.

Reviewed By: singhsrb

Differential Revision: D13978577

fbshipit-source-id: 19867ae68c19c996bfce064eb2234705939db9ea
2019-02-12 21:45:10 -08:00
Jun Wu
64c43d2eab import: remove the --import-branch flag
Summary: Branches are going away.

Reviewed By: singhsrb

Differential Revision: D13978568

fbshipit-source-id: b9b4f3d2755757c0d3780bbb10c4579bf8d15fef
2019-02-12 19:54:31 -08:00
Jun Wu
56039b2d0b test-import-bypass: rewrite parts using named branches
Summary: Make it future-proof.

Differential Revision: D13978574

fbshipit-source-id: 7128223113415316af636b4e7437e7cb34f72e6e
2019-02-12 19:54:31 -08:00
Jun Wu
9b4859b2d1 test-rebase-newancestor: rewrite parts using named branches
Summary: Make it future-proof.

Differential Revision: D13978565

fbshipit-source-id: 7816762ba482b6ff2be4a9ce6e921d7e518f3614
2019-02-12 19:54:31 -08:00
Jun Wu
9f9c514b0f test-encoding: avoid using named branches
Summary: Make it future-proof.

Reviewed By: singhsrb

Differential Revision: D13978576

fbshipit-source-id: 3ac619a0856a567f34d3a78cd5c333b3a68a91d4
2019-02-12 19:54:31 -08:00
Jun Wu
275bc9b8e5 test-ssh-bundle1: remove the test
Summary:
The test uses named branches so it will break without modification in the
future. Since bundle1 and ssh are "unloved" features, remove the test instead
of fixing it.

Reviewed By: singhsrb

Differential Revision: D13978573

fbshipit-source-id: d5446685056457766d1752446de9d842f40f3ebf
2019-02-12 19:54:31 -08:00
Jun Wu
5785d860ff test-clone-update-order: remove the test
Summary:
The test uses named branches extensively, partically because there are multiple
ways to specify where to update:

  hg clone URL#NAME1 -b NAME2 -u NAME3
              ^^^^^^    ^^^^^    ^^^^^
         branch name    |        |
           branch name, again!   |
                  revset, can also be a branch name

In the long run, we'll kill NAME1 (`#...` syntax) and NAME2 (`clone -b` flag).
So the (undesirable) complexity will be gone. Remove the test to make the
transition easier.

The `clone -u REV` feature is still tested in `test-clone.t`.

Reviewed By: singhsrb

Differential Revision: D13978578

fbshipit-source-id: 839ad39779c4526e4be48e133610bdb46f57fc93
2019-02-12 19:54:30 -08:00
Jun Wu
c74e2991dc test-revset-outgoing: stop using '#branchname' in path
Summary: This makes it compatible with future releases.

Reviewed By: singhsrb

Differential Revision: D13978572

fbshipit-source-id: 9394a811b848f1160aaa54be0d09dfc2ea142e81
2019-02-12 19:54:30 -08:00
Jun Wu
4e5a678efb test-remotenames-basic: avoid using branches
Summary: Make it future proof.

Differential Revision: D13978566

fbshipit-source-id: 8c6ecb3f4d94212e49f7041492abbe3d06b0a2bc
2019-02-12 19:54:30 -08:00
Jun Wu
04f6795519 remotenames: remove logic about named branches
Summary: Named branches are going away. Remove the logic around it.

Reviewed By: phillco

Differential Revision: D13978575

fbshipit-source-id: d6e28d7cadffa612f74a2afc12800829d6113dfa
2019-02-12 19:54:30 -08:00
Jun Wu
b88c0ebb91 test-infinitepush-delscratchbookmarks: do not use branches
Summary:
The test uses branches to name commits server-side and isolate them from the
bookmark namespace. Branches are going away. Use local tags instead.

Reviewed By: phillco

Differential Revision: D14057253

fbshipit-source-id: 33b8ab63027042eb5e244187874190bdd31e62d1
2019-02-12 19:54:30 -08:00
Jun Wu
72febd6068 test-remotenames-schemes: rewrite the test
Summary:
The test uses named branches heavily. It seems the test just wants to make
sure remotenames work with the schemes extension. Rewrite it to stop using
named branches.

Reviewed By: singhsrb

Differential Revision: D13978570

fbshipit-source-id: 3d0f284bb2398da0283b3bf5a06d879182a70d84
2019-02-12 19:54:30 -08:00
Xavier Deguillard
25f6272a15 test-fb-hgext-treemanifest-repack.t: use packsonly when purging packs
Summary:
Purging of packs may happen before the repack operation, and when loosefiles
are also present, repack will reconstruct the packs from them. By forcing a
packsonly, we won't have a chance of reconstructing the purged ones.

Differential Revision: D14013788

fbshipit-source-id: d77d9ec2b9c5a086caaf9164a8ac56dd7d1e1255
2019-02-12 11:21:34 -08:00
Xavier Deguillard
e241404290 remotefilelog: always refresh before runonpacks
Summary:
The refresh function is intended to load on-disk packfiles that aren't yet
present in the cache, but it had several issues that resulted in unexpected
behavior. Mainly, the new files would be added in the wrong order in the cache,
and runonpacks would not update the last used packs.

Differential Revision: D14013785

fbshipit-source-id: da4151b859441f0ba51863f3907852922c255f82
2019-02-12 11:21:34 -08:00
Jun Wu
946fa43efd fsmonitor: update watchman clock if too many files are returned
Summary:
This should auto recover from a state where watchman returns too many files,
which makes "hg status" slow.

The default config value 200 is not chosen very scientifically, but it should
cover the 6s status case where there are 90k changed files reported.

Differential Revision: D14036494

fbshipit-source-id: 368f53e99e2e54343a6ac9145cbb86e4ac65e4ac
2019-02-12 11:16:12 -08:00
Jun Wu
b53bc49971 fsmonitor: add a test showing suboptimal behavior
Summary:
akushner encountered a case where "hg status" takes 5+ seconds and cannot
self-recover. That is because watchman constantly returns huge number of files
and fsmonitor didn't choose to update the clock to address that.

Reviewed By: DurhamG

Differential Revision: D14036493

fbshipit-source-id: 0bd8f7c9e3a51b6b4d2a1584b68883f8579e3f0f
2019-02-12 11:16:12 -08:00
Jun Wu
98bb16cace hgsql: fix hggit sync
Summary: Teach mysql connector to deal with bytearray.

Reviewed By: DurhamG, StanislavGlebik

Differential Revision: D14025816

fbshipit-source-id: 738d9ef37b985afad5fe62815be134a4a5913b9a
2019-02-11 13:47:12 -08:00
Jun Wu
33de65a309 test-hgsql-hggit: demostrate bytearray encoding error
Summary: This is caused by D13516212, and not covered by tests.

Reviewed By: DurhamG, StanislavGlebik

Differential Revision: D14025817

fbshipit-source-id: 8a529085c40c5d2ae17ccf3de1ccea22c8d7dbd2
2019-02-11 13:47:12 -08:00
Kostia Balytskyi
eaab89f103 test-fb-hgext-remotefilelog-corrupt-cache: do not use truncate
Summary: It is unavailable on OSX, but we have a custom implementation.

Reviewed By: DurhamG

Differential Revision: D14028103

fbshipit-source-id: 4b6916792fc9da43795b0f9db57ec2a057c92283
2019-02-11 13:06:29 -08:00
Kostia Balytskyi
c526eed2fa test-profile: fix the edenscm-rename fallout
Summary: Should fix https://fburl.com/sandcastle/3sdblrdd.

Reviewed By: mitrandir77

Differential Revision: D14026757

fbshipit-source-id: 685bc95a13309459a015f4ae93abd500db9eeb11
2019-02-11 11:14:17 -08:00
Jun Wu
495cdac243 test-remotenames-with-aliases: remove the test
Summary:
The test is about treating the "default" remote branch specially.
Named branches are going away, therefore delete the test.

Reviewed By: ikostia

Differential Revision: D13976850

fbshipit-source-id: 0283e78c120efd0cf9c91811b823923780cdbfd9
2019-02-08 14:40:28 -08:00
Jun Wu
a379d745b3 test-merge-default: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954461

fbshipit-source-id: 373afe1df712856a46638da8ea84cf2e56c494ab
2019-02-08 14:40:28 -08:00
Jun Wu
4021b6f311 test-pull-update: remove part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954455

fbshipit-source-id: a98918dff351db2117ed57b852d390312bb203fb
2019-02-08 14:40:28 -08:00
Jun Wu
93867ff88f test-subrepo: remove the test
Summary:
The test uses named branch. Since subrepo is also on the list to kill, just
remove the test now.

Differential Revision: D13954459

fbshipit-source-id: 29e8009376081d964441497796fda3490f2137e3
2019-02-08 14:40:28 -08:00
Jun Wu
b5599c717f test-glog: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954463

fbshipit-source-id: 40fb1044dbe5bacfc68c6b04dca15f1c3dc92df1
2019-02-08 14:40:28 -08:00
Jun Wu
dec8f9f3e9 test-ssh: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954457

fbshipit-source-id: f48c2ac7ba5072bae458283f7b3afb4900b78442
2019-02-08 14:40:27 -08:00
Jun Wu
66ea9f2284 test-revset-outgoing: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954462

fbshipit-source-id: 42031851ecb6be66a2ec61fae7107b8b6f498afc
2019-02-08 14:40:27 -08:00
Jun Wu
7a1977912a test-rebase-pull: remove part related to named branch or tags
Summary: Make it future-proof.

Differential Revision: D13954454

fbshipit-source-id: c6a746ae4035cdff8ead88514aa09f8ef3db0c18
2019-02-08 14:40:27 -08:00
Jun Wu
7637cfd5f3 test-fb-hgext-fastannotate-remotefile: remove the test
Summary:
The test was about the connection handling between remotefilelog and
fastannotate. It uses named branch to test certain code paths, which
is not trivial to migrate off.

We'll probably rework the protocol used here and maybe do something very
different regarding on linelog with Mononoke. Therefore just remove the
test for now.

Reviewed By: singhsrb

Differential Revision: D13934435

fbshipit-source-id: 9ba0b760ba17efd3ede6de7612e6532f3d13a4f8
2019-02-08 14:40:27 -08:00
Jun Wu
b8b6316334 test-convert-splicemap: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954466

fbshipit-source-id: d8ba31e53eb912451ba451b367225af66c7194ac
2019-02-08 14:40:27 -08:00
Jun Wu
564597d13f test-rebase-check-restore: rewrite part related to named branch
Summary: This makes the test future-proof.

Differential Revision: D13954469

fbshipit-source-id: 94c0289dc7ef8159592bd541da4021c5152dc298
2019-02-08 14:40:27 -08:00
Jun Wu
ca843d3676 test-sparse-merges: rewrite part related to named branch
Summary:
The test was relying on the ability to merge a "fast-forward" commit, it's no
longer possible without named branches. So the DAG was changed from two linear
commits to "Y"-ish 3 commits.

This makes the test future-proof.

Differential Revision: D13954460

fbshipit-source-id: 944747404843e985f06d18fe0618843dca64630f
2019-02-08 14:40:27 -08:00
Saurabh Singh
b02696d961 remotefilelog: fix the test broken by defaulting file blobs to version 1
Summary: This test was broken by D13980892 and needs to be updated.

Reviewed By: DurhamG

Differential Revision: D14001840

fbshipit-source-id: 6487159445f8aa049996a35e1bb70dad5af614ac
2019-02-08 10:52:16 -08:00
Liubov Dmitrieva
3cc2093659 fix tests
Summary: Size is not always the same, let just use number of files.

Reviewed By: rlangst

Differential Revision: D14004261

fbshipit-source-id: 13e21d8fd95ee09fc54c750ceecc48bcd484bc9e
2019-02-08 08:30:11 -08:00
Wez Furlong
35e2b7c6ff hg: fix lfs and journal extension postshare wrapping
Summary:
this fixes `hg-new-workdir` by matching the function signature
and propagating the arguments.

Reviewed By: singhsrb

Differential Revision: D13992348

fbshipit-source-id: 582025affe2e0511f239e82bc880b2fecea84ac7
2019-02-07 18:58:40 -08:00
Wez Furlong
45a59ef1d4 hg: run-tests: treat a parse error as return code 1
Summary:
previously, unexpected output would cause the harness to
stack trace and not show the actual test failure.

This catches the error and treats it as a failed run, which causes
the test output to be displayed.

No more `ValueError: invalid literal for int() with base 10: '0\xe2\x90\x8a'`

Reviewed By: DurhamG

Differential Revision: D13995000

fbshipit-source-id: 5c1a9e8d6f8e81a924cdbf760fa75cdc0d33b74d
2019-02-07 18:58:40 -08:00
Jun Wu
9efa79ce5c test-commit-multiple: rewrite parts related to named branch
Summary:
Change the test to avoid creating branches so it could still work
once `hg branch` gets removed.

Differential Revision: D13954467

fbshipit-source-id: ec6ee3430cecd4ee4daa23b303f0a36be9198659
2019-02-07 18:17:19 -08:00
Jun Wu
5dfbe25ca2 test-mv-cp-st-diff: rewrite parts related to named branch
Summary:
Change the test to not create branches, so it could still work
once `hg branch` gets removed.

Differential Revision: D13954465

fbshipit-source-id: 10ff86b2a765cb8bd57d1589a4e3624d553b4d07
2019-02-07 18:17:18 -08:00