From: Alejandro R. SedeƱo Date: Fri, 19 Feb 2010 22:35:37 +0000 (-0500) Subject: If we find a rNNNM blob, update it X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e689023b16410f73ea60fb0829abda4a860fa317;hp=74829b63a8daab8d17009188fb5162994f913d1f;p=git-svn-keywords.git If we find a rNNNM blob, update it If it has been added to SVN, the cache should be updated to reflect that. --- diff --git a/git-svn-keywords.py b/git-svn-keywords.py index 6825f33..30c9cae 100755 --- a/git-svn-keywords.py +++ b/git-svn-keywords.py @@ -163,6 +163,15 @@ def get_path_info(g, path): write_config = True else: file_rev = CONFIG.get('CommitToRev', commit) + if file_rev[-1] is 'M': + # Rewrite old nnnnnnM commits if they're now available in SVN + commit = g.commits('HEAD', path, 1)[0].id + file_rev2 = g.git.svn('find-rev', commit) + if file_rev2: + CONFIG.set('BlobToCommit', blob, commit) + CONFIG.set('CommitToRev', commit, file_rev2) + write_config = True + file_rev = file_rev2 # get information about that revision info_dict = {}