Patchwork transplant: unnest --stop case

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 17, 2019, 12:02 p.m.
Message ID <a3c360094c93509ee013.1566043323@mimosa>
Download mbox | patch
Permalink /patch/41321/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 17, 2019, 12:02 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1566024221 -32400
#      Sat Aug 17 15:43:41 2019 +0900
# Node ID a3c360094c93509ee013ed7f4b7807c74b2d60a4
# Parent  88d6a6f7e83716146fc725f20166509a520bc164
transplant: unnest --stop case

It should be aligned with --continue.
Pulkit Goyal - Aug. 17, 2019, 1:23 p.m.
On Sat, Aug 17, 2019 at 3:06 PM Yuya Nishihara <yuya@tcha.org> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1566024221 -32400
> #      Sat Aug 17 15:43:41 2019 +0900
> # Node ID a3c360094c93509ee013ed7f4b7807c74b2d60a4
> # Parent  88d6a6f7e83716146fc725f20166509a520bc164
> transplant: unnest --stop case
>
> It should be aligned with --continue.

Queued this, many thanks!

Patch

diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -692,11 +692,11 @@  def _dotransplant(ui, repo, *revs, **opt
     if opts.get('continue'):
         if not tp.canresume():
             raise error.Abort(_('no transplant to continue'))
+    elif opts.get('stop'):
+        if not tp.canresume():
+            raise error.Abort(_('no interrupted transplant found'))
+        return tp.stop(ui, repo)
     else:
-        if opts.get('stop'):
-            if not tp.canresume():
-                raise error.Abort(_('no interrupted transplant found'))
-            return tp.stop(ui, repo)
         cmdutil.checkunfinished(repo)
         cmdutil.bailifchanged(repo)