Mercurial > hgsubversion
comparison wrappers.py @ 278:60acc38eac96
clone: prefer tip of default to overall tip when updating
author | Martijn Pieters <mj@zopatista.com> |
---|---|
date | Fri, 24 Apr 2009 20:36:38 -0500 |
parents | b45bae16be32 |
children | 521d9c1bb11d |
comparison
equal
deleted
inserted
replaced
277:3848a7f9b983 | 278:60acc38eac96 |
---|---|
214 fp.write("[paths]\n") | 214 fp.write("[paths]\n") |
215 # percent needs to be escaped for ConfigParser | 215 # percent needs to be escaped for ConfigParser |
216 fp.write("default = %(url)s\nsvn = %(url)s\n" % {'url': svnurl}) | 216 fp.write("default = %(url)s\nsvn = %(url)s\n" % {'url': svnurl}) |
217 fp.close() | 217 fp.close() |
218 if (res is None or res == 0) and not opts.get('noupdate', False): | 218 if (res is None or res == 0) and not opts.get('noupdate', False): |
219 commands.update(ui, repo, repo['tip'].node()) | 219 for test in ('default', 'tip'): |
220 try: | |
221 uprev = repo.lookup(test) | |
222 break | |
223 except: | |
224 continue | |
225 commands.update(ui, repo, uprev) | |
220 | 226 |
221 return res | 227 return res |
222 | 228 |
223 | 229 |
224 def pull(orig, ui, repo, source="default", *args, **opts): | 230 def pull(orig, ui, repo, source="default", *args, **opts): |