summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a028a98)
raw | patch | inline | side by side (parent: a028a98)
author | Simon Hausmann <shausman@trolltech.com> | |
Tue, 22 May 2007 22:07:35 +0000 (00:07 +0200) | ||
committer | Simon Hausmann <shausman@trolltech.com> | |
Tue, 22 May 2007 22:07:35 +0000 (00:07 +0200) |
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
contrib/fast-import/git-p4 | patch | blob | history |
index 969c1fe45bba7aebe71084c68a62af7e7515a6cd..3d97ce1a247ad31df911975d59aed6add21091ec 100755 (executable)
optparse.make_option("--detect-labels", dest="detectLabels", action="store_true"),
optparse.make_option("--with-origin", dest="syncWithOrigin", action="store_true"),
optparse.make_option("--verbose", dest="verbose", action="store_true"),
- optparse.make_option("--import-local", dest="importIntoRemotes", action="store_false")
+ optparse.make_option("--import-local", dest="importIntoRemotes", action="store_false"),
+ optparse.make_option("--max-changes", dest="maxChanges")
]
self.description = """Imports from Perforce into a git repository.\n
example:
self.syncWithOrigin = False
self.verbose = False
self.importIntoRemotes = True
+ self.maxChanges = ""
def p4File(self, depotPath):
return os.popen("p4 print -q \"%s\"" % depotPath, "rb").read()
changes.reverse()
+ if len(self.maxChanges) > 0:
+ changes = changes[0:min(int(self.maxChanges), len(changes))]
+
if len(changes) == 0:
if not self.silent:
print "No changes to import!"