# HG changeset patch # User Brendan Cully # Date 1225395504 25200 # Node ID bd6deb7525f46d66fe1b33b928e5c828218b7f30 # Parent 695383442347b4e888ef03e8c0a71086bd53c933 mq: use cmdutil.matchfiles instead of match for qnew -f. Closes issue1368. diff -r 695383442347 -r bd6deb7525f4 hgext/mq.py --- 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() diff -r 695383442347 -r bd6deb7525f4 tests/test-mq-qnew --- 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 diff -r 695383442347 -r bd6deb7525f4 tests/test-mq-qnew.out --- 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