@matheusbsbs / matheus-bagliano / commits / 2835925139
Fork 0

Cleanup, removed the old tagging code

Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed May 1, 2007 at 23:26 UTC 28359251395c1647bf40adcdabbe4d85d7b085af
1 file changed -16
contrib/fast-import/git-p4
-16
@@ -455,7 +455,6 @@ class P4Sync(Command):
455 self.detectBranches = False
456 self.detectLabels = False
457 self.changesFile = ""
458 - self.tagLastChange = True
458
459 def p4File(self, depotPath):
460 return os.popen("p4 print -q \"%s\"" % depotPath, "rb").read()
@@ -858,15 +857,11 @@ class P4Sync(Command):
857 self.depotPath = self.previousDepotPath
858 self.changeRange = "@%s,#head" % p4Change
859 self.initialParent = self.branch
861 - self.tagLastChange = False
860 if not self.silent:
861 print "Performing incremental import into %s git branch" % self.branch
862
863 self.branch = "refs/heads/" + self.branch
864
867 - if len(self.depotPath) == 0:
868 - self.depotPath = self.previousDepotPath = os.popen("git repo-config --get p4.depotpath").read()
869 -
865 if len(self.depotPath) != 0:
866 self.depotPath = self.depotPath[:-1]
867
@@ -884,7 +879,6 @@ class P4Sync(Command):
879 self.revision = ""
880 self.users = {}
881 self.lastChange = 0
887 - self.initialTag = ""
882
883 if self.depotPath.find("@") != -1:
884 atIdx = self.depotPath.index("@")
@@ -927,7 +921,6 @@ class P4Sync(Command):
921 self.rev = int(output[tagIdx + 9 : endPos]) + 1
922 self.changeRange = "@%s,#head" % self.rev
923 self.initialParent = os.popen("git rev-parse %s" % self.branch).read()[:-1]
930 - self.initialTag = "p4/%s" % (int(self.rev) - 1)
924 except:
925 pass
926
@@ -1049,20 +1042,12 @@ class P4Sync(Command):
1042 if not self.silent:
1043 print ""
1044
1052 - if self.tagLastChange:
1053 - self.gitStream.write("reset refs/tags/p4/%s\n" % self.lastChange)
1054 - self.gitStream.write("from %s\n\n" % self.branch);
1055 -
1045
1046 self.gitStream.close()
1047 self.gitOutput.close()
1048 self.gitError.close()
1049 importProcess.wait()
1050
1062 - os.popen("git repo-config p4.depotpath %s" % self.depotPath).read()
1063 - if len(self.initialTag) > 0:
1064 - os.popen("git tag -d %s" % self.initialTag).read()
1065 -
1051 return True
1052
1053 class P4Rebase(Command):
@@ -1086,7 +1071,6 @@ class P4Clone(P4Sync):
1071 self.description = "Creates a new git repository and imports from Perforce into it"
1072 self.usage = "usage: %prog [options] //depot/path[@revRange] [directory]"
1073 self.needsGit = False
1089 - self.tagLastChange = False
1074
1075 def run(self, args):
1076 if len(args) < 1: