diff 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
line wrap: on
line diff
--- a/tests/test-import.t	Fri Mar 06 22:56:19 2015 -0800
+++ b/tests/test-import.t	Mon Mar 09 18:22:24 2015 -0700
@@ -670,6 +670,25 @@
   $ hg status
   $ cat a
   bb
+
+test --prefix
+
+  $ mkdir -p dir/dir2
+  $ echo b > dir/dir2/b
+  $ hg ci -Am b
+  adding dir/dir2/b
+  $ hg import -p2 --prefix dir - << EOF
+  > foobar
+  > --- drop1/drop2/dir2/b
+  > +++ drop1/drop2/dir2/b
+  > @@ -1,1 +1,1 @@
+  > -b
+  > +cc
+  > EOF
+  applying patch from stdin
+  $ hg status
+  $ cat dir/dir2/b
+  cc
   $ cd ..