Commits

Dan Villiom Podlaski Christiansen committed 10d91e6

Fix filenames.

Comments (0)

Files changed (2)

hgopenurl/__init__.py

         ui.note('assuming standard hgweb repository')
         url = path.rstrip('/')
         if filename:
-            url = '/file/%s/%s' % (
+            url += '/file/%s/%s' % (
                 rev or 'default', filename,
             )
         elif rev:

tests/test-showurl.t

   $ testrev https://xxx/
   https://xxx/rev/deadbeef
 
-Ditto, with revision
+Ditto, with filename
 
-  $ hg openurl -r 42 http://xxx
-  $ hg openurl -r 42  https://xxx/
+  $ hg showurl blyf http://xxx
+  http://xxx/file/default/blyf
+  $ hg showurl blyf  https://xxx/
+  https://xxx/file/default/blyf
+
+Ditto, with revision & filename
+
+  $ hg showurl -r 42 blyf http://xxx
+  http://xxx/file/42/blyf
+  $ hg showurl -r 42 blyf https://xxx/
+  https://xxx/file/42/blyf
 
 We can't do these