Mercurial > hg-stable
changeset 16799:0568c499c44a stable
merge with i18n
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 30 May 2012 14:31:29 -0500 |
parents | 2a0efa1112ac (diff) 9aa590007c7b (current diff) |
children | f694ab54b660 9a99224a6409 4cf41c333e74 |
files | |
diffstat | 3 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/match.py Tue May 29 21:32:50 2012 +0900 +++ b/mercurial/match.py Wed May 30 14:31:29 2012 -0500 @@ -62,7 +62,10 @@ pats = _normalize(exclude, 'glob', root, cwd, auditor) self.excludepat, em = _buildmatch(ctx, pats, '(?:/|$)') if exact: - self._files = patterns + if isinstance(patterns, list): + self._files = patterns + else: + self._files = list(patterns) pm = self.exact elif patterns: pats = _normalize(patterns, default, root, cwd, auditor)
--- a/mercurial/scmutil.py Tue May 29 21:32:50 2012 +0900 +++ b/mercurial/scmutil.py Wed May 30 14:31:29 2012 -0500 @@ -524,9 +524,11 @@ l = revrange(repo, revs) if len(l) == 0: + if revs: + raise util.Abort(_('empty revision range')) return repo.dirstate.p1(), None - if len(l) == 1: + if len(l) == 1 and len(revs) == 1 and _revrangesep not in revs[0]: return repo.lookup(l[0]), None return repo.lookup(l[0]), repo.lookup(l[-1])
--- a/tests/test-diff-change.t Tue May 29 21:32:50 2012 +0900 +++ b/tests/test-diff-change.t Wed May 30 14:31:29 2012 -0500 @@ -29,6 +29,12 @@ -first +second +Test dumb revspecs (issue3474) + + $ hg diff -r 2:2 + $ hg diff -r "2 and 1" + abort: empty revision range + [255] Testing diff --change when merge: