All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: Vitor Antunes <vitor.hda@gmail.com>
Cc: git@vger.kernel.org, Tor Arvid Lund <torarvid@gmail.com>
Subject: Re: [PATCH/RFC 2/2] git-p4: Add complex test case for branch import
Date: Tue, 23 Aug 2011 19:10:34 -0400	[thread overview]
Message-ID: <20110823231034.GA11918@arf.padd.com> (raw)
In-Reply-To: <CAOpHH-V92CcWm1tCwvb=pJux5PKbYQoG=E8M_Pc2JGu00wnR8Q@mail.gmail.com>

vitor.hda@gmail.com wrote on Tue, 23 Aug 2011 23:02 +0100:
> On Tue, Aug 23, 2011 at 3:27 AM, Pete Wyckoff <pw@padd.com> wrote:
> > I think I understand the problem now, and have a small test case
> > to see what's going wrong.  Your solution is definitely
> > sub-optimal.  :)  Is there anything that can be done with
> > --import-marks and --export-marks?
> 
> Don't know if you agree, but I think it would be better to keep git-p4
> from storing extra files in the filesystem. And, as far as I understood,
> these two options require extra files.
> But I don't think marks would help us that much. We already have
> something similar: the changelist number in the commit log. The big
> problem is that P4 does not store a pointer to the previous changelist.

Agreed.

> > Could you guess at the branch point using p4?  I.e. for each file
> > in the new branch, grab the change that caused its most recent
> > revision (the #xx part).  Pick the max of those changes.  In git,
> > find the commit whith "change = ..." that you just discovered.
> > That's the parent.
> 
> Yes, I think this would work. Nevertheless, I would prefer not to do so
> much pooling on the P4 server because when we're in a remote location in
> regards to the P4 proxy server this kind of command becomes rather slow.
> And if the branch has many files this may become cumbersome.
> 
> > Even this won't be perfect, and I'm not even sure if it's less
> > icky than diff-tree.
> 
> From what I can see, the two possible solutions would be:
> 
> a) Running a "filelog" on all files. This may become slower when the
>    branch has lots of files. There's also the problem in needing to
>    contact the P4 proxy server every time.
> 
> b) Using diff-tree. This will be slower if the original changelist is
>    very far from the latest one, but has the advantage of being run
>    locally. It has the disadvantage of not having an apparent
>    compatibility with fast-import.
> 
> In my personal point of view, diff-tree solution still looks better, if
> it weren't for the fast-import issue. Now if we could just figure out
> how to overcome this issue...

Nice analysis.  P4 can indeed be the bottleneck, even on near
servers if there are lots of files.  Diff-tree seems like the
better choice to find the branch point.  I don't understand fully
why the way we are using fast-import causes these problems.  Will
look at that next.

		-- Pete

  reply	other threads:[~2011-08-23 23:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  0:09 [PATCH/RFC 0/2] Search for parent commit in new branch import Vitor Antunes
2011-08-19  0:09 ` [PATCH/RFC 1/2] git-p4: Search for parent commit on branch creation Vitor Antunes
2011-08-19  0:09 ` [PATCH/RFC 2/2] git-p4: Add complex test case for branch import Vitor Antunes
2011-08-20 19:12   ` Pete Wyckoff
2011-08-22  0:13     ` Vitor Antunes
2011-08-23  2:27       ` Pete Wyckoff
2011-08-23 22:02         ` Vitor Antunes
2011-08-23 23:10           ` Pete Wyckoff [this message]
2011-08-24 10:46             ` Vitor Antunes
2011-08-24 21:23               ` Vitor Antunes
2011-08-27 23:32                 ` Pete Wyckoff

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=20110823231034.GA11918@arf.padd.com \
    --to=pw@padd.com \
    --cc=git@vger.kernel.org \
    --cc=torarvid@gmail.com \
    --cc=vitor.hda@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 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.