Mercurial > hg-stable
changeset 10115:c23626384b7e
merge with default
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 23 Dec 2009 13:12:36 +0100 |
parents | f76984a27b3d (current diff) 3e7663b2f3fc (diff) |
children | 333193c025ad |
files | |
diffstat | 3 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Dec 22 00:50:15 2009 +0100 +++ b/hgext/mq.py Wed Dec 23 13:12:36 2009 +0100 @@ -770,6 +770,10 @@ else: m, a, r, d = self.check_localchanges(repo, force) match = cmdutil.matchfiles(repo, m + a + r) + if force: + p = repo[None].parents() + if len(p) > 1: + raise util.Abort(_('cannot manage merge changesets')) commitfiles = m + a + r self.check_toppatch(repo) insert = self.full_series_end()
--- a/tests/test-mq-qnew Tue Dec 22 00:50:15 2009 +0100 +++ b/tests/test-mq-qnew Wed Dec 23 13:12:36 2009 +0100 @@ -58,3 +58,19 @@ echo '% qnew -u with no username configured' HGUSER= hg qnew -u blue red cat ../.hg/patches/red + +echo '% fail when trying to import a merge' +hg init merge +cd merge +touch a +hg ci -Am null +echo a >> a +hg ci -m a +hg up -r 0 +echo b >> a +hg ci -m b +hg merge -f 1 +hg resolve --mark a +hg qnew -f merge + +exit 0
--- a/tests/test-mq-qnew.out Tue Dec 22 00:50:15 2009 +0100 +++ b/tests/test-mq-qnew.out Wed Dec 23 13:12:36 2009 +0100 @@ -35,3 +35,13 @@ % qnew -u with no username configured From: blue +% fail when trying to import a merge +adding a +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +created new head +merging a +warning: conflicts during merge. +merging a failed! +0 files updated, 0 files merged, 0 files removed, 1 files unresolved +use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon +abort: cannot manage merge changesets