##// END OF EJS Templates
dispatch: error out on invalid -R path even if optionalrepo (issue4805) (BC)...
Yuya Nishihara -
r26142:7332bf4a default
parent child Browse files
Show More
@@ -890,6 +890,8 b' def _dispatch(req):'
890 except error.RequirementError:
890 except error.RequirementError:
891 raise
891 raise
892 except error.RepoError:
892 except error.RepoError:
893 if rpath and rpath[-1]: # invalid -R path
894 raise
893 if cmd not in commands.optionalrepo.split():
895 if cmd not in commands.optionalrepo.split():
894 if (cmd in commands.inferrepo.split() and
896 if (cmd in commands.inferrepo.split() and
895 args and not path): # try to infer -R from command args
897 args and not path): # try to infer -R from command args
@@ -1020,7 +1020,7 b" Test that auto sharing doesn't cause fai"
1020 $ hg -R a id -r 0
1020 $ hg -R a id -r 0
1021 acb14030fe0a
1021 acb14030fe0a
1022 $ hg id -R remote -r 0
1022 $ hg id -R remote -r 0
1023 abort: there is no Mercurial repository here (.hg not found)
1023 abort: repository remote not found!
1024 [255]
1024 [255]
1025 $ hg --config share.pool=share -q clone -e "python \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1025 $ hg --config share.pool=share -q clone -e "python \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1026 $ hg -R remote id -r 0
1026 $ hg -R remote id -r 0
@@ -589,6 +589,15 b' start without repository:'
589 000000000000 tip
589 000000000000 tip
590
590
591
591
592 don't fall back to cwd if invalid -R path is specified (issue4805):
593
594 $ cd repo
595 $ hg serve --cmdserver pipe -R ../nonexistent
596 abort: repository ../nonexistent not found!
597 [255]
598 $ cd ..
599
600
592 unix domain socket:
601 unix domain socket:
593
602
594 $ cd repo
603 $ cd repo
@@ -43,14 +43,14 b' configure for serving'
43 repo not found error
43 repo not found error
44
44
45 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
45 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
46 remote: abort: there is no Mercurial repository here (.hg not found)!
46 remote: abort: repository nonexistent not found!
47 abort: no suitable response from remote hg!
47 abort: no suitable response from remote hg!
48 [255]
48 [255]
49
49
50 non-existent absolute path
50 non-existent absolute path
51
51
52 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
52 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
53 remote: abort: there is no Mercurial repository here (.hg not found)!
53 remote: abort: repository /$TESTTMP/nonexistent not found!
54 abort: no suitable response from remote hg!
54 abort: no suitable response from remote hg!
55 [255]
55 [255]
56
56
@@ -128,7 +128,7 b' pull from wrong ssh URL'
128
128
129 $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
129 $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
130 pulling from ssh://user@dummy/doesnotexist
130 pulling from ssh://user@dummy/doesnotexist
131 remote: abort: there is no Mercurial repository here (.hg not found)!
131 remote: abort: repository doesnotexist not found!
132 abort: no suitable response from remote hg!
132 abort: no suitable response from remote hg!
133 [255]
133 [255]
134
134
@@ -34,14 +34,14 b' configure for serving'
34 repo not found error
34 repo not found error
35
35
36 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
36 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
37 remote: abort: there is no Mercurial repository here (.hg not found)!
37 remote: abort: repository nonexistent not found!
38 abort: no suitable response from remote hg!
38 abort: no suitable response from remote hg!
39 [255]
39 [255]
40
40
41 non-existent absolute path
41 non-existent absolute path
42
42
43 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local
43 $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local
44 remote: abort: there is no Mercurial repository here (.hg not found)!
44 remote: abort: repository $TESTTMP/nonexistent not found!
45 abort: no suitable response from remote hg!
45 abort: no suitable response from remote hg!
46 [255]
46 [255]
47
47
@@ -119,7 +119,7 b' pull from wrong ssh URL'
119
119
120 $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
120 $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
121 pulling from ssh://user@dummy/doesnotexist
121 pulling from ssh://user@dummy/doesnotexist
122 remote: abort: there is no Mercurial repository here (.hg not found)!
122 remote: abort: repository doesnotexist not found!
123 abort: no suitable response from remote hg!
123 abort: no suitable response from remote hg!
124 [255]
124 [255]
125
125
General Comments 0
You need to be logged in to leave comments. Login now