# HG changeset patch # User Idan Kamara # Date 2011-05-04 20:12:23 # Node ID e1c34ce39faeea2147e40e16ce3fdf4aaa9a073d # Parent 8aab5a82685f218402363cfac15dfde512e6e62b mq: don't suggest to refresh when qpushing with no applied patches diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1127,7 +1127,7 @@ class queue(object): 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: diff --git a/tests/test-mq-qpush-exact.t b/tests/test-mq-qpush-exact.t --- a/tests/test-mq-qpush-exact.t +++ b/tests/test-mq-qpush-exact.t @@ -163,7 +163,7 @@ qpush --exact --force with changes to an $ 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 @@ qpush --exact --force with changes to an $ 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 @@ qpush --exact --force with changes to a $ 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 @@ qpush --exact --force with changes to a $ 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 diff --git a/tests/test-mq.t b/tests/test-mq.t --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -1271,7 +1271,7 @@ test qpush with --force, issue1087 qpush should fail, local changes $ hg qpush - abort: local changes found, refresh first + abort: local changes found [255] @@ -1317,7 +1317,7 @@ apply force, should not discard changes qpush should fail, local changes $ hg qpush - abort: local changes found, refresh first + abort: local changes found [255]