Patchwork D3448: tests: pass parent revision as integer to repo[x] in test-context-metadata.t

login
register
mail settings
Submitter phabricator
Date May 6, 2018, 4:50 a.m.
Message ID <differential-rev-PHID-DREV-gexaevrxrwxy3yuu2y5v-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31284/
State Superseded
Headers show

Comments

phabricator - May 6, 2018, 4:50 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Support for looking up by stringified int is going away. It's already
  deprecated, but I think I didn't notice this case because the test
  case pipes through `grep`.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-context-metadata.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-context-metadata.t b/tests/test-context-metadata.t
--- a/tests/test-context-metadata.t
+++ b/tests/test-context-metadata.t
@@ -23,7 +23,7 @@ 
   >         old = repo[b'.']
   >         kwargs = dict(s.split(b'=', 1) for s in arg.split(b';'))
   >         if 'parents' in kwargs:
-  >             kwargs[b'parents'] = kwargs[b'parents'].split(b',')
+  >             kwargs[b'parents'] = map(int, kwargs[b'parents'].split(b','))
   >         new = context.metadataonlyctx(repo, old,
   >                                       **pycompat.strkwargs(kwargs))
   >         new.commit()