- [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch))
- if len(self.previousDepotPath) > 0 and len(p4Change) > 0:
- p4Change = int(p4Change) + 1
+ if self.verbose:
+ print "branches: %s" % self.p4BranchesInGit
+
+ p4Change = 0
+ for branch in self.p4BranchesInGit:
+ depotPath, change = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit("refs/remotes/p4/" + branch))
+
+ if self.verbose:
+ print "path %s change %s" % (depotPath, change)
+
+ if len(depotPath) > 0 and len(change) > 0:
+ change = int(change) + 1
+ p4Change = max(p4Change, change)
+
+ if len(self.previousDepotPath) == 0:
+ self.previousDepotPath = depotPath
+ else:
+ i = 0
+ l = min(len(self.previousDepotPath), len(depotPath))
+ while i < l and self.previousDepotPath[i] == depotPath[i]:
+ i = i + 1
+ self.previousDepotPath = self.previousDepotPath[:i]
+
+ if p4Change > 0: