git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luke Diamand <luke@diamand.org>
To: git@vger.kernel.org
Cc: marcus.holl@sap.com, Luke Diamand <luke@diamand.org>
Subject: [PATCHv1 0/3] git-p4: fixing import with labels when commit is not transferred
Date: Thu, 27 Aug 2015 08:18:55 +0100	[thread overview]
Message-ID: <1440659938-12952-1-git-send-email-luke@diamand.org> (raw)

Marcus Holl discovered that git-p4 fails to import labels sometimes.

http://permalink.gmane.org/gmane.comp.version-control.git/273034

It turns out there are at least two related problems.

The first is that if git-p4 tries to import a P4 tag which references
a commit that we don't know about at all (e.g. because the P4
changelist was created before the point at which the repo was
cloned) then when it tries to find the commit, the git rev-list
command fails, and git-p4 terminates.

This can be fixed by detecting the problem and ignoring that label.

The second problem is that git-p4 can end up trying to find out
about a commit which is still in the git fast-import stream and not
yet processed. This is fixed by using fast-import "marks" to reference
these commits, which avoids having to query for commits which don't
yet exist. The normal path is used for commits that have not been
imported during this run of the program (and so won't have marks).

A test case is added to demonstrate the problem.

Marcus - if you're able to take a look at this and see if it
fixes your problem that would be very useful.

Thanks,
Luke

Luke Diamand (3):
  git-p4: failing test for ignoring invalid p4 labels
  git-p4: do not terminate creating tag for unknown commit
  git-p4: fix P4 label import for unprocessed commits

 git-p4.py                      | 25 +++++++++++++++--------
 t/t9811-git-p4-label-import.sh | 45 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 8 deletions(-)

-- 
2.5.0.rc0

             reply	other threads:[~2015-08-27  7:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27  7:18 Luke Diamand [this message]
2015-08-27  7:18 ` [PATCHv1 1/3] git-p4: failing test for ignoring invalid p4 labels Luke Diamand
2015-08-27 12:53   ` Eric Sunshine
2015-08-27  7:18 ` [PATCHv1 2/3] git-p4: do not terminate creating tag for unknown commit Luke Diamand
2015-08-27  7:18 ` [PATCHv1 3/3] git-p4: fix P4 label import for unprocessed commits Luke Diamand
2015-09-14  6:45 ` [PATCHv1 0/3] git-p4: fixing import with labels when commit is not transferred Holl, Marcus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440659938-12952-1-git-send-email-luke@diamand.org \
    --to=luke@diamand.org \
    --cc=git@vger.kernel.org \
    --cc=marcus.holl@sap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).