split: remove an unnecessary (and confusingly typed) fallback revision
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 Jul 2019 08:20:24 -0700
changeset 4733 85ae5dc0507d
parent 4732 4168c6b83406
child 4734 6b101bbd907a
split: remove an unnecessary (and confusingly typed) fallback revision `opts.get('rev') or '.'` is either a list of strings or just a string. It happened to work because `'.'[0] == '.'` on Python 2, but it won't work on Python 3 (for byte strings). The fallback value wasn't even needed (it was also set just after), so let's just remove it.
hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Thu Jul 11 22:23:32 2019 -0700
+++ b/hgext3rd/evolve/cmdrewrite.py	Fri Jul 12 08:20:24 2019 -0700
@@ -1185,7 +1185,7 @@
     newcommits = []
     iselect = opts.pop('interactive')
 
-    revs = opts.get('rev') or '.'
+    revs = opts.get('rev')
     if not revs:
         revarg = '.'
     elif len(revs) == 1: