evolve: don't pass stringified int to repo.__getitem__
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 13 Apr 2018 09:26:28 -0700
changeset 3662 0caa27259800
parent 3661 61fdd25542a6
child 3663 54a469cd5b26
evolve: don't pass stringified int to repo.__getitem__ We were doing repo['-1'], which is now deprecated. Switch to repo['tip'], which is much clearer anyway (I initially thought this was nullrev and sent an incorrect patch until Pierre-Yves corrected me).
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Wed Apr 11 07:23:34 2018 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri Apr 13 09:26:28 2018 -0700
@@ -1217,7 +1217,7 @@
             obsoleted = repo.set('%lr', obsoleted)
         result = orig(ui, repo, *arg, **kwargs)
         if not result: # commit succeeded
-            new = repo['-1']
+            new = repo['tip']
             oldbookmarks = []
             markers = []
             for old in obsoleted: