Mercurial > hg-git
comparison hggit/git_handler.py @ 863:9e0954d9abb3
git_handler: slight style cleanup for previous patch
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 23 Feb 2015 09:58:01 -0500 |
parents | 9036716a1271 |
children | 4d246150d850 |
comparison
equal
deleted
inserted
replaced
862:9036716a1271 | 863:9e0954d9abb3 |
---|---|
974 | 974 |
975 def get_changed_refs(self, refs, exportable, force): | 975 def get_changed_refs(self, refs, exportable, force): |
976 new_refs = refs.copy() | 976 new_refs = refs.copy() |
977 | 977 |
978 #The remote repo is empty and the local one doesn't have bookmarks/tags | 978 #The remote repo is empty and the local one doesn't have bookmarks/tags |
979 if refs == {} or refs.keys()[0] == 'capabilities^{}': | 979 # |
980 # (older dulwich versions return the proto-level | |
981 # capabilities^{} key when the dict should have been | |
982 # empty. That check can probably be removed at some point in | |
983 # the future.) | |
984 if not refs or refs.keys()[0] == 'capabilities^{}': | |
980 if not exportable: | 985 if not exportable: |
981 tip = self.repo.lookup('tip') | 986 tip = self.repo.lookup('tip') |
982 if tip != nullid: | 987 if tip != nullid: |
983 if 'capabilities^{}' in new_refs: | 988 if 'capabilities^{}' in new_refs: |
984 del new_refs['capabilities^{}'] | 989 del new_refs['capabilities^{}'] |