mq: don't suggest to refresh when qpushing with no applied patches
authorIdan Kamara <idankk86@gmail.com>
Wed, 04 May 2011 23:12:23 +0300
changeset 14191 e1c34ce39fae
parent 14190 8aab5a82685f
child 14192 38e387a64f58
mq: don't suggest to refresh when qpushing with no applied patches
hgext/mq.py
tests/test-mq-qpush-exact.t
tests/test-mq.t
--- a/hgext/mq.py	Wed May 04 20:14:30 2011 +0200
+++ b/hgext/mq.py	Wed May 04 23:12:23 2011 +0300
@@ -1127,7 +1127,7 @@
                 self.ui.warn(_('patch series already fully applied\n'))
                 return 1
             if not force:
-                self.check_localchanges(repo)
+                self.check_localchanges(repo, refresh=self.applied)
 
             if exact:
                 if move:
--- a/tests/test-mq-qpush-exact.t	Wed May 04 20:14:30 2011 +0200
+++ b/tests/test-mq-qpush-exact.t	Wed May 04 23:12:23 2011 +0300
@@ -163,7 +163,7 @@
   $ hg update 1 -q
   $ echo c0 >> f0
   $ hg qpush -e
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]
   $ hg qpush -ef
   applying p0
@@ -178,7 +178,7 @@
   $ hg update 1 -q
   $ echo c0 >> f0
   $ hg qpush -e p1
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]
   $ hg qpush -e p1 -f
   applying p0
@@ -197,7 +197,7 @@
   $ echo cp0-bad >> fp0
   $ hg add fp0
   $ hg qpush -e
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]
   $ hg qpush -ef
   applying p0
@@ -223,7 +223,7 @@
   $ echo cp1-bad >> fp1
   $ hg add fp1
   $ hg qpush -e p1
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]
   $ hg qpush -e p1 -f
   applying p0
--- a/tests/test-mq.t	Wed May 04 20:14:30 2011 +0200
+++ b/tests/test-mq.t	Wed May 04 23:12:23 2011 +0300
@@ -1271,7 +1271,7 @@
 qpush should fail, local changes
 
   $ hg qpush
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]
 
 
@@ -1317,7 +1317,7 @@
 qpush should fail, local changes
 
   $ hg qpush
-  abort: local changes found, refresh first
+  abort: local changes found
   [255]