Re: [PATCH v3 0/4] git-p4: Improve branch support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 19, 2011 at 12:53 PM, Pete Wyckoff <pw@xxxxxxxx> wrote:
> Patches 1 and 2 are great.  We should have gotten those in way
> back when you first submitted them.  I happily ack those.
>
> I'm still a bit hung up on #3, mainly because I don't get branch
> support.  Let me play around with your test.  Having this
> playbook of how it is supposed to work will help to educate me.

(I am probably going in too much detail here. Please skip any
redundant information.)

In general, you can see branches in P4 as you do in SVN. They are
simple copies from one directory to another. For example:

    p4 integrate //depot/big/directory/path/myproj/version_A \
                 //depot/big/directory/path/myproj/version_B

Now the history of "version_B" is tied to "version_A". If you want to
integrate (merge, in this case) new updates from one of the
directories to the other you can just rerun the above command
(version_A and version_B order may change depending on the direction
of the merge).

P4 also allows you to define "branch specs" that you can use as a
short hand instead of having to type in the full directory paths. So,
assuming that you have a branch named "myproj_B" with the following
view defined:

    //depot/big/directory/path/myproj/version_A \
        //depot/big/directory/path/myproj/version_B

When you want to integrate it again you can simply type:

    p4 integrate -b myproj_B

or, if you want to integrate from version_B into version_A instead:

    p4 integrate -b myproj_B -r

git-p4 is using these branch specs to identify branches. Without this
extra information it is nearly impossible for it to identify branches
because an integrate can be done of a single file.

But since P4 does not strictly require branch specs and because most
of the time integrations are done through P4V, then most of the time
no branch specs are created. Now, if this happens git-p4 will not be
able to detect branches! And creating branches in P4 just for git-p4
does not make much sense, right? This is the main reason behind the
third patch... :)

Sorry for the long email.

-- 
Vitor Antunes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]