##// END OF EJS Templates
commands: add missing wlock to graft
Idan Kamara -
r16473:7adc5212 stable
parent child Browse files
Show More
@@ -2673,6 +2673,8 b' def graft(ui, repo, *revs, **opts):'
2673 if not revs:
2673 if not revs:
2674 return -1
2674 return -1
2675
2675
2676 wlock = repo.wlock()
2677 try:
2676 for pos, ctx in enumerate(repo.set("%ld", revs)):
2678 for pos, ctx in enumerate(repo.set("%ld", revs)):
2677 current = repo['.']
2679 current = repo['.']
2678
2680
@@ -2719,6 +2721,8 b' def graft(ui, repo, *revs, **opts):'
2719 date = opts['date']
2721 date = opts['date']
2720 repo.commit(text=ctx.description(), user=user,
2722 repo.commit(text=ctx.description(), user=user,
2721 date=date, extra=extra, editor=editor)
2723 date=date, extra=extra, editor=editor)
2724 finally:
2725 wlock.release()
2722
2726
2723 # remove state when we complete successfully
2727 # remove state when we complete successfully
2724 if not opts.get('dry_run') and os.path.exists(repo.join('graftstate')):
2728 if not opts.get('dry_run') and os.path.exists(repo.join('graftstate')):
@@ -242,12 +242,12 b' Graft again onto another branch should p'
242 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
242 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
243
243
244 $ hg log --debug -r tip
244 $ hg log --debug -r tip
245 changeset: 13:39bb1d13572759bd1e6fc874fed1b12ece047a18
245 changeset: 13:95adbe5de6b10f376b699ece9ed5a57cd7b4b0f6
246 tag: tip
246 tag: tip
247 phase: draft
247 phase: draft
248 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
248 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
249 parent: -1:0000000000000000000000000000000000000000
249 parent: -1:0000000000000000000000000000000000000000
250 manifest: 13:0780e055d8f4cd12eadd5a2719481648f336f7a9
250 manifest: 13:9944044f82a462bbaccc9bdf7e0ac5b811db7d1b
251 user: foo
251 user: foo
252 date: Thu Jan 01 00:00:00 1970 +0000
252 date: Thu Jan 01 00:00:00 1970 +0000
253 files+: b
253 files+: b
General Comments 0
You need to be logged in to leave comments. Login now