diff tests/test-commit-interactive.t @ 24866:e1ec3d075c67 stable

record: fix adding new file with record from within a subdir (issue4626) In my latest change on record (edit newly added file), I forgot the repo.wjoin() so that record was not computing the paths properly to delete the backups and was crashing.
author Laurent Charignon <lcharignon@fb.com>
date Mon, 27 Apr 2015 14:02:49 -0700
parents 15d7f435108a
children d7778b88838c
line wrap: on
line diff
--- a/tests/test-commit-interactive.t	Mon Apr 27 16:24:43 2015 -0500
+++ b/tests/test-commit-interactive.t	Mon Apr 27 14:02:49 2015 -0700
@@ -1463,4 +1463,37 @@
   This is the first line
   This is the second line
   This is the third line
+
+Add new file from within a subdirectory
+  $ hg update -C .
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ mkdir folder
+  $ cd folder
+  $ echo "foo" > bar
+  $ hg add bar
+  $ hg commit -i -d '23 0' -mnewfilesubdir  <<EOF
+  > y
+  > y
+  > EOF
+  diff --git a/folder/bar b/folder/bar
+  new file mode 100644
+  examine changes to 'folder/bar'? [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +foo
+  record this change to 'folder/bar'? [Ynesfdaq?] y
+  
+  $ hg tip -p
+  changeset:   32:fb46c2a66466
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:23 1970 +0000
+  summary:     newfilesubdir
+  
+  diff -r 34c65441ddfb -r fb46c2a66466 folder/bar
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/folder/bar	Thu Jan 01 00:00:23 1970 +0000
+  @@ -0,0 +1,1 @@
+  +foo
+  
   $ cd ..