tests: pass parent revision as integer to repo[x] in test-context-metadata.t
authorMartin von Zweigbergk <martinvonz@google.com>
Sat, 28 Apr 2018 23:54:07 -0700
changeset 37851 8327fd79adf8
parent 37850 04ceb267271a
child 37852 8b86acc7aa64
tests: pass parent revision as integer to repo[x] in test-context-metadata.t 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`. Differential Revision: https://phab.mercurial-scm.org/D3448
tests/test-context-metadata.t
--- a/tests/test-context-metadata.t	Sat May 05 11:42:42 2018 +0900
+++ b/tests/test-context-metadata.t	Sat Apr 28 23:54:07 2018 -0700
@@ -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()