Patchwork [4,of,6] revset: remove invalid value in the origin set

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 18, 2014, 9:40 p.m.
Message ID <542a93adfe2a1044d2f0.1411076457@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5875/
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 1410976770 25200
#      Wed Sep 17 10:59:30 2014 -0700
# Node ID 542a93adfe2a1044d2f0b300c32e72670216001d
# Parent  9275e924b18bd15e4d4e3e6183c9bc87f5f60992
revset: remove invalid value in the origin set

Same as the parents related revsets, origin had some invalid value in the
computed set. We remove them.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1165,10 +1165,11 @@  def origin(repo, subset, x):
             if prev is None:
                 return src
             src = prev
 
     o = set([_firstsrc(r) for r in args])
+    o -= set([None])
     return subset.filter(o.__contains__)
 
 def outgoing(repo, subset, x):
     """``outgoing([path])``
     Changesets not found in the specified destination repository, or the