[PATCH 2 of 2 V3] strip: take branch into account when selecting update target (issue5540)

Paul Morelle paul.morelle at octobus.net
Wed Oct 11 10:38:44 EDT 2017


On 10/11/2017 03:01 PM, Yuya Nishihara wrote:
> On Tue, 10 Oct 2017 11:44:43 +0200, Paul Morelle wrote:
>>      if (util.safehasattr(repo, 'mq') and p2 != nullid
>>          and p2 in [x.node for x in repo.mq.applied]):
>>          unode = p2
>> +    elif current_branch != repo[unode].branch():
>> +        pwdir = 'parents(wdir())'
>> +        revset = ('max(((parents(%ln::{0}) + {0}) - %ln::{0})'
>> +                  ' and branch(%s))'
>> +                 ).format(pwdir)
> bytes.format() isn't available on Python 3. Instead, you can use %r to embed
> a revset expression.
Oh, something new to know about Mercurial and Python3.
Today I have learned that all the strings are transformed into bytes in
mercurial in Python3.
I will push a V4 including your remarks.
Thank you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20171011/98b15106/attachment.html>


More information about the Mercurial-devel mailing list