[PATCH] mq: use repo._bookmarks.write instead of repo._bookmarks.recordchange

Laurent Charignon lcharignon at fb.com
Tue Nov 17 14:51:13 CST 2015


On Nov 17, 2015, at 9:56 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org<mailto:pierre-yves.david at ens-lyon.org>> wrote:



On 11/17/2015 09:51 AM, Laurent Charignon wrote:

On Nov 16, 2015, at 7:18 PM, Pierre-Yves David <pierre-yves.david at ens-lyon.org<mailto:pierre-yves.david at ens-lyon.org>> wrote:



On 11/16/2015 05:21 PM, Laurent Charignon wrote:
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com<mailto:lcharignon at fb.com>>
# Date 1442624684 25200
#      Fri Sep 18 18:04:44 2015 -0700
# Node ID 83fe45f567f48fa9d6ce1497e81a5601e3a21061
# Parent  2da6a2dbfc42bdec4bcaf47da947c64ff959a59c
mq: use repo._bookmarks.write instead of repo._bookmarks.recordchange

Before this patch, mq was using repo._bookmarks.write.
This patch replaces this code with the recommended way of saving bookmarks
changes: repo._bookmarks.recordchange.

We should move the bookmark in the same transaction as the one creating the new commit.

(yes, the transaction does not seems handled by at this scope yet so we'll have to add that too.)

Ok, we can make it be one transaction.
Could explain differently the sentence in parentheses? I don't really get the scope concern here.

I'm pointing out that there is no "transacation" object available in the function you are patching, because the transaction is currently handler at a lower level (inside the newcommit or lower) call. We'll have to create the transaction at this level and ensure its life time.

(So no concern, just pointing out that fact)


Ok that makes sense.
I will send out a V2.

Thanks!

Laurent


--
Pierre-Yves David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151117/6ac86dc2/attachment.html>


More information about the Mercurial-devel mailing list