Removed ancient and unused code to find the last imported revision from previous imports to use for the current import by looking at the p4 tags. The current approach of using the log message works better.
Removed ancient and unused code to find the last imported revision from previous imports to use for the current import by looking at the p4 tags. The current approach of using the log message works better. Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
May 17, 2007 at 20:15 UTC
1c9d393d30797decad703b642fa87b67a5236af4
1 file changed
-17
contrib/fast-import/git-p4
-17
@@ -895,23 +895,6 @@ class P4Sync(Command):
895
if self.detectLabels:
896
self.getLabels();
897
898
- if len(self.changeRange) == 0:
899
- try:
900
- sout, sin, serr = popen2.popen3("git name-rev --tags `git rev-parse %s`" % self.branch)
901
- output = sout.read()
902
- if output.endswith("\n"):
903
- output = output[:-1]
904
- tagIdx = output.index(" tags/p4/")
905
- caretIdx = output.find("^")
906
- endPos = len(output)
907
- if caretIdx != -1:
908
- endPos = caretIdx
909
- self.rev = int(output[tagIdx + 9 : endPos]) + 1
910
- self.changeRange = "@%s,#head" % self.rev
911
- self.initialParent = parseRevision(self.branch)
912
- except:
913
- pass
914
-
898
self.tz = "%+03d%02d" % (- time.timezone / 3600, ((- time.timezone % 3600) / 60))
899
900
importProcess = subprocess.Popen(["git", "fast-import"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE);