Commits

Takumi IINO committed 4f23997

Convert path for url. bblink work on windows

Comments (0)

Files changed (1)

 
 def bb_link(ui, repo, filename=None, **opts):
     '''display a bitbucket link to the repository, or the specific file if given'''
-    # XXX: might not work on windows, because it uses \ to separate paths
     lineno = opts.get('lineno')
     reponame = get_bbreponame(ui, repo, opts)
     nodeid = str(repo[None])
         # our wc is dirty, just take the node id and be happy
         nodeid = nodeid[:-1]
     if filename:
-        path = os.path.relpath(filename, repo.root)
+        path = util.pconvert(os.path.relpath(filename, repo.root))
     else:
         path = ''
     url = 'http://bitbucket.org/%s/src/%s/%s'