##// END OF EJS Templates
branch: pass current transaction when writing branch in branch command
marmoute -
r51156:774ed116 default
parent child Browse files
Show More
@@ -1355,7 +1355,7 b' def branch(ui, repo, label=None, **opts)'
1355 with repo.wlock():
1355 with repo.wlock():
1356 if opts.get(b'clean'):
1356 if opts.get(b'clean'):
1357 label = repo[b'.'].branch()
1357 label = repo[b'.'].branch()
1358 repo.dirstate.setbranch(label)
1358 repo.dirstate.setbranch(label, repo.currenttransaction())
1359 ui.status(_(b'reset working directory to branch %s\n') % label)
1359 ui.status(_(b'reset working directory to branch %s\n') % label)
1360 elif label:
1360 elif label:
1361
1361
@@ -1371,7 +1371,7 b' def branch(ui, repo, label=None, **opts)'
1371 hint=_(b"use 'hg update' to switch to it"),
1371 hint=_(b"use 'hg update' to switch to it"),
1372 )
1372 )
1373
1373
1374 repo.dirstate.setbranch(label)
1374 repo.dirstate.setbranch(label, repo.currenttransaction())
1375 ui.status(_(b'marked working directory as branch %s\n') % label)
1375 ui.status(_(b'marked working directory as branch %s\n') % label)
1376
1376
1377 # find any open named branches aside from default
1377 # find any open named branches aside from default
General Comments 0
You need to be logged in to leave comments. Login now