Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgwebdir_mod.py @ 13538:d24e97fd52a9
test-doctest: handle unix/windows path discrepancies
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 06 Mar 2011 14:17:47 +0100 |
parents | b391c0c9be61 |
children | 8cbb59124e67 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Sun Mar 06 10:06:09 2011 +0100 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Mar 06 14:17:47 2011 +0100 @@ -40,9 +40,10 @@ def urlrepos(prefix, roothead, paths): """yield url paths and filesystem paths from a list of repo paths - >>> list(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) + >>> conv = lambda seq: [(v, util.pconvert(p)) for v,p in seq] + >>> conv(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) [('hg/r', '/opt/r'), ('hg/r/r', '/opt/r/r'), ('hg', '/opt')] - >>> list(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) + >>> conv(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) [('r', '/opt/r'), ('r/r', '/opt/r/r'), ('', '/opt')] """ for path in paths: