comparison mercurial/cmdutil.py @ 12925:6eab8f0df2ca

commands: add revset support to most commands
author Matt Mackall <mpm@selenic.com>
date Thu, 04 Nov 2010 16:21:28 -0500
parents 4ff61287bde2
children 6e0a9f9227bd
comparison
equal deleted inserted replaced
12924:2f1174b2c4fa 12925:6eab8f0df2ca
145 seen, l = set(), [] 145 seen, l = set(), []
146 for spec in revs: 146 for spec in revs:
147 # attempt to parse old-style ranges first to deal with 147 # attempt to parse old-style ranges first to deal with
148 # things like old-tag which contain query metacharacters 148 # things like old-tag which contain query metacharacters
149 try: 149 try:
150 if isinstance(spec, int):
151 seen.add(spec)
152 l.append(spec)
153 continue
154
150 if revrangesep in spec: 155 if revrangesep in spec:
151 start, end = spec.split(revrangesep, 1) 156 start, end = spec.split(revrangesep, 1)
152 start = revfix(repo, start, 0) 157 start = revfix(repo, start, 0)
153 end = revfix(repo, end, len(repo) - 1) 158 end = revfix(repo, end, len(repo) - 1)
154 step = start > end and -1 or 1 159 step = start > end and -1 or 1