changeset 3751:a1a0cfbffd30 stable

evolve: pass revisions as strings to commands.*() It's usually fine to pass integer revisions to e.g. commands.update(), but when directaccess is enabled, it attempts to parse it a revset, which fails.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 15 May 2018 22:17:27 -0700
parents 9fa3585b160f
children cd194eb336bd 6f56ff701746
files hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/rewriteutil.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/cmdrewrite.py	Sat May 19 18:26:36 2018 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue May 15 22:17:27 2018 -0700
@@ -1079,7 +1079,7 @@
                     bookmarksmod.deactivate(repo)
                     bmchanges = [(bookactive, newnode.node())]
                     repo._bookmarks.applychanges(repo, tr, bmchanges)
-                commands.update(ui, repo, newnode.rev())
+                commands.update(ui, repo, newnode.hex())
                 ui.status(_('working directory now at %s\n')
                           % ui.label(str(newnode), 'evolve.node'))
                 if movebookmark:
--- a/hgext3rd/evolve/rewriteutil.py	Sat May 19 18:26:36 2018 +0530
+++ b/hgext3rd/evolve/rewriteutil.py	Tue May 15 22:17:27 2018 -0700
@@ -136,7 +136,7 @@
     """prepare the working directory for a split (for topic hooking)
     """
     hg.update(repo, prev)
-    commands.revert(ui, repo, rev=ctx.rev(), all=True)
+    commands.revert(ui, repo, rev=ctx.hex(), all=True)
 
 def reachablefrombookmark(repo, revs, bookmarks):
     """filter revisions and bookmarks reachable from the given bookmark