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 12:05:38 +0200 [thread overview]
Message-ID: <BANLkTikMzxGDqX7FnNFx+fmFuXVi6NncJA@mail.gmail.com> (raw)
In-Reply-To: <1308216928289-6482333.post@n2.nabble.com>
On Thu, Jun 16, 2011 at 11:35 AM, tumik <tumik@tuomisalo.com> wrote:
> Yes, I tried the git-p4raw too. Actually even several forks of it! But I
> wasn't able to get any of those working, as none of them could load the
> perforce database correctly. Maybe the perforce database has changed lately
> or something, as git-p4raw gave errors that it's database tables don't have
> as much columns as perforce's does. Tried also to change the code to add
> those columns but there were so many of them and in many tables so I decided
> it's too hard and time-consuming to start reverse-engineering them..
>
> - tumik
I could maybe mention another approach: if your Perforce history isn't
too large so you can extract the info manually, or if you are able to
create a script to figure out your merges (changelist number, revision
of source and target branch in Perforce) it is easy to modify the git
history with this info afterwards.
You can add merge arrows to your git-p4 imported repository, either by
creating a .git/info/graft file and running git-filter-branch
afterwards (to make it permanent and distributable), or by using
git-replace. I may have a script somewhere that generates the graft
file from p4 changelist numbers and branch names, if you're
interested.
The graft + git-filter-branch is good for a one-time conversion, but
since it rewrites history it may not work well for branches that still
get updated in Perforce.
I have not tested git-replace myself, but it should be possible to use
this to add merge arrows too, without modifying the hashes of commits
later in the history. I'm not sure how well git-replace works with the
rest of git though.
Thomas
prev parent reply other threads:[~2011-06-16 10:05 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
2011-06-16 9:35 ` tumik
2011-06-16 10:05 ` Thomas Berg [this message]
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=BANLkTikMzxGDqX7FnNFx+fmFuXVi6NncJA@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 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).