diff tests/test-commandserver.t @ 26738:7332bf4ae959

dispatch: error out on invalid -R path even if optionalrepo (issue4805) (BC) Before this patch, repo could be set to None for wrong -R. It's okay for commands that can reject repo=None, but the command server have a problem because: - it accepts repo=None for "unbound" mode - and it reenters dispatch() where repo object is created for cwd by default Test outputs are changed because the error is detected earlier. I think new message is better than ".hg not found".
author Yuya Nishihara <yuya@tcha.org>
date Mon, 31 Aug 2015 23:29:15 +0900 (2015-08-31)
parents 8f88f768e24c
children 68b74f20496a 5c0f5db65c6b
line wrap: on
line diff
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -589,6 +589,15 @@
   000000000000 tip
 
 
+don't fall back to cwd if invalid -R path is specified (issue4805):
+
+  $ cd repo
+  $ hg serve --cmdserver pipe -R ../nonexistent
+  abort: repository ../nonexistent not found!
+  [255]
+  $ cd ..
+
+
 unix domain socket:
 
   $ cd repo