diff mercurial/repo.py @ 6526:cfeeac24fc1e

repo: add rjoin method
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 11 Apr 2008 22:19:52 -0700
parents 08800489257e
children 1d54e2f6c0b7
line wrap: on
line diff
--- a/mercurial/repo.py	Fri Apr 11 22:19:51 2008 -0700
+++ b/mercurial/repo.py	Fri Apr 11 22:19:52 2008 -0700
@@ -40,3 +40,9 @@
 
     def cancopy(self):
         return self.local()
+
+    def rjoin(self, path):
+        url = self.url()
+        if url.endswith('/'):
+            return url + path
+        return url + '/' + path