comparison tests/test-import.t @ 24259:5ac8ce04baa2

cmdutil.tryimportone: allow importing relative patches into the working dir This makes hg import --prefix dir/ (without bypass) work.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 09 Mar 2015 18:22:24 -0700
parents a387b0390082
children 1ef96a3b8b89
comparison
equal deleted inserted replaced
24258:093e8a5e995f 24259:5ac8ce04baa2
668 > EOF 668 > EOF
669 applying patch from stdin 669 applying patch from stdin
670 $ hg status 670 $ hg status
671 $ cat a 671 $ cat a
672 bb 672 bb
673
674 test --prefix
675
676 $ mkdir -p dir/dir2
677 $ echo b > dir/dir2/b
678 $ hg ci -Am b
679 adding dir/dir2/b
680 $ hg import -p2 --prefix dir - << EOF
681 > foobar
682 > --- drop1/drop2/dir2/b
683 > +++ drop1/drop2/dir2/b
684 > @@ -1,1 +1,1 @@
685 > -b
686 > +cc
687 > EOF
688 applying patch from stdin
689 $ hg status
690 $ cat dir/dir2/b
691 cc
673 $ cd .. 692 $ cd ..
674 693
675 694
676 test paths outside repo root 695 test paths outside repo root
677 696