##// END OF EJS Templates
dirstate-guard: replace a usage in `rebase` with a transaction...
marmoute -
r50958:a9562ea2 default
parent child Browse files
Show More
@@ -30,7 +30,6 b' from mercurial import ('
30 commands,
30 commands,
31 copies,
31 copies,
32 destutil,
32 destutil,
33 dirstateguard,
34 error,
33 error,
35 extensions,
34 extensions,
36 logcmdutil,
35 logcmdutil,
@@ -1494,10 +1493,10 b' def commitmemorynode(repo, wctx, editor,'
1494 def commitnode(repo, editor, extra, user, date, commitmsg):
1493 def commitnode(repo, editor, extra, user, date, commitmsg):
1495 """Commit the wd changes with parents p1 and p2.
1494 """Commit the wd changes with parents p1 and p2.
1496 Return node of committed revision."""
1495 Return node of committed revision."""
1497 dsguard = util.nullcontextmanager()
1496 tr = util.nullcontextmanager
1498 if not repo.ui.configbool(b'rebase', b'singletransaction'):
1497 if not repo.ui.configbool(b'rebase', b'singletransaction'):
1499 dsguard = dirstateguard.dirstateguard(repo, b'rebase')
1498 tr = lambda: repo.transaction(b'rebase')
1500 with dsguard:
1499 with tr():
1501 # Commit might fail if unresolved files exist
1500 # Commit might fail if unresolved files exist
1502 newnode = repo.commit(
1501 newnode = repo.commit(
1503 text=commitmsg, user=user, date=date, extra=extra, editor=editor
1502 text=commitmsg, user=user, date=date, extra=extra, editor=editor
General Comments 0
You need to be logged in to leave comments. Login now