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.
pulkit |
hg-reviewers |
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.
Lint Skipped |
Unit Tests Skipped |
hgext/transplant.py | ||
---|---|---|
737 | let's name this function continue only as it's in transplant.py and a continue implies that we are continuing transplant. |
Path | Packages | |||
---|---|---|---|---|
M | hgext/transplant.py (8 lines) | |||
M | tests/test-transplant.t (17 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
7c5c9c3ae46e | 2db8a826dab3 | Taapas Agrawal | Jul 24 2019, 9:02 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | taapas1128 | ||
Abandoned | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Accepted | taapas1128 | ||
Accepted | taapas1128 | ||
Needs Revision | taapas1128 |
#testcases commandmode continueflag | |||||
$ cat <<EOF >> $HGRCPATH | $ cat <<EOF >> $HGRCPATH | ||||
> [extensions] | > [extensions] | ||||
> transplant= | > transplant= | ||||
> EOF | > EOF | ||||
#if continueflag | |||||
$ cat >> $HGRCPATH <<EOF | |||||
> [alias] | |||||
> continue = transplant --continue | |||||
> EOF | |||||
#endif | |||||
$ hg init t | $ hg init t | ||||
$ cd t | $ cd t | ||||
$ hg transplant | $ hg transplant | ||||
abort: no source URL, branch revision, or revision list provided | abort: no source URL, branch revision, or revision list provided | ||||
[255] | [255] | ||||
$ hg transplant --continue --all | $ hg transplant --continue --all | ||||
abort: --continue is incompatible with --branch, --all and --merge | abort: --continue is incompatible with --branch, --all and --merge | ||||
[255] | [255] | ||||
transplant -c shouldn't use an old changeset | transplant -c shouldn't use an old changeset | ||||
$ hg up -C | $ hg up -C | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
updated to "e8643552fde5: foobar" | updated to "e8643552fde5: foobar" | ||||
1 other heads for branch "default" | 1 other heads for branch "default" | ||||
$ rm added | $ rm added | ||||
$ hg transplant --continue | $ hg continue | ||||
abort: no transplant to continue | abort: no transplant to continue (continueflag !) | ||||
abort: no operation in progress (no-continueflag !) | |||||
[255] | [255] | ||||
$ hg transplant 1 | $ hg transplant 1 | ||||
applying 46ae92138f3c | applying 46ae92138f3c | ||||
patching file foo | patching file foo | ||||
Hunk #1 FAILED at 0 | Hunk #1 FAILED at 0 | ||||
1 out of 1 hunks FAILED -- saving rejects to file foo.rej | 1 out of 1 hunks FAILED -- saving rejects to file foo.rej | ||||
patch failed to apply | patch failed to apply | ||||
abort: fix up the working directory and run hg transplant --continue | abort: fix up the working directory and run hg transplant --continue | ||||
? baz.rej | ? baz.rej | ||||
? foo.rej | ? foo.rej | ||||
# The repository is in an unfinished *transplant* state. | # The repository is in an unfinished *transplant* state. | ||||
# To continue: hg transplant --continue | # To continue: hg transplant --continue | ||||
# To abort: hg update | # To abort: hg update | ||||
$ echo fixed > baz | $ echo fixed > baz | ||||
$ hg transplant --continue | $ hg continue | ||||
9d6d6b5a8275 transplanted as d80c49962290 | 9d6d6b5a8275 transplanted as d80c49962290 | ||||
applying 1dab759070cf | applying 1dab759070cf | ||||
1dab759070cf transplanted to aa0ffe6bd5ae | 1dab759070cf transplanted to aa0ffe6bd5ae | ||||
$ cd .. | $ cd .. | ||||
Issue1111: Test transplant --merge | Issue1111: Test transplant --merge | ||||
applying 645035761929 | applying 645035761929 | ||||
file b already exists | file b already exists | ||||
1 out of 1 hunks FAILED -- saving rejects to file b.rej | 1 out of 1 hunks FAILED -- saving rejects to file b.rej | ||||
patch failed to apply | patch failed to apply | ||||
abort: fix up the working directory and run hg transplant --continue | abort: fix up the working directory and run hg transplant --continue | ||||
[255] | [255] | ||||
$ hg status | $ hg status | ||||
? b.rej | ? b.rej | ||||
$ hg transplant --continue | $ hg continue | ||||
645035761929 skipped due to empty diff | 645035761929 skipped due to empty diff | ||||
$ cd .. | $ cd .. | ||||
Explicitly kill daemons to let the test exit on Windows | Explicitly kill daemons to let the test exit on Windows | ||||
$ killdaemons.py | $ killdaemons.py | ||||
let's name this function continue only as it's in transplant.py and a continue implies that we are continuing transplant.