summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b139a6)
raw | patch | inline | side by side (parent: 5b139a6)
author | Sean <seanlkml@sympatico.ca> | |
Thu, 15 Jun 2006 21:26:21 +0000 (17:26 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 17 Jun 2006 05:33:46 +0000 (22:33 -0700) |
P4import currently creates a git tag for every commit it imports.
When importing from a large repository too many tags can be created
for git to manage, so this provides an option to shut that feature
off if necessary.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
When importing from a large repository too many tags can be created
for git to manage, so this provides an option to shut that feature
off if necessary.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Documentation/git-p4import.txt | patch | blob | history | |
git-p4import.py | patch | blob | history |
index c198ff2502d95be4dc1baadd6479b687acb0caa1..0858e5efbe01a8e47ddcfa9b1c7e1c6169f9b7e1 100644 (file)
SYNOPSIS
--------
-`git-p4import` [-q|-v] [--authors <file>] [-t <timezone>] <//p4repo/path> <branch>
+`git-p4import` [-q|-v] [--notags] [--authors <file>] [-t <timezone>] <//p4repo/path> <branch>
`git-p4import` --stitch <//p4repo/path>
Specify an authors file containing a mapping of Perforce user
ids to full names and email addresses (see Notes below).
+\--notags::
+ Do not create a tag for each imported commit.
+
\--stitch::
Import the contents of the given perforce branch into the
currently checked out git branch.
diff --git a/git-p4import.py b/git-p4import.py
index 74172ab4500dced73bd678ebb2ee9cc910bcb8ba..908941dd77007e71f5aa036bb190a14d628050c8 100644 (file)
--- a/git-p4import.py
+++ b/git-p4import.py
if s != default_int_handler:
signal(SIGINT, s)
-
def die(msg, *args):
for a in args:
msg = "%s %s" % (msg, a)
logfile = "/dev/null"
ignore_warnings = False
stitch = 0
+tagall = True
def report(level, msg, *args):
global verbosity
self.make_tag("p4/%s"%id, commit)
self.git("update-ref HEAD %s %s" % (commit, current) )
-
try:
opts, args = getopt.getopt(sys.argv[1:], "qhvt:",
- ["authors=","help","stitch=","timezone=","log=","ignore"])
+ ["authors=","help","stitch=","timezone=","log=","ignore","notags"])
except getopt.GetoptError:
usage()
verbosity += 1
if o in ("--log"):
logfile = a
+ if o in ("--notags"):
+ tagall = False
if o in ("-h", "--help"):
usage()
if o in ("--ignore"):
report(1, "Importing changeset", id)
change = p4.describe(id)
p4.sync(id)
- git.commit(change.author, change.email, change.date, change.msg, id)
+ if tagall :
+ git.commit(change.author, change.email, change.date, change.msg, id)
+ else:
+ git.commit(change.author, change.email, change.date, change.msg, "import")
if stitch == 1:
git.clean_directories()
stitch = 0