D3086: pull: pass rev to check out as integer to postincoming()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Apr 4 22:54:20 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I don't know if there's ever been a need for it to be a string (it's
  been like that since https://phab.mercurial-scm.org/rHG02f40b2ece3f1b607593a340fdd711919f4a8042 (commands: use rev from remote repo
  when updating as part of a pull, 2009-10-21)). I'm soon going to
  require it to be an integer, so let's fix this first.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3086

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4034,7 +4034,7 @@
             brev = None
 
             if checkout:
-                checkout = "%d" % repo.changelog.rev(checkout)
+                checkout = repo.changelog.rev(checkout)
 
                 # order below depends on implementation of
                 # hg.addbranchrevs(). opts['bookmark'] is ignored,



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list