diff options
author | Luke Diamand <luke@diamand.org> | 2015-08-27 08:18:57 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-28 12:02:56 -0700 |
commit | 9ab1cfe505d43215a61dc5012632dde66fe109db (patch) | |
tree | 3bd374317697f540e4f719a536616e670ca535c2 /git-p4.py | |
parent | 62a3c4848ec4d51e3a9f1a6be6ad0ef75a7df67e (diff) | |
download | git-9ab1cfe505d43215a61dc5012632dde66fe109db.tar.gz |
git-p4: do not terminate creating tag for unknown commit
If p4 reports a tag for a commit that git-p4 does not know
about (e.g. because it references a P4 changelist that was
imported prior to the point at which the repo was cloned into
git), make sure that the error is correctly caught and handled.
rather than just crashing.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2494,9 +2494,9 @@ class P4Sync(Command, P4UserMap): # find the corresponding git commit; take the oldest commit changelist = int(change['change']) gitCommit = read_pipe(["git", "rev-list", "--max-count=1", - "--reverse", ":/\[git-p4:.*change = %d\]" % changelist]) + "--reverse", ":/\[git-p4:.*change = %d\]" % changelist], ignore_error=True) if len(gitCommit) == 0: - print "could not find git commit for changelist %d" % changelist + print "importing label %s: could not find git commit for changelist %d" % (name, changelist) else: gitCommit = gitCommit.strip() commitFound = True |