# HG changeset patch # User Matt Mackall # Date 1180741938 18000 # Node ID 6cbfa740c1291eb69e842747a47cbcbae72ee12c # Parent 4ef8fdf57e394650e4f25375bcd6270ec70962f7 clone: checkout the "default" branch if available diff -r 4ef8fdf57e39 -r 6cbfa740c129 mercurial/hg.py --- a/mercurial/hg.py Sat Jun 02 09:21:56 2007 -0500 +++ b/mercurial/hg.py Fri Jun 01 18:52:18 2007 -0500 @@ -218,7 +218,11 @@ 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()