Mercurial > hg > hg-git
changeset 863:9036716a1271
Allow for dulwich to not return the magic "capabilities^{}" ref.
author | Jelmer Vernooij <jelmer@samba.org> |
---|---|
date | Mon, 23 Feb 2015 09:56:21 -0500 |
parents | f34e1dc7314c |
children | 9e0954d9abb3 |
files | hggit/git_handler.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -976,11 +976,12 @@ new_refs = refs.copy() #The remote repo is empty and the local one doesn't have bookmarks/tags - if refs.keys()[0] == 'capabilities^{}': + if refs == {} or refs.keys()[0] == 'capabilities^{}': if not exportable: tip = self.repo.lookup('tip') if tip != nullid: - del new_refs['capabilities^{}'] + if 'capabilities^{}' in new_refs: + del new_refs['capabilities^{}'] tip = hex(tip) try: commands.bookmark(self.ui, self.repo, 'master', rev=tip, force=True)