Mercurial > hg-stable
changeset 19107:fcf08023c011 stable
match: fix root calculation for combining regexps with simple paths
The fall-back root for walking is the repo root, not no root.
The "roots" do however also end up in m.files() which is used in various ways,
for instance to indicate whether matches are exact. The change could thus have
other impacts.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 30 Apr 2013 01:04:35 +0200 |
parents | 3d0dd890c525 |
children | cb95716da5fe |
files | mercurial/match.py tests/test-status.t |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/match.py Tue Apr 30 05:01:32 2013 +0900 +++ b/mercurial/match.py Tue Apr 30 01:04:35 2013 +0200 @@ -344,7 +344,7 @@ r.append('/'.join(root) or '.') elif kind in ('relpath', 'path'): r.append(name or '.') - elif kind == 'relglob': + else: # relglob, re, relre r.append('.') return r
--- a/tests/test-status.t Tue Apr 30 05:01:32 2013 +0900 +++ b/tests/test-status.t Tue Apr 30 01:04:35 2013 +0200 @@ -100,6 +100,13 @@ ? ../1/in_b_1 ? in_b_2 ? ../in_b + +combining patterns with root and patterns without a root works + + $ hg st a/in_a re:.*b$ + ? a/in_a + ? b/in_b + $ cd .. $ hg init repo2