Patchwork D3851: tests: pass "rev" argument to commands.update() as string

login
register
mail settings
Submitter phabricator
Date June 28, 2018, 5:13 a.m.
Message ID <differential-rev-PHID-DREV-wqghsc6nmugr7cj27b2k-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32471/
State Superseded
Headers show

Comments

phabricator - June 28, 2018, 5:13 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  commands.update() normally gets its "rev" argument as a string, but
  test-basic.t was passing an integer. That happened to work, but we
  shouldn't rely on it.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-basic.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - June 28, 2018, 9:56 a.m.
pulkit added inline comments.

INLINE COMMENTS

> test-basic.t:67
>    > repo = hg.repository(myui, path=b'.')
> -  > commands.update(myui, repo, rev=0)
> +  > commands.update(myui, repo, rev="0")
>    > EOF

Added a b'' prefix in flight for py3.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -64,7 +64,7 @@ 
   > from mercurial import ui, hg, commands
   > myui = ui.ui.load()
   > repo = hg.repository(myui, path=b'.')
-  > commands.update(myui, repo, rev=0)
+  > commands.update(myui, repo, rev="0")
   > EOF
   $ hg up null
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved