This adds support of transplant--abort to
hg abort. A seperate aborttransplant function is
created for that.
Results are shown in tests.
hg-reviewers |
This adds support of transplant--abort to
hg abort. A seperate aborttransplant function is
created for that.
Results are shown in tests.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/transplant.py (10 lines) | |||
M | tests/test-transplant.t (16 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
7257f295bf9b | c0f8bdc029fe | Taapas Agrawal | Jul 26 2019, 6:46 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | taapas1128 | ||
Abandoned | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Accepted | taapas1128 | ||
Accepted | taapas1128 | ||
Needs Revision | taapas1128 |
#testcases commandmode continueflag | #testcases commandmode abortflag continueflag | ||||
$ cat <<EOF >> $HGRCPATH | $ cat <<EOF >> $HGRCPATH | ||||
> [extensions] | > [extensions] | ||||
> transplant= | > transplant= | ||||
> graphlog= | > graphlog= | ||||
> EOF | > EOF | ||||
#if abortflag | |||||
$ cat >> $HGRCPATH <<EOF | |||||
> [alias] | |||||
> abort = transplant --abort | |||||
> EOF | |||||
#endif | |||||
#if continueflag | #if continueflag | ||||
$ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
> [alias] | > [alias] | ||||
> continue = transplant --continue | > continue = transplant --continue | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ hg init t | $ hg init t | ||||
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 | ||||
[255] | [255] | ||||
$ hg transplant --abort | $ hg abort | ||||
transplant aborted | transplant aborted | ||||
working directory is now at e8643552fde5 | working directory is now at e8643552fde5 | ||||
Repo log after abort | Repo log after abort | ||||
$ hg glog | $ hg glog | ||||
@ changeset: 4:e8643552fde5 | @ changeset: 4:e8643552fde5 | ||||
| tag: tip | | tag: tip | ||||
| parent: 0:493149fa1541 | | parent: 0:493149fa1541 | ||||
| user: test | | user: test | ||||
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 continue | $ hg continue | ||||
abort: no transplant to continue (continueflag !) | abort: no transplant to continue (continueflag !) | ||||
abort: no operation in progress (no-continueflag !) | abort: no operation in progress (no-continueflag !) | ||||
[255] | [255] | ||||
$ hg transplant --abort | $ hg abort | ||||
abort: no transplant to abort | abort: no transplant to abort (abortflag !) | ||||
abort: no operation in progress (no-abortflag !) | |||||
[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 |
return tp.abort(..) instead.