equal
deleted
inserted
replaced
135 if update: |
135 if update: |
136 r.ui.status(_("updating working directory\n")) |
136 r.ui.status(_("updating working directory\n")) |
137 if update is not True: |
137 if update is not True: |
138 checkout = update |
138 checkout = update |
139 for test in (checkout, 'default', 'tip'): |
139 for test in (checkout, 'default', 'tip'): |
|
140 if test is None: |
|
141 continue |
140 try: |
142 try: |
141 uprev = r.lookup(test) |
143 uprev = r.lookup(test) |
142 break |
144 break |
143 except LookupError: |
145 except error.RepoLookupError: |
144 continue |
146 continue |
145 _update(r, uprev) |
147 _update(r, uprev) |
146 |
148 |
147 def clone(ui, source, dest=None, pull=False, rev=None, update=True, |
149 def clone(ui, source, dest=None, pull=False, rev=None, update=True, |
148 stream=False): |
150 stream=False): |
307 if update: |
309 if update: |
308 dest_repo.ui.status(_("updating working directory\n")) |
310 dest_repo.ui.status(_("updating working directory\n")) |
309 if update is not True: |
311 if update is not True: |
310 checkout = update |
312 checkout = update |
311 for test in (checkout, 'default', 'tip'): |
313 for test in (checkout, 'default', 'tip'): |
|
314 if test is None: |
|
315 continue |
312 try: |
316 try: |
313 uprev = dest_repo.lookup(test) |
317 uprev = dest_repo.lookup(test) |
314 break |
318 break |
315 except: |
319 except error.RepoLookupError: |
316 continue |
320 continue |
317 _update(dest_repo, uprev) |
321 _update(dest_repo, uprev) |
318 |
322 |
319 return src_repo, dest_repo |
323 return src_repo, dest_repo |
320 finally: |
324 finally: |