Mercurial > hg
comparison tests/test-import-git.t @ 24385:885a573fa619
patch.pathtransform: prepend prefix even if strip is 0
Silly oversight by me.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 18 Mar 2015 20:59:06 -0700 |
parents | 5ac8ce04baa2 |
children | 72d7d390ef5d |
comparison
equal
deleted
inserted
replaced
24384:5cb459dc32d2 | 24385:885a573fa619 |
---|---|
624 $ echo d > dir/d | 624 $ echo d > dir/d |
625 $ hg ci -Am addbcd | 625 $ hg ci -Am addbcd |
626 adding dir/d | 626 adding dir/d |
627 adding dir/dir2/b | 627 adding dir/dir2/b |
628 adding dir/dir2/c | 628 adding dir/dir2/c |
629 $ hg import --no-commit --prefix dir/ - <<EOF | |
630 > diff --git a/a b/a | |
631 > --- /dev/null | |
632 > +++ b/a | |
633 > @@ -0,0 +1 @@ | |
634 > +aaa | |
635 > diff --git a/d b/d | |
636 > --- a/d | |
637 > +++ b/d | |
638 > @@ -1,1 +1,2 @@ | |
639 > d | |
640 > +dd | |
641 > EOF | |
642 applying patch from stdin | |
643 $ cat dir/a | |
644 aaa | |
645 $ cat dir/d | |
646 d | |
647 dd | |
648 $ hg revert -aC | |
649 forgetting dir/a (glob) | |
650 reverting dir/d (glob) | |
651 $ rm dir/a | |
629 (test that prefixes are relative to the root) | 652 (test that prefixes are relative to the root) |
630 $ mkdir tmpdir | 653 $ mkdir tmpdir |
631 $ cd tmpdir | 654 $ cd tmpdir |
632 $ hg import --no-commit -p2 --prefix dir/ - <<EOF | 655 $ hg import --no-commit -p2 --prefix dir/ - <<EOF |
633 > diff --git a/foo/a b/foo/a | 656 > diff --git a/foo/a b/foo/a |