Index: git_cl.py |
=================================================================== |
--- git_cl.py (revision 121504) |
+++ git_cl.py (working copy) |
@@ -146,7 +146,6 @@ |
self.tree_status_url = None |
self.viewvc_url = None |
self.updated = False |
- self.did_migrate_check = False |
self.is_gerrit = None |
def LazyUpdateIfNeeded(self): |
@@ -276,32 +275,6 @@ |
return RunGit(['config', param], **kwargs).strip() |
-def CheckForMigration(): |
- """Migrate from the old issue format, if found. |
- |
- We used to store the branch<->issue mapping in a file in .git, but it's |
- better to store it in the .git/config, since deleting a branch deletes that |
- branch's entry there. |
- """ |
- |
- # Don't run more than once. |
- if settings.did_migrate_check: |
- return |
- |
- gitdir = RunGit(['rev-parse', '--git-dir']).strip() |
- storepath = os.path.join(gitdir, 'cl-mapping') |
- if os.path.exists(storepath): |
- print "old-style git-cl mapping file (%s) found; migrating." % storepath |
- store = open(storepath, 'r') |
- for line in store: |
- branch, issue = line.strip().split() |
- RunGit(['config', 'branch.%s.rietveldissue' % ShortBranchName(branch), |
- issue]) |
- store.close() |
- os.remove(storepath) |
- settings.did_migrate_check = True |
- |
- |
def ShortBranchName(branch): |
"""Convert a name like 'refs/heads/foo' to just 'foo'.""" |
return branch.replace('refs/heads/', '') |
@@ -421,7 +394,6 @@ |
def GetIssue(self): |
if not self.has_issue: |
- CheckForMigration() |
issue = RunGit(['config', self._IssueSetting()], error_ok=True).strip() |
if issue: |
self.issue = issue |