Mercurial > hg
comparison tests/test-context-metadata.t @ 37851:8327fd79adf8
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 28 Apr 2018 23:54:07 -0700 |
parents | 194463554ba5 |
children | b8db53f786f0 |
comparison
equal
deleted
inserted
replaced
37850:04ceb267271a | 37851:8327fd79adf8 |
---|---|
21 > # Modify commit message to "FOO" | 21 > # Modify commit message to "FOO" |
22 > with repo.wlock(), repo.lock(), repo.transaction(b'metaedit'): | 22 > with repo.wlock(), repo.lock(), repo.transaction(b'metaedit'): |
23 > old = repo[b'.'] | 23 > old = repo[b'.'] |
24 > kwargs = dict(s.split(b'=', 1) for s in arg.split(b';')) | 24 > kwargs = dict(s.split(b'=', 1) for s in arg.split(b';')) |
25 > if 'parents' in kwargs: | 25 > if 'parents' in kwargs: |
26 > kwargs[b'parents'] = kwargs[b'parents'].split(b',') | 26 > kwargs[b'parents'] = map(int, kwargs[b'parents'].split(b',')) |
27 > new = context.metadataonlyctx(repo, old, | 27 > new = context.metadataonlyctx(repo, old, |
28 > **pycompat.strkwargs(kwargs)) | 28 > **pycompat.strkwargs(kwargs)) |
29 > new.commit() | 29 > new.commit() |
30 > EOF | 30 > EOF |
31 $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'text=Changed' | 31 $ hg --config extensions.metaedit=$TESTTMP/metaedit.py metaedit 'text=Changed' |