equal
deleted
inserted
replaced
97 update: update working directory after clone completes, if |
97 update: update working directory after clone completes, if |
98 destination is local repository |
98 destination is local repository |
99 """ |
99 """ |
100 |
100 |
101 origsource = source |
101 origsource = source |
102 source, rev = cmdutil.parseurl(ui.expandpath(source), rev) |
102 source, rev, checkout = cmdutil.parseurl(ui.expandpath(source), rev) |
103 |
103 |
104 if isinstance(source, str): |
104 if isinstance(source, str): |
105 src_repo = repository(ui, source) |
105 src_repo = repository(ui, source) |
106 else: |
106 else: |
107 src_repo = source |
107 src_repo = source |
139 dir_cleanup = DirCleanup(dest) |
139 dir_cleanup = DirCleanup(dest) |
140 |
140 |
141 abspath = origsource |
141 abspath = origsource |
142 copy = False |
142 copy = False |
143 if src_repo.local() and islocal(dest): |
143 if src_repo.local() and islocal(dest): |
144 abspath = os.path.abspath(origsource) |
144 abspath = os.path.abspath(util.drop_scheme('file', origsource)) |
145 copy = not pull and not rev |
145 copy = not pull and not rev |
146 |
146 |
147 src_lock, dest_lock = None, None |
147 src_lock, dest_lock = None, None |
148 if copy: |
148 if copy: |
149 try: |
149 try: |
227 |
227 |
228 if dest_lock: |
228 if dest_lock: |
229 dest_lock.release() |
229 dest_lock.release() |
230 |
230 |
231 if update: |
231 if update: |
232 try: |
232 if not checkout: |
233 checkout = dest_repo.lookup("default") |
233 try: |
234 except: |
234 checkout = dest_repo.lookup("default") |
235 checkout = dest_repo.changelog.tip() |
235 except: |
|
236 checkout = dest_repo.changelog.tip() |
236 _update(dest_repo, checkout) |
237 _update(dest_repo, checkout) |
237 |
238 |
238 return src_repo, dest_repo |
239 return src_repo, dest_repo |
239 |
240 |
240 def _showstats(repo, stats): |
241 def _showstats(repo, stats): |