Mercurial > hg
changeset 14431:a6b543e05305
test-git-import: test patching existing copy targets
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 25 May 2011 10:06:17 +0200 |
parents | c864f5e743ef |
children | 0969d91fad5c |
files | tests/test-git-import.t |
diffstat | 1 files changed, 39 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-git-import.t Tue May 24 17:30:00 2011 -0500 +++ b/tests/test-git-import.t Wed May 25 10:06:17 2011 +0200 @@ -402,3 +402,42 @@ a R a $ cd .. + +Pure copy with existing destination + + $ hg init copytoexisting + $ cd copytoexisting + $ echo a > a + $ echo b > b + $ hg ci -Am add + adding a + adding b + $ hg import --no-commit - <<EOF + > diff --git a/a b/b + > copy from a + > copy to b + > EOF + applying patch from stdin + abort: cannot create b: destination already exists + [255] + $ cat b + b + +Copy and changes with existing destination + + $ hg import --no-commit - <<EOF + > diff --git a/a b/b + > copy from a + > copy to b + > --- a/a + > +++ b/b + > @@ -1,1 +1,2 @@ + > a + > +b + > EOF + applying patch from stdin + abort: cannot create b: destination already exists + [255] + $ cat b + b + $ cd ..