tests/test-context-metadata.t
changeset 40303 b8db53f786f0
parent 37851 8327fd79adf8
child 48876 42d2b31cee0b
equal deleted inserted replaced
40302:af2306bf7d5d 40303:b8db53f786f0
    20   > def metaedit(ui, repo, arg):
    20   > def metaedit(ui, repo, arg):
    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 b'parents' in kwargs:
    26   >             kwargs[b'parents'] = map(int, 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