git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean <seanlkml@sympatico.ca>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: fork0@t-online.de, git@vger.kernel.org
Subject: Re: [PATCH] A Perforce importer for git.
Date: Sun, 4 Jun 2006 10:04:30 -0400	[thread overview]
Message-ID: <BAYC1-PASMTP01323F67D0088CA96D86BEAE970@CEZ.ICE> (raw)
Message-ID: <20060604100430.cb2789dd.seanlkml@sympatico.ca> (raw)
In-Reply-To: <20060602212005.GA7801@steel.home>

On Fri, 2 Jun 2006 23:20:05 +0200
fork0@t-online.de (Alex Riesen) wrote:

> Well, I'm not quite sure it's at all possible... Perforce has a
> strange ways for doing history: it is kept for each file (as in CVS),
> but you can bundle changes in many files into one "change".
> Perforce also has no branches (in the GIT's meaning of the term).
> These by Perforce are just server-side directories, without any
> relevance to the source whatsoever (just copies).

Yes, each Perforce change records a new file revision level
for each of the files involved in the changeset.
 
> I'm rather looking for a ability to manage a single branch where
> import "sync" events appear as a merge of changes to the files
> involved in the sync. I just haven't figured out yet how to "break" a
> Perforce change into changes to single files and import that broken up
> commit into git as a merge.

Ahh, so what you're really asking is for a way to maintain the perforce
merge history within git.  Whereas the current p4import script just
shows a linear history without any merges.

The problem is that Perforce doesn't merge at the commit level.  It
allows changes from other branches to be pulled one file at a time and
from any rev level.

Now, even if you break those changes into one git commit per file per
revision level (yuck!), you still couldn't use them to record Perforce
merges.  Git would still merge the entire history of such commits from
the other branch whenever you tried to merge just one.

AFAICS, the best you could do would be to create cherry-picks, plucking
just the commits from the other branch you want.  However at that point
you're not getting a git merge anyway and it doesn't seem to be any
benefit beyond what the importer already does.  Well, the importer
_could_ make a comment in the commit message describing where each
file change originated (ie. from which branch/rev).  Would that help?

Sean

  reply	other threads:[~2006-06-04 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060524180438.1537641c.seanlkml@sympatico.ca>
2006-05-24 22:04 ` [PATCH] A Perforce importer for git Sean
2006-06-02 13:09   ` Alex Riesen
     [not found]     ` <20060602094357.ee3d8407.seanlkml@sympatico.ca>
2006-06-02 13:43       ` Sean
2006-06-02 21:20       ` Alex Riesen
     [not found]         ` <20060604100430.cb2789dd.seanlkml@sympatico.ca>
2006-06-04 14:04           ` Sean [this message]
2006-06-05 21:00           ` Alex Riesen

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=BAYC1-PASMTP01323F67D0088CA96D86BEAE970@CEZ.ICE \
    --to=seanlkml@sympatico.ca \
    --cc=fork0@t-online.de \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.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).