Patchwork [6,of,6] revert: remove nullrev from the bookmark computation

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 18, 2014, 9:40 p.m.
Message ID <8d2c99203baf20aaab22.1411076459@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5876/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 18, 2014, 9:40 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1411009019 25200
#      Wed Sep 17 19:56:59 2014 -0700
# Node ID 8d2c99203baf20aaab22d260d22fadbf0e42a7df
# Parent  ac8639727377910aacfcd326bd3dec008a577b82
revert: remove nullrev from the bookmark computation

Same as for other revset we sanitize the content of the set to be able to rely
on it more.
Durham Goode - Sept. 19, 2014, 11:12 p.m.
On 9/18/14, 2:40 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1411009019 25200
> #      Wed Sep 17 19:56:59 2014 -0700
> # Node ID 8d2c99203baf20aaab22d260d22fadbf0e42a7df
> # Parent  ac8639727377910aacfcd326bd3dec008a577b82
> revert: remove nullrev from the bookmark computation
>
> Same as for other revset we sanitize the content of the set to be able to rely
> on it more.
>
Queued this series to the clowncopter repo.
Durham Goode - Sept. 19, 2014, 11:13 p.m.
On 9/19/14, 4:12 PM, Durham Goode wrote:
>
> On 9/18/14, 2:40 PM, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david@fb.com>
>> # Date 1411009019 25200
>> #      Wed Sep 17 19:56:59 2014 -0700
>> # Node ID 8d2c99203baf20aaab22d260d22fadbf0e42a7df
>> # Parent  ac8639727377910aacfcd326bd3dec008a577b82
>> revert: remove nullrev from the bookmark computation
>>
>> Same as for other revset we sanitize the content of the set to be 
>> able to rely
>> on it more.
>>
> Queued this series to the clowncopter repo.
With a fixed subject line for the final patch.  s/revert/revset/

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -465,10 +465,11 @@  def bookmark(repo, subset, x):
             for bmrev in matchrevs:
                 bms.add(repo[bmrev].rev())
     else:
         bms = set([repo[r].rev()
                    for r in repo._bookmarks.values()])
+    bms -= set([node.nullrev])
     return subset.filter(bms.__contains__)
 
 def branch(repo, subset, x):
     """``branch(string or set)``
     All changesets belonging to the given branch or the branches of the given