Mercurial > hg-stable
changeset 7297:bd6deb7525f4
mq: use cmdutil.matchfiles instead of match for qnew -f.
Closes issue1368.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 30 Oct 2008 12:38:24 -0700 |
parents | 695383442347 |
children | 0e2e371c7406 |
files | hgext/mq.py tests/test-mq-qnew tests/test-mq-qnew.out |
diffstat | 3 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Thu Oct 30 12:31:24 2008 -0700 +++ b/hgext/mq.py Thu Oct 30 12:38:24 2008 -0700 @@ -661,7 +661,7 @@ m, a, r, d = repo.status(match=match)[:4] else: m, a, r, d = self.check_localchanges(repo, force) - match = cmdutil.match(repo, m + a + r) + match = cmdutil.matchfiles(repo, m + a + r) commitfiles = m + a + r self.check_toppatch(repo) insert = self.full_series_end()
--- a/tests/test-mq-qnew Thu Oct 30 12:31:24 2008 -0700 +++ b/tests/test-mq-qnew Thu Oct 30 12:38:24 2008 -0700 @@ -44,4 +44,13 @@ touch ../first.patch hg qimport ../first.patch -exit 0 +echo '% qnew -f from a subdirectory' +hg qpop -a +mkdir d +cd d +echo b > b +hg ci -Am t +echo b >> b +hg st +hg qnew -g -f p +cat ../.hg/patches/p
--- a/tests/test-mq-qnew.out Thu Oct 30 12:31:24 2008 -0700 +++ b/tests/test-mq-qnew.out Thu Oct 30 12:38:24 2008 -0700 @@ -18,3 +18,13 @@ % qnew twice abort: patch "first.patch" already exists abort: patch "first.patch" already exists +% qnew -f from a subdirectory +Patch queue now empty +adding d/b +M d/b +diff --git a/d/b b/d/b +--- a/d/b ++++ b/d/b +@@ -1,1 +1,2 @@ + b ++b