diff tests/test-rename.t @ 24006:42fa7eeb858e

largefiles: use the core file copy logic to validate the destination path The destination is validated by pathutil.canonpath() for illegal components, and that it is in the repository. The logic for creating the standin directory tree was calling this before cmdutil.copy(), but without the destination file name component. The cmdutil.copy() logic also calls pathutil.canonpath(), but with the file name component. By always calling the core logic first, the error message is always consistent. Specifically, the old behavior for these tests was to say '.hg' contains an illegal component, and '..' is not under root. A user wasn't likely to notice the discrepancy, but this eliminates a needless difference when running the test suite with --config extensions.largefiles=.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 31 Jan 2015 00:13:29 -0500
parents 2963d5c9d90b
children 1ef96a3b8b89
line wrap: on
line diff
--- a/tests/test-rename.t	Fri Jan 16 15:40:59 2015 -0800
+++ b/tests/test-rename.t	Sat Jan 31 00:13:29 2015 -0500
@@ -620,10 +620,16 @@
   $ hg rename d1/d11/a1 .hg
   abort: path contains illegal component: .hg/a1 (glob)
   [255]
+  $ hg --config extensions.largefiles= rename d1/d11/a1 .hg
+  abort: path contains illegal component: .hg/a1 (glob)
+  [255]
   $ hg status -C
   $ hg rename d1/d11/a1 ..
   abort: ../a1 not under root '$TESTTMP' (glob)
   [255]
+  $ hg --config extensions.largefiles= rename d1/d11/a1 ..
+  abort: ../a1 not under root '$TESTTMP' (glob)
+  [255]
   $ hg status -C
 
   $ mv d1/d11/a1 .hg