summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a2edf4)
raw | patch | inline | side by side (parent: 1a2edf4)
author | Simon Hausmann <simon@lst.de> | |
Wed, 20 Jun 2007 21:10:28 +0000 (23:10 +0200) | ||
committer | Simon Hausmann <simon@lst.de> | |
Wed, 20 Jun 2007 21:13:20 +0000 (23:13 +0200) |
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index 2040591383e93db3544b50a118f8151062591d3d..16de15c4ea1f36a90e37c049eef0ee978b7a7824 100755 (executable)
return True
+class P4Branches(Command):
+ def __init__(self):
+ Command.__init__(self)
+ self.options = [ ]
+ self.description = ("Shows the git branches that hold imports and their "
+ + "corresponding perforce depot paths")
+ self.verbose = False
+
+ def run(self, args):
+ cmdline = "git rev-parse --symbolic "
+ cmdline += " --remotes"
+
+ for line in read_pipe_lines(cmdline):
+ line = line.strip()
+
+ if not line.startswith('p4/') or line == "p4/HEAD":
+ continue
+ branch = line
+
+ log = extractLogMessageFromGitCommit("refs/remotes/%s" % branch)
+ settings = extractSettingsGitLog(log)
+
+ print "%s <= %s (%s)" % (branch, ",".join(settings["depot-paths"]), settings["change"])
+ return True
+
class HelpFormatter(optparse.IndentedHelpFormatter):
def __init__(self):
optparse.IndentedHelpFormatter.__init__(self)
"sync" : P4Sync,
"rebase" : P4Rebase,
"clone" : P4Clone,
- "rollback" : P4RollBack
+ "rollback" : P4RollBack,
+ "branches" : P4Branches
}