diff tests/test-subrepo-missing.t @ 24645:b39afa36006a

subrepo: precisely identify the missing subrepo spec file It isn't obvious which file is the problem with deep subrepos, so provide the path. Since the parsing is done with a ctx and not a subrepo object, it isn't possible to display a path from the root subrepo. Therefore, the path shown is relative to cwd. There's no test coverage for the first abort, and I couldn't figure out how to trigger it, but it is changed for consistency.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 05 Apr 2015 15:08:55 -0400
parents 871485bd03fd
children cc497780eaf9
line wrap: on
line diff
--- a/tests/test-subrepo-missing.t	Sun Apr 05 12:12:02 2015 -0700
+++ b/tests/test-subrepo-missing.t	Sun Apr 05 15:08:55 2015 -0400
@@ -24,7 +24,7 @@
   $ cp .hgsubstate .hgsubstate.old
   >>> file('.hgsubstate', 'wb').write('\ninvalid')
   $ hg st --subrepos
-  abort: invalid subrepository revision specifier in .hgsubstate line 2
+  abort: invalid subrepository revision specifier in '.hgsubstate' line 2
   [255]
   $ mv .hgsubstate.old .hgsubstate
 
@@ -32,9 +32,9 @@
 
   $ rm .hgsub
   $ hg revert .hgsub
-  warning: subrepo spec file .hgsub not found
-  warning: subrepo spec file .hgsub not found
-  warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file '.hgsub' not found
+  warning: subrepo spec file '.hgsub' not found
+  warning: subrepo spec file '.hgsub' not found
 
 delete .hgsubstate and revert it
 
@@ -45,11 +45,11 @@
 
   $ rm .hgsub
   $ hg up 0
-  warning: subrepo spec file .hgsub not found
-  warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file '.hgsub' not found
+  warning: subrepo spec file '.hgsub' not found
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg st
-  warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file '.hgsub' not found
   ! .hgsub
   $ ls subrepo
   a
@@ -57,8 +57,8 @@
 delete .hgsubstate and update
 
   $ hg up -C
-  warning: subrepo spec file .hgsub not found
-  warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file '.hgsub' not found
+  warning: subrepo spec file '.hgsub' not found
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ rm .hgsubstate
   $ hg up 0