Mercurial > hg-stable
changeset 9868:c02445cd1b50
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 16 Nov 2009 13:52:53 -0600 |
parents | e8e9f523ffe8 (current diff) 81f1462ef2c7 (diff) |
children | 31ec469f9b55 |
files | |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Mon Nov 16 12:51:00 2009 -0600 +++ b/hgext/mq.py Mon Nov 16 13:52:53 2009 -0600 @@ -2550,7 +2550,7 @@ repo.__class__ = mqrepo def mqimport(orig, ui, repo, *args, **kwargs): - if hasattr(repo, 'abort_if_wdir_patched'): + if hasattr(repo, 'abort_if_wdir_patched') and not kwargs.get('no_commit', False): repo.abort_if_wdir_patched(_('cannot import over an applied patch'), kwargs.get('force')) return orig(ui, repo, *args, **kwargs)
--- a/tests/test-mq Mon Nov 16 12:51:00 2009 -0600 +++ b/tests/test-mq Mon Nov 16 13:52:53 2009 -0600 @@ -175,6 +175,10 @@ hg revert --no-backup ../a hg import ../../import.diff hg st +echo % import --no-commit should succeed +hg import --no-commit ../../import.diff +hg st +hg revert --no-backup ../a echo % qunapplied hg qunapplied
--- a/tests/test-mq.out Mon Nov 16 12:51:00 2009 -0600 +++ b/tests/test-mq.out Mon Nov 16 13:52:53 2009 -0600 @@ -154,6 +154,9 @@ abort: source has mq patches applied % import should fail abort: cannot import over an applied patch +% import --no-commit should succeed +applying ../../import.diff +M a % qunapplied test2.patch % qpush/qpop with index