##// END OF EJS Templates
schemes: url parts are counted from 1
Alexander Solovyov -
r10070:9d1195b2 stable
parent child Browse files
Show More
@@ -64,7 +64,7 b' class ShortRepository(object):'
64 parts = parts[:-1]
64 parts = parts[:-1]
65 else:
65 else:
66 tail = ''
66 tail = ''
67 context = dict((str(i), v) for i, v in enumerate(parts))
67 context = dict((str(i+1), v) for i, v in enumerate(parts))
68 url = ''.join(self.templater.process(self.url, context)) + tail
68 url = ''.join(self.templater.process(self.url, context)) + tail
69 return hg._lookup(url).instance(ui, url, create)
69 return hg._lookup(url).instance(ui, url, create)
70
70
@@ -6,6 +6,7 b' schemes='
6
6
7 [schemes]
7 [schemes]
8 l = http://localhost:$HGPORT/
8 l = http://localhost:$HGPORT/
9 parts = http://{1}:$HGPORT/
9 EOF
10 EOF
10
11
11 hg init test
12 hg init test
@@ -18,5 +19,8 b' cat hg.pid >> $DAEMON_PIDS'
18
19
19 hg incoming l://
20 hg incoming l://
20
21
22 echo % check that {1} syntax works
23 hg incoming --debug parts://localhost | sed 's/[0-9]//g'
24
21 echo % errors
25 echo % errors
22 cat errors.log
26 cat errors.log
@@ -2,4 +2,11 b' adding a'
2 comparing with l://
2 comparing with l://
3 searching for changes
3 searching for changes
4 no changes found
4 no changes found
5 % check that {1} syntax works
6 using http://localhost:/
7 sending between command
8 comparing with parts://localhost
9 sending heads command
10 searching for changes
11 no changes found
5 % errors
12 % errors
General Comments 0
You need to be logged in to leave comments. Login now