Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 6526:cfeeac24fc1e
repo: add rjoin method
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 11 Apr 2008 22:19:52 -0700 |
parents | a020247d75e5 |
children | 0642d9d7ec80 |
comparison
equal
deleted
inserted
replaced
6525:a020247d75e5 | 6526:cfeeac24fc1e |
---|---|
107 LAN, slow over WAN) | 107 LAN, slow over WAN) |
108 | 108 |
109 rev: revision to clone up to (implies pull=True) | 109 rev: revision to clone up to (implies pull=True) |
110 | 110 |
111 update: update working directory after clone completes, if | 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 if isinstance(source, str): | 116 if isinstance(source, str): |
116 origsource = ui.expandpath(source) | 117 origsource = ui.expandpath(source) |
117 source, rev, checkout = parseurl(origsource, rev) | 118 source, rev, checkout = parseurl(origsource, rev) |
242 fp.write("default = %s\n" % abspath) | 243 fp.write("default = %s\n" % abspath) |
243 fp.close() | 244 fp.close() |
244 | 245 |
245 if update: | 246 if update: |
246 dest_repo.ui.status(_("updating working directory\n")) | 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 try: | 251 try: |
249 checkout = dest_repo.lookup("default") | 252 checkout = dest_repo.lookup("default") |
250 except: | 253 except: |
251 checkout = dest_repo.changelog.tip() | 254 checkout = dest_repo.changelog.tip() |
252 _update(dest_repo, checkout) | 255 _update(dest_repo, checkout) |