Show More
@@ -3731,7 +3731,14 b' def graft(ui, repo, *revs, **opts):' | |||||
3731 |
|
3731 | |||
3732 | Returns 0 on successful completion. |
|
3732 | Returns 0 on successful completion. | |
3733 | ''' |
|
3733 | ''' | |
3734 |
|
3734 | wlock = None | ||
|
3735 | try: | |||
|
3736 | wlock = repo.wlock() | |||
|
3737 | return _dograft(ui, repo, *revs, **opts) | |||
|
3738 | finally: | |||
|
3739 | release(wlock) | |||
|
3740 | ||||
|
3741 | def _dograft(ui, repo, *revs, **opts): | |||
3735 | revs = list(revs) |
|
3742 | revs = list(revs) | |
3736 | revs.extend(opts['rev']) |
|
3743 | revs.extend(opts['rev']) | |
3737 |
|
3744 | |||
@@ -3837,7 +3844,6 b' def graft(ui, repo, *revs, **opts):' | |||||
3837 | if not revs: |
|
3844 | if not revs: | |
3838 | return -1 |
|
3845 | return -1 | |
3839 |
|
3846 | |||
3840 | wlock = repo.wlock() |
|
|||
3841 | try: |
|
3847 | try: | |
3842 | for pos, ctx in enumerate(repo.set("%ld", revs)): |
|
3848 | for pos, ctx in enumerate(repo.set("%ld", revs)): | |
3843 | desc = '%d:%s "%s"' % (ctx.rev(), ctx, |
|
3849 | desc = '%d:%s "%s"' % (ctx.rev(), ctx, | |
@@ -3904,7 +3910,9 b' def graft(ui, repo, *revs, **opts):' | |||||
3904 | _('note: graft of %d:%s created no changes to commit\n') % |
|
3910 | _('note: graft of %d:%s created no changes to commit\n') % | |
3905 | (ctx.rev(), ctx)) |
|
3911 | (ctx.rev(), ctx)) | |
3906 | finally: |
|
3912 | finally: | |
3907 | wlock.release() |
|
3913 | # TODO: get rid of this meaningless try/finally enclosing. | |
|
3914 | # this is kept only to reduce changes in a patch. | |||
|
3915 | pass | |||
3908 |
|
3916 | |||
3909 | # remove state when we complete successfully |
|
3917 | # remove state when we complete successfully | |
3910 | if not opts.get('dry_run'): |
|
3918 | if not opts.get('dry_run'): |
General Comments 0
You need to be logged in to leave comments.
Login now