##// END OF EJS Templates
hgweb: allow symbolic revisions with forward slashes in urls...
av6 -
r25777:1c2a8db3 default
parent child Browse files
Show More
@@ -235,7 +235,7 b' class hgweb(object):'
235 req.form['file'] = ['/'.join(args)]
235 req.form['file'] = ['/'.join(args)]
236 else:
236 else:
237 if args and args[0]:
237 if args and args[0]:
238 node = args.pop(0)
238 node = args.pop(0).replace('%2F', '/')
239 req.form['node'] = [node]
239 req.form['node'] = [node]
240 if args:
240 if args:
241 req.form['file'] = args
241 req.form['file'] = args
@@ -10,6 +10,9 b' Some tests for hgweb. Tests static files'
10 $ hg ci -Ambase
10 $ hg ci -Ambase
11 adding da/foo
11 adding da/foo
12 adding foo
12 adding foo
13 $ hg bookmark -r0 '@'
14 $ hg bookmark -r0 'a b c'
15 $ hg bookmark -r0 'd/e/f'
13 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
16 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
14 $ cat hg.pid >> $DAEMON_PIDS
17 $ cat hg.pid >> $DAEMON_PIDS
15
18
@@ -264,7 +267,7 b' try bad style'
264 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
267 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
265 <h3>
268 <h3>
266 directory / @ 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a>
269 directory / @ 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a>
267 <span class="tag">tip</span>
270 <span class="tag">tip</span> <span class="tag">@</span> <span class="tag">a b c</span> <span class="tag">d/e/f</span>
268 </h3>
271 </h3>
269
272
270 <form class="search" action="/log">
273 <form class="search" action="/log">
@@ -557,6 +560,9 b' phase changes are refreshed (issue4061)'
557 summary: base
560 summary: base
558 branch: default
561 branch: default
559 tag: tip
562 tag: tip
563 bookmark: @
564 bookmark: a b c
565 bookmark: d/e/f
560
566
561
567
562 $ hg phase --draft tip
568 $ hg phase --draft tip
@@ -580,8 +586,29 b' phase changes are refreshed (issue4061)'
580 user: test
586 user: test
581 date: Thu, 01 Jan 1970 00:00:00 +0000
587 date: Thu, 01 Jan 1970 00:00:00 +0000
582 summary: base
588 summary: base
589 bookmark: @
590 bookmark: a b c
591 bookmark: d/e/f
592
583
593
584
594
595 access bookmarks
596
597 $ get-with-headers.py localhost:$HGPORT 'rev/@?style=paper' | egrep '^200|changeset 0:'
598 200 Script output follows
599 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
600
601 $ get-with-headers.py localhost:$HGPORT 'rev/%40?style=paper' | egrep '^200|changeset 0:'
602 200 Script output follows
603 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
604
605 $ get-with-headers.py localhost:$HGPORT 'rev/a%20b%20c?style=paper' | egrep '^200|changeset 0:'
606 200 Script output follows
607 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
608
609 $ get-with-headers.py localhost:$HGPORT 'rev/d%252Fe%252Ff?style=paper' | egrep '^200|changeset 0:'
610 200 Script output follows
611 changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a>
585
612
586 no style can be loaded from directories other than the specified paths
613 no style can be loaded from directories other than the specified paths
587
614
General Comments 0
You need to be logged in to leave comments. Login now