# HG changeset patch # User Mateusz Kwapich # Date 1508855795 25200 # Node ID f73cc01a8167b70b2c3ac650f76d1f9c75537c89 # Parent fc91ba4ffa524506d2431daf38bfb84ececc612d util: don't assume that converted rev is an svn rev Summary: In repos where converted revisions come from different sources it's not nice of hgsubversion to assume that all converted rev are coming from SVN. Test Plan: Ran all current tests, nothing is broken. Not sure how to test new behaviour withour much overhead. I suppose I could write something that overrides commit extras diff --git a/hgsubversion/util.py b/hgsubversion/util.py --- a/hgsubversion/util.py +++ b/hgsubversion/util.py @@ -336,7 +336,11 @@ def issamefile(parentctx, childctx, f): def getsvnrev(ctx, defval=None): '''Extract SVN revision from commit metadata''' - return ctx.extra().get('convert_revision', defval) + convertrev = ctx.extra().get('convert_revision', '') + # if the rev doesn't start with svn prefix it came from different source + if convertrev.startswith('svn:'): + return convertrev + return defval def revset_fromsvn(repo, subset, x): '''``fromsvn()``