mercurial/revset.py
changeset 51576 de5bf3fe0233
parent 50929 18c8c18993f0
equal deleted inserted replaced
51575:f610d705c3ca 51576:de5bf3fe0233
   147         return subset & x
   147         return subset & x
   148     else:
   148     else:
   149         return x & subset
   149         return x & subset
   150 
   150 
   151 
   151 
       
   152 def raw_node_set(repo, subset, x, order):
       
   153     """argument is a list of nodeid, resolve and use them"""
       
   154     nodes = _ordered_node_set(repo, x)
       
   155     if order == followorder:
       
   156         return subset & nodes
       
   157     else:
       
   158         return nodes & subset
       
   159 
       
   160 
       
   161 def _ordered_node_set(repo, nodes):
       
   162     if not nodes:
       
   163         return baseset()
       
   164     to_rev = repo.changelog.index.rev
       
   165     return baseset([to_rev(r) for r in nodes])
       
   166 
       
   167 
   152 def rangeset(repo, subset, x, y, order):
   168 def rangeset(repo, subset, x, y, order):
   153     m = getset(repo, fullreposet(repo), x)
   169     m = getset(repo, fullreposet(repo), x)
   154     n = getset(repo, fullreposet(repo), y)
   170     n = getset(repo, fullreposet(repo), y)
   155 
   171 
   156     if not m or not n:
   172     if not m or not n:
  2770     b"func": func,
  2786     b"func": func,
  2771     b"ancestor": ancestorspec,
  2787     b"ancestor": ancestorspec,
  2772     b"parent": parentspec,
  2788     b"parent": parentspec,
  2773     b"parentpost": parentpost,
  2789     b"parentpost": parentpost,
  2774     b"smartset": rawsmartset,
  2790     b"smartset": rawsmartset,
       
  2791     b"nodeset": raw_node_set,
  2775 }
  2792 }
  2776 
  2793 
  2777 relations = {
  2794 relations = {
  2778     b"g": generationsrel,
  2795     b"g": generationsrel,
  2779     b"generations": generationsrel,
  2796     b"generations": generationsrel,