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

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 10:54 p.m.
Message ID <differential-rev-PHID-DREV-r4pgrp4rfgjvlhjfsecu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30307/
State Superseded
Headers show

Comments

phabricator - April 4, 2018, 10:54 p.m.
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




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

Patch

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,