summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2008-10-24 09:17:25 -0700
committerShawn O. Pearce <sop@google.com>2008-10-24 09:17:25 -0700
commit329c31da7d03b5fd0d68f3ca39a7ff82c600d12b (patch)
treeca6a34b7ac71d5fdbf70aa4a7fdb34315f5a2751
parent5cc6679fb84ec887a09895c53a279df821faad49 (diff)
downloadgit-repo-329c31da7d03b5fd0d68f3ca39a7ff82c600d12b.tar.gz
Repair any mis-directed android-1.0 annotated tagsv1.0.6
The initial open source release of the Android 1.0 platform had some problems with its Perforce->Git imports. Google was forced to rewrite some history to redirect users onto more stable upstream sources and correct errors in the imports. Not everyone has the correct android-1.0 tags, as some users did manage to fetch the platform early, before the mirror sites crashed and the history was rewritten. This change is a band-aid to ensure any stale android-1.0 tags are get updated to the corrected version. It should be backed out at some point in the near future, when we can be fairly certain that everyone has the correct android-1.0 tags. Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--project.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/project.py b/project.py
index e88afcca..7a61b1c8 100644
--- a/project.py
+++ b/project.py
@@ -470,6 +470,7 @@ class Project(object):
470 return False 470 return False
471 if not self._RemoteFetch(): 471 if not self._RemoteFetch():
472 return False 472 return False
473 self._RepairAndroidImportErrors()
473 self._InitMRef() 474 self._InitMRef()
474 return True 475 return True
475 476
@@ -477,6 +478,30 @@ class Project(object):
477 for file in self.copyfiles: 478 for file in self.copyfiles:
478 file._Copy() 479 file._Copy()
479 480
481 def _RepairAndroidImportErrors(self):
482 if self.name in ['platform/external/iptables',
483 'platform/external/libpcap',
484 'platform/external/tcpdump',
485 'platform/external/webkit',
486 'platform/system/wlan/ti']:
487 # I hate myself for doing this...
488 #
489 # In the initial Android 1.0 release these projects were
490 # shipped, some users got them, and then the history had
491 # to be rewritten to correct problems with their imports.
492 # The 'android-1.0' tag may still be pointing at the old
493 # history, so we need to drop the tag and fetch it again.
494 #
495 try:
496 remote = self.GetRemote(self.remote.name)
497 relname = remote.ToLocal(R_HEADS + 'release-1.0')
498 tagname = R_TAGS + 'android-1.0'
499 if self._revlist(not_rev(relname), tagname):
500 cmd = ['fetch', remote.name, '+%s:%s' % (tagname, tagname)]
501 GitCommand(self, cmd, bare = True).Wait()
502 except GitError:
503 pass
504
480 def Sync_LocalHalf(self): 505 def Sync_LocalHalf(self):
481 """Perform only the local IO portion of the sync process. 506 """Perform only the local IO portion of the sync process.
482 Network access is not required. 507 Network access is not required.