[PATCH 6 of 6 v6] strip: incrementally update the branchheads cache after a strip
Joshua Redstone
joshua.redstone at fb.com
Fri Jun 15 19:09:06 UTC 2012
That's the purpose of the set(). newheadrevs could have duplicates, which set(…newheadrevs…) reduces to a single element.
Josh
From: Bryan O'Sullivan <bos at serpentine.com<mailto:bos at serpentine.com>>
Date: Friday, June 15, 2012 2:11 PM
To: Joshua Redstone <joshua.redstone at fb.com<mailto:joshua.redstone at fb.com>>
Cc: "mpm at selenic.com<mailto:mpm at selenic.com>" <mpm at selenic.com<mailto:mpm at selenic.com>>, "mercurial-devel at selenic.com<mailto:mercurial-devel at selenic.com>" <mercurial-devel at selenic.com<mailto:mercurial-devel at selenic.com>>
Subject: Re: [PATCH 6 of 6 v6] strip: incrementally update the branchheads cache after a strip
On Fri, Jun 15, 2012 at 10:35 AM, Joshua Redstone <joshua.redstone at fb.com<mailto:joshua.redstone at fb.com>> wrote:
+ newheadbranches = set([repo[rev].branch() for rev in newheadrevs])
newheadbranches does not need to be a set.
I think it does. otherwise if there are duplicates then the equality check below fails..
+ if len(stripbranches) == 1 and len(newheadbranches) == 1 \
+ and stripbranches == newheadbranches:
There cannot be duplicates if the collection contains only a single element.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20120615/2a0c68cf/attachment-0002.html>
More information about the Mercurial-devel
mailing list