Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 28654:5474dc73680f
debugsetparents: remove redundant invocations of begin/endparentchange
Method localrepo.setparents invokes begin/endparentchange internally,
so there is no need to invoke it explicitly in debugsetparents.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Mon, 28 Mar 2016 09:12:03 +0200 |
parents | 4acd5651ffa2 |
children | ae53ecc47414 |
comparison
equal
deleted
inserted
replaced
28653:1eb0bd8adf39 | 28654:5474dc73680f |
---|---|
3500 | 3500 |
3501 r1 = scmutil.revsingle(repo, rev1).node() | 3501 r1 = scmutil.revsingle(repo, rev1).node() |
3502 r2 = scmutil.revsingle(repo, rev2, 'null').node() | 3502 r2 = scmutil.revsingle(repo, rev2, 'null').node() |
3503 | 3503 |
3504 with repo.wlock(): | 3504 with repo.wlock(): |
3505 repo.dirstate.beginparentchange() | |
3506 repo.setparents(r1, r2) | 3505 repo.setparents(r1, r2) |
3507 repo.dirstate.endparentchange() | |
3508 | 3506 |
3509 @command('debugdirstate|debugstate', | 3507 @command('debugdirstate|debugstate', |
3510 [('', 'nodates', None, _('do not display the saved mtime')), | 3508 [('', 'nodates', None, _('do not display the saved mtime')), |
3511 ('', 'datesort', None, _('sort by saved mtime'))], | 3509 ('', 'datesort', None, _('sort by saved mtime'))], |
3512 _('[OPTION]...')) | 3510 _('[OPTION]...')) |