diff --git a/scm.py b/scm.py index 209e064631..3febbe495d 100644 --- a/scm.py +++ b/scm.py @@ -172,7 +172,9 @@ class GIT(object): for ref in remotes: match = git_svn_re.search( GIT.Capture(['cat-file', '-p', ref], cwd)[0]) - if match: + if match and match.group(1) not in svn_refs: + # To prefer local refs over remote ones we only set the first occurence. + # The assumption being local refs are usually first. svn_refs[match.group(1)] = ref svn_branch = ''