##// END OF EJS Templates
repo: add rjoin method
Bryan O'Sullivan -
r6526:cfeeac24 default
parent child Browse files
Show More
@@ -109,7 +109,8 b' def clone(ui, source, dest=None, pull=Fa'
109 109 rev: revision to clone up to (implies pull=True)
110 110
111 111 update: update working directory after clone completes, if
112 destination is local repository
112 destination is local repository (True means update to default rev,
113 anything else is treated as a revision)
113 114 """
114 115
115 116 if isinstance(source, str):
@@ -244,7 +245,9 b' def clone(ui, source, dest=None, pull=Fa'
244 245
245 246 if update:
246 247 dest_repo.ui.status(_("updating working directory\n"))
247 if not checkout:
248 if update is not True:
249 checkout = update
250 elif not checkout:
248 251 try:
249 252 checkout = dest_repo.lookup("default")
250 253 except:
@@ -476,6 +476,9 b' class localrepository(repo.repository):'
476 476 def wjoin(self, f):
477 477 return os.path.join(self.root, f)
478 478
479 def rjoin(self, f):
480 return os.path.join(self.root, util.pconvert(f))
481
479 482 def file(self, f):
480 483 if f[0] == '/':
481 484 f = f[1:]
@@ -40,3 +40,9 b' class repository(object):'
40 40
41 41 def cancopy(self):
42 42 return self.local()
43
44 def rjoin(self, path):
45 url = self.url()
46 if url.endswith('/'):
47 return url + path
48 return url + '/' + path
General Comments 0
You need to be logged in to leave comments. Login now