Show More
@@ -1318,16 +1318,18 b' Test heads computation on pending index ' | |||||
1318 | $ cat >$TESTTMP/test_extension.py << EOF |
|
1318 | $ cat >$TESTTMP/test_extension.py << EOF | |
1319 | > from __future__ import absolute_import |
|
1319 | > from __future__ import absolute_import | |
1320 | > from mercurial.i18n import _ |
|
1320 | > from mercurial.i18n import _ | |
1321 | > from mercurial import cmdutil, registrar |
|
1321 | > from mercurial import cmdutil, pycompat, registrar | |
|
1322 | > from mercurial.utils import stringutil | |||
1322 | > |
|
1323 | > | |
1323 | > cmdtable = {} |
|
1324 | > cmdtable = {} | |
1324 | > command = registrar.command(cmdtable) |
|
1325 | > command = registrar.command(cmdtable) | |
1325 | > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) |
|
1326 | > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) | |
1326 | > def amend(ui, repo, *pats, **opts): |
|
1327 | > def amend(ui, repo, *pats, **opts): | |
1327 | > opts['message'] = 'Test' |
|
1328 | > opts = pycompat.byteskwargs(opts) | |
1328 |
> opts[' |
|
1329 | > opts[b'message'] = b'Test' | |
1329 | > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts) |
|
1330 | > opts[b'logfile'] = None | |
1330 | > ui.write(b'%s\n' % repo.changelog.headrevs()) |
|
1331 | > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts) | |
|
1332 | > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs())) | |||
1331 | > EOF |
|
1333 | > EOF | |
1332 | $ cat >> $HGRCPATH << EOF |
|
1334 | $ cat >> $HGRCPATH << EOF | |
1333 | > [extensions] |
|
1335 | > [extensions] | |
@@ -1365,7 +1367,7 b' bookmarks change' | |||||
1365 | > hidden = repoview.filterrevs(repo, b'visible') |
|
1367 | > hidden = repoview.filterrevs(repo, b'visible') | |
1366 | > if sorted(hidden1) != sorted(hidden): |
|
1368 | > if sorted(hidden1) != sorted(hidden): | |
1367 | > print("cache inconsistency") |
|
1369 | > print("cache inconsistency") | |
1368 | > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook) |
|
1370 | > bkmstoreinst._repo.currenttransaction().addpostclose(b'test_extension', trhook) | |
1369 | > orig(bkmstoreinst, *args, **kwargs) |
|
1371 | > orig(bkmstoreinst, *args, **kwargs) | |
1370 | > def extsetup(ui): |
|
1372 | > def extsetup(ui): | |
1371 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
|
1373 | > extensions.wrapfunction(bookmarks.bmstore, '_recordchange', |
General Comments 0
You need to be logged in to leave comments.
Login now