Mercurial > hg
changeset 11277:2698a95f3f1b
revset: hook into revrange
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Jun 2010 11:18:57 -0500 |
parents | f28b58e35768 |
children | 7df88cdf47fd |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jun 01 11:18:57 2010 -0500 +++ b/mercurial/cmdutil.py Tue Jun 01 11:18:57 2010 -0500 @@ -10,7 +10,7 @@ import os, sys, errno, re, glob, tempfile import util, templater, patch, error, encoding, templatekw import match as _match -import similar +import similar, revset revrangesep = ':' @@ -149,7 +149,13 @@ seen, l = set(), [] for spec in revs: - if revrangesep in spec: + if spec and not ( + spec.startswith(revrangesep) or spec.endswith(revrangesep)): + m = revset.match(spec) + for r in m(repo, range(len(repo))): + l.append(r) + seen.update(l) + elif revrangesep in spec: start, end = spec.split(revrangesep, 1) start = revfix(repo, start, 0) end = revfix(repo, end, len(repo) - 1)