[Bug 3628 - single transaction for graft with multiple revisions]
Piotr Listkiewicz
piotr.listkiewicz at gmail.com
Tue Sep 29 13:38:39 CDT 2015
Up ,maybe anybody can help with this?
2015-09-22 20:57 GMT+02:00 Piotr Listkiewicz <piotr.listkiewicz at gmail.com>:
> I took a look at issue: http://bz.selenic.com/show_bug.cgi?id=3628 . I
> started working on it, i hoped that sth like:
>
> diff -r 836291420d53 -r 0861313845a8 mercurial/commands.py
> --- a/mercurial/commands.py Sat Sep 12 16:11:17 2015 -0700
> +++ b/mercurial/commands.py Tue Sep 22 20:47:36 2015 +0200
> @@ -3578,8 +3578,11 @@
> if not revs:
> return -1
>
> - wlock = repo.wlock()
> try:
> + wlock = repo.wlock()
> + lock = repo.lock()
> + tr = repo.transaction("graft")
> +
> for pos, ctx in enumerate(repo.set("%ld", revs)):
> desc = '%d:%s "%s"' % (ctx.rev(), ctx,
> ctx.description().split('\n', 1)[0])
> @@ -3636,8 +3639,10 @@
> ui.warn(
> _('note: graft of %d:%s created no changes to
> commit\n') %
> (ctx.rev(), ctx))
> +
> + tr.close()
> finally:
> - wlock.release()
> + release(tr, lock, wlock)
>
> would work but its not. Problem with making graft transactional in such a
> way is encountered when there are conflicts during merge - transaction is
> rolled back before it gives a user chance to resolve merge commit.
>
> I have no idea how can i make transaction persistent between resolving
> merge conflicts and running hg graft --continue and how would i use
> persisted transaction in graft --continue to append later changes to it.
>
> I would be thankful for any ideas or code references when similiar issues
> were resolved.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150929/840204ea/attachment.html>
More information about the Mercurial-devel
mailing list