All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Berg <merlin66b@gmail.com>
To: tumik <tumik@tuomisalo.com>
Cc: git@vger.kernel.org
Subject: Re: [git-p4] Trouble importing all perforce branches into git repository
Date: Thu, 16 Jun 2011 10:51:59 +0200	[thread overview]
Message-ID: <BANLkTikTt4vMj+iZMhGEi6JefRUkZGZ8dg@mail.gmail.com> (raw)
In-Reply-To: <1308212906486-6482174.post@n2.nabble.com>

On Thu, Jun 16, 2011 at 10:28 AM, tumik <tumik@tuomisalo.com> wrote:
> Did you get it working so that the branch integrates at Perforce show up as
> merges in git? I have been trying to do this for tens of hours now and just
> can't get it working.. I have tried making the branch mapping both ways, and
> even both at the same time but with no success.
>
> I have succesfully imported the two testing branches to git, but if I look
> at it in gitk for example, the history is linear and there are no merges
> from the other branch (it shows up as a normal commit, without the parent
> from other branch, just adding all lines that the merging did). in p4v it
> shows up as it should!

git-p4 only uses the branch mapping for the initial commit on a
branch. It does not attempt to detect merges after that point. After
importing to git, merges just appear as regular commits in the
history.

Unfortunately, implementing a general solution for this is
non-trivial. Perforce branches and merges per file, meaning that
partial merges are possible in Perforce. Such states can not be
correctly represented in Git, and depending on your needs, you may or
may not want a particular partial merge to be considered as a git
merge.

There was another script called git-p4raw for importing Perforce
history to git, which does merge detection. It solved the problem by
having configurable rules for what should be regarded as a merge, and
it supported manually reviewing the decisions afterwards (iirc).

One possibly useful feature in git-p4 would be an option to regard
every integration as a complete merge, which shouldn't be too hard to
implement. But this would break every time someone did a single-file
integration between two branches (which happens quite often in my
experience, for cherry-picking changes etc.).

Thomas

  reply	other threads:[~2011-06-16  8:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 19:31 [git-p4] Trouble importing all perforce branches into git repository Grant Limberg
2011-05-22 11:49 ` Pete Wyckoff
2011-05-23  3:27   ` Grant Limberg
2011-05-23 10:54     ` Vitor Antunes
2011-05-23 16:18       ` Grant Limberg
2011-05-23 17:38         ` Vitor Antunes
2011-05-23 20:06           ` Grant Limberg
2011-06-16  8:28             ` tumik
2011-06-16  8:51               ` Thomas Berg [this message]
2011-06-16  9:35                 ` tumik
2011-06-16 10:05                   ` Thomas Berg

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=BANLkTikTt4vMj+iZMhGEi6JefRUkZGZ8dg@mail.gmail.com \
    --to=merlin66b@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tumik@tuomisalo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.