##// END OF EJS Templates
test-git-import: test patching existing copy targets
Patrick Mezard -
r14431:a6b543e0 default
parent child Browse files
Show More
@@ -402,3 +402,42 b' Renames and strip'
402 a
402 a
403 R a
403 R a
404 $ cd ..
404 $ cd ..
405
406 Pure copy with existing destination
407
408 $ hg init copytoexisting
409 $ cd copytoexisting
410 $ echo a > a
411 $ echo b > b
412 $ hg ci -Am add
413 adding a
414 adding b
415 $ hg import --no-commit - <<EOF
416 > diff --git a/a b/b
417 > copy from a
418 > copy to b
419 > EOF
420 applying patch from stdin
421 abort: cannot create b: destination already exists
422 [255]
423 $ cat b
424 b
425
426 Copy and changes with existing destination
427
428 $ hg import --no-commit - <<EOF
429 > diff --git a/a b/b
430 > copy from a
431 > copy to b
432 > --- a/a
433 > +++ b/b
434 > @@ -1,1 +1,2 @@
435 > a
436 > +b
437 > EOF
438 applying patch from stdin
439 abort: cannot create b: destination already exists
440 [255]
441 $ cat b
442 b
443 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now