##// END OF EJS Templates
dispatch: properly handle relative path aliases used with -R (issue2376)...
Brodie Rao -
r12637:42ca7aef default
parent child Browse files
Show More
@@ -420,12 +420,12 b' def _getlocal(ui, rpath):'
420 lui = ui
420 lui = ui
421 else:
421 else:
422 lui = ui.copy()
422 lui = ui.copy()
423 lui.readconfig(os.path.join(path, ".hg", "hgrc"))
423 lui.readconfig(os.path.join(path, ".hg", "hgrc"), path)
424
424
425 if rpath:
425 if rpath:
426 path = lui.expandpath(rpath[-1])
426 path = lui.expandpath(rpath[-1])
427 lui = ui.copy()
427 lui = ui.copy()
428 lui.readconfig(os.path.join(path, ".hg", "hgrc"))
428 lui.readconfig(os.path.join(path, ".hg", "hgrc"), path)
429
429
430 return path, lui
430 return path, lui
431
431
@@ -20,6 +20,10 b''
20 updating to branch default
20 updating to branch default
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ cd c
22 $ cd c
23 $ cat >> .hg/hgrc <<EOF
24 > [paths]
25 > relative = ../a
26 > EOF
23 $ hg pull -f ../b
27 $ hg pull -f ../b
24 pulling from ../b
28 pulling from ../b
25 searching for changes
29 searching for changes
@@ -59,11 +63,17 b' Testing -R/--repository:'
59 $ hg -R file://localhost/`pwd`/a/ identify
63 $ hg -R file://localhost/`pwd`/a/ identify
60 8580ff50825a tip
64 8580ff50825a tip
61
65
62 -R with a path alias:
66 -R with path aliases:
63
67
64 $ cd c
68 $ cd c
65 $ hg -R default identify
69 $ hg -R default identify
66 8580ff50825a tip
70 8580ff50825a tip
71 $ hg -R relative identify
72 8580ff50825a tip
73 $ echo '[paths]' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
75 $ HOME=`pwd`/../ hg -R relativetohome identify
76 8580ff50825a tip
67 $ cd ..
77 $ cd ..
68
78
69 Implicit -R:
79 Implicit -R:
General Comments 0
You need to be logged in to leave comments. Login now