[p4] diff2 + added files?
Looney, James B
james.b.looney at lmco.com
Tue Dec 4 11:39:40 PST 2007
I should've read your first post more carefully.
In that case, I don't know of a way to do that without scripting it
and adding in the additional content yourself depending on whether
the file's been added/deleted.
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Sohail Somani
> Sent: Tuesday, December 04, 2007 10:01 AM
> To: perforce-user at perforce.com
> Subject: Re: [p4] diff2 + added files?
>
> On Tue, 04 Dec 2007 09:01:18 -0700, Looney, James B wrote:
>
> > I usually do that using labels. I'll create a label in one
> workspace
> > (usually our mainline) and the second in a branch. Then
> use p4 diff2 -q
> > //... at mainline_label //... at branch_label
> >
> > If you're scripting it, I'd recommend adding the -G
> (marshaling) as it
> > makes the file organizing a LOT easier since it'll tell you
> which files
> > were added/deleted/modified without you having to parse each line
> > yourself. The -q just suppresses the actual diff output
> and the header
> > info for identical files.
>
> Thanks for your reply.
>
> Unfortunately, I don't think I was clear enough! What I want to do is
> take a diff of the two branches for the purposes of code review. So I
> want all the added and removed content, including *added* and
> *deleted*
> files. So say hello.txt was added with text "Hello, World",
> I'd want to
> see:
>
> ==== <none> - //.../hello.txt
> + Hello, World
>
> Similarly, if the file was deleted, I'd want to see:
>
> ==== //.../hello.txt - <none>
> - Hello, World
>
> For all the text files. Right now, I can only see:
>
> ==== <none> - //.../hello.txt
> ==== //.../hello.txt - <none>
>
> i.e., no content.
>
> --
> Sohail Somani
> http://uint32t.blogspot.com
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
More information about the perforce-user
mailing list