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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Sep 18 16:40:57 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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


More information about the Mercurial-devel mailing list