# HG changeset patch # User Patrick Mezard # Date 1306310777 -7200 # Node ID a6b543e053058c39b52e2b7c1e9a4b7c14c66a56 # Parent c864f5e743efefeb667c6f8ffa659a8572047059 test-git-import: test patching existing copy targets diff -r c864f5e743ef -r a6b543e05305 tests/test-git-import.t --- 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 - < 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 - < 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 ..