Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/hg.py @ 4477:6cbfa740c129
clone: checkout the "default" branch if available
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 01 Jun 2007 18:52:18 -0500 |
parents | e6d26e71f049 |
children | b2b55acbacdd |
line wrap: on
line diff
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -218,7 +218,11 @@ def clone(ui, source, dest=None, pull=Fa dest_lock.release() if update: - _update(dest_repo, dest_repo.changelog.tip()) + try: + checkout = dest_repo.lookup("default") + except: + checkout = dest_repo.changelog.tip() + _update(dest_repo, checkout) if dir_cleanup: dir_cleanup.close()