Patchwork [2,of,2,evolve-ext] resolves 6028: return return (False, ".") instead of return (False, '')

login
register
mail settings
Submitter James Reynolds
Date Dec. 11, 2018, 5:04 p.m.
Message ID <4bbca2202a72adf5877e.1544547863@Jamess-MacBook-Pro.local>
Download mbox | patch
Permalink /patch/37112/
State Superseded
Headers show

Comments

James Reynolds - Dec. 11, 2018, 5:04 p.m.
# HG changeset patch
# User James Reynolds <james.glenn.reynolds@gmail.com>
# Date 1543952045 18000
#      Tue Dec 04 14:34:05 2018 -0500
# Branch stable
# Node ID 4bbca2202a72adf5877e5d5a3d8850424a01cb6f
# Parent  710f32053ba340564ca9909b4dc7bef1fc1946fb
# EXP-Topic issue6028
resolves 6028: return return (False, ".") instead of return (False, '')
 - repo[] no longer takes an empty string

Patch

diff -r 710f32053ba3 -r 4bbca2202a72 hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Tue Dec 04 14:56:19 2018 -0500
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Dec 04 14:34:05 2018 -0500
@@ -61,7 +61,7 @@ 
         bool: a boolean value indicating whether the instability was solved
         newnode: if bool is True, then the newnode of the resultant commit
                  formed. newnode can be node, when resolution led to no new
-                 commit. If bool is False, this is ''.
+                 commit. If bool is False, this is ".".
     """
     displayer = None
     if stacktmplt:
@@ -101,7 +101,7 @@ 
         bool: a boolean value indicating whether the instability was solved
         newnode: if bool is True, then the newnode of the resultant commit
                  formed. newnode can be node, when resolution led to no new
-                 commit. If bool is False, this is ''.
+                 commit. If bool is False, this is ".".
     """
     pctx = orig.p1()
     keepbranch = orig.p1().branch() != orig.branch()
@@ -125,7 +125,7 @@ 
 
     if not pctx.obsolete():
         ui.warn(_("cannot solve instability of %s, skipping\n") % orig)
-        return (False, '')
+        return return (False, ".")
     obs = pctx
     newer = obsutil.successorssets(repo, obs.node())
     # search of a parent which is not killed
@@ -139,7 +139,7 @@ 
         msg = _("skipping %s: divergent rewriting. can't choose "
                 "destination\n") % obs
         ui.write_err(msg)
-        return (False, '')
+        return return (False, ".")
     targets = newer[0]
     assert targets
     if len(targets) > 1:
@@ -157,7 +157,7 @@ 
                         "ambiguous destination: "
                         "parent split across two branches\n")
                 ui.write_err(msg)
-                return (False, '')
+                return return (False, ".")
             target = repo[selectedrev]
         else:
             target = repo[heads.first()]
@@ -177,7 +177,7 @@ 
     todo = 'hg rebase -r %s -d %s\n' % (orig, target)
     if dryrun:
         repo.ui.write(todo)
-        return (False, '')
+        return return (False, ".")
     else:
         repo.ui.note(todo)
         if progresscb:
@@ -201,7 +201,7 @@ 
         bool: a boolean value indicating whether the instability was solved
         newnode: if bool is True, then the newnode of the resultant commit
                  formed. newnode can be node, when resolution led to no new
-                 commit. If bool is False, this is ''.
+                 commit. If bool is False, this is ".".
     """
     repo = repo.unfiltered()
     bumped = repo[bumped.rev()]
@@ -209,14 +209,14 @@ 
     if len(bumped.parents()) > 1:
         msg = _('skipping %s : we do not handle merge yet\n') % bumped
         ui.write_err(msg)
-        return (False, '')
+        return return (False, ".")
     prec = repo.set('last(allprecursors(%d) and public())', bumped.rev()).next()
     # For now we deny target merge
     if len(prec.parents()) > 1:
         msg = _('skipping: %s: public version is a merge, '
                 'this is not handled yet\n') % prec
         ui.write_err(msg)
-        return (False, '')
+        return return (False, ".")
 
     if not ui.quiet or confirm:
         repo.ui.write(_('recreate:'), label='evolve.operation')
@@ -232,7 +232,7 @@ 
         repo.ui.write(('hg revert --all --rev %s;\n' % bumped))
         repo.ui.write(('hg commit --msg "%s update to %s"\n' %
                        (TROUBLES['PHASEDIVERGENT'], bumped)))
-        return (False, '')
+        return return (False, ".")
     if progresscb:
         progresscb()
     tmpctx = bumped
@@ -343,7 +343,7 @@ 
         bool: a boolean value indicating whether the instability was solved
         newnode: if bool is True, then the newnode of the resultant commit
                  formed. newnode can be node, when resolution led to no new
-                 commit. If bool is False, this is ''.
+                 commit. If bool is False, this is ".".
     """
     repo = repo.unfiltered()
     divergent = repo[divergent.rev()]
@@ -376,7 +376,7 @@ 
                 "| You should contact your local evolution Guru for help.\n"
                 ) % (divergent, TROUBLES['CONTENTDIVERGENT'], othersstr)
         ui.write_err(msg)
-        return (False, '')
+        return return (False, ".")
     other = others[0]
     evolvestate['other-divergent'] = other.node()
     evolvestate['base'] = base.node()
@@ -390,7 +390,7 @@ 
                  "| This probably means redoing the merge and using \n"
                  "| `hg prune` to kill older version.\n")
         ui.write_err(hint)
-        return (False, '')
+        return return (False, ".")
 
     otherp1 = other.p1().rev()
     divp1 = divergent.p1().rev()
@@ -450,7 +450,7 @@ 
                  ) % {'d': divergent, 'o': other}
         ui.write_err(msg)
         ui.write_err(hint)
-        return (False, '')
+        return return (False, ".")
 
     if not ui.quiet or confirm:
         ui.write(_('merge:'), label='evolve.operation')
@@ -470,7 +470,7 @@ 
         ui.write(('hg revert --all --rev tip &&\n'))
         ui.write(('hg commit -m "`hg log -r %s --template={desc}`";\n'
                  % divergent))
-        return (False, '')
+        return return (False, ".")
 
     evolvestate['resolutionparent'] = resolutionparent
     # relocate the other divergent if required