comparison mercurial/revset.py @ 11293:0e5ce2325795

revset: delay import of hg to avoid start-up import loops
author Matt Mackall <mpm@selenic.com>
date Sat, 05 Jun 2010 09:58:02 -0500
parents 4215ce511134
children 3d0591a66118
comparison
equal deleted inserted replaced
11292:037d910734de 11293:0e5ce2325795
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 import re 8 import re
9 import parser, util, hg, error 9 import parser, util, error
10 import match as _match 10 import match as _match
11 11
12 elements = { 12 elements = {
13 "(": (20, ("group", 1, ")"), ("func", 1, ")")), 13 "(": (20, ("group", 1, ")"), ("func", 1, ")")),
14 "-": (19, ("negate", 19), ("minus", 19)), 14 "-": (19, ("negate", 19), ("minus", 19)),
408 s = getset(repo, subset, x) 408 s = getset(repo, subset, x)
409 cs = set(children(repo, subset, x)) 409 cs = set(children(repo, subset, x))
410 return [r for r in s if r not in cs] 410 return [r for r in s if r not in cs]
411 411
412 def outgoing(repo, subset, x): 412 def outgoing(repo, subset, x):
413 import hg # avoid start-up nasties
413 l = getlist(x) 414 l = getlist(x)
414 if len(l) == 1: 415 if len(l) == 1:
415 dest = getstring(l[0], "outgoing wants a repo path") 416 dest = getstring(l[0], "outgoing wants a repo path")
416 else: 417 else:
417 dest = '' 418 dest = ''