diff tests/test-addremove.t @ 23427:3778884197f0

addremove: print relative paths when called with -I/-X (BC) For "hg addremove 'glob:*.py'", we print any paths added or removed as relative to the current directory, but when "hg addremove -I 'glob:*.py'" is used, we use the absolute path (relative from the repo root). It seems like they should be the same, so change it so we use relative paths in both cases. Continue to use absolute paths when no patterns are given.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 01 Dec 2014 21:48:32 -0800
parents 9f4778027bc2
children 83bbedc16b3f
line wrap: on
line diff
--- a/tests/test-addremove.t	Mon Dec 01 19:34:11 2014 -0600
+++ b/tests/test-addremove.t	Mon Dec 01 21:48:32 2014 -0800
@@ -24,6 +24,21 @@
   adding foo
   $ cd ..
 
+  $ hg init subdir
+  $ cd subdir
+  $ mkdir dir
+  $ cd dir
+  $ touch a.py
+  $ hg addremove 'glob:*.py'
+  adding a.py
+  $ hg forget a.py
+  $ hg addremove -I 'glob:*.py'
+  adding a.py
+  $ hg forget a.py
+  $ hg addremove
+  adding dir/a.py
+  $ cd ..
+
   $ hg init sim
   $ cd sim
   $ echo a > a