[p4] Getting source view and target view for resolve command

Jeff A. Bowles jab at pobox.com
Thu Apr 24 12:40:34 PDT 2008


I believe that you want to read up on the "resolved" and "integrated"
commands. One reports what has been resolved-not-submitted-yet and the other
is what-has-been-resolved-and-submitted.
For example...  Here is a "src.c" example that's branched to "dest.c".
You'll see that the FROM and TO (src/target, src/dest, etc) are in the
output of the commands.

The option "-Ztag" (as in, "p4 -Ztag integrated") is also helpful.

   -Jeff Bowles

ps. I think I would parse this stuff in something besides a .bat / .cmd
script....

Script started on Thu Apr 24 12:34:01 2008
% ls -l
total 8
-r--r--r--     1 jeff  wheel    69 Apr 24 12:33 src.c
% p4 files //...
//depot/examplefiles/src.c#2 - edit change 2 (ktext)
% p4 integ src.c#1 dest.c
//depot/examplefiles/dest.c#1 - branch/sync from
//depot/examplefiles/src.c#1
% p4 submit -d "example of simple branch." ...
Submitting change 3.
Locking 1 files ...
branch //depot/examplefiles/dest.c#1
Change 3 submitted.
//depot/examplefiles/dest.c#1 - refreshing
% p4 files ...
//depot/examplefiles/dest.c#1 - branch change 3 (ktext)
//depot/examplefiles/src.c#2 - edit change 2 (ktext)
% p4 integrated ...
//depot/examplefiles/dest.c#1 - branch from //depot/examplefiles/src.c#1
//depot/examplefiles/src.c#1 - branch into //depot/examplefiles/dest.c#1
% p4 integ src.c dest.c
//depot/examplefiles/dest.c#1 - integrate from //depot/examplefiles/src.c#2
% p4 resolve -n
/tmp/p4-area/dest.c - merging //depot/examplefiles/src.c#2
% p4 integrated
//depot/examplefiles/dest.c#1 - branch from //depot/examplefiles/src.c#1
//depot/examplefiles/src.c#1 - branch into //depot/examplefiles/dest.c#1
% p4 resolved
No file(s) resolved.
% p4 resolve -am
/tmp/p4-area/dest.c - merging //depot/examplefiles/src.c#2
Diff chunks: 0 yours + 2 theirs + 0 both + 0 conflicting
//jab-ws/dest.c - copy from //depot/examplefiles/src.c
% p4 resolve -n
No file(s) to resolve.
% p4 resolved
/tmp/p4-area/dest.c - copy from //depot/examplefiles/src.c#2
% p4 integrated
//depot/examplefiles/dest.c#1 - branch from //depot/examplefiles/src.c#1
//depot/examplefiles/src.c#1 - branch into //depot/examplefiles/dest.c#1
% p4 submit -d "including new work in main" ...
Submitting change 4.
Locking 1 files ...
integrate //depot/examplefiles/dest.c#2
Change 4 submitted.
//depot/examplefiles/dest.c#2 - refreshing
% p4 resolved
No file(s) resolved.
% p4 integrated
//depot/examplefiles/dest.c#1 - branch from //depot/examplefiles/src.c#1
//depot/examplefiles/dest.c#2 - copy from //depot/examplefiles/src.c#2
//depot/examplefiles/src.c#1 - branch into //depot/examplefiles/dest.c#1
//depot/examplefiles/src.c#2 - copy into //depot/examplefiles/dest.c#2
%
Script done on Thu Apr 24 12:35:17 2008


On Thu, Apr 24, 2008 at 6:05 AM, Santhosh Janardhanan <san_scm at live.com>
wrote:

> Hi,
>
> Scenario: I have two branches in my perforce repository viz. 'Mainstream'
> and 'Branch'. Development goes on in both branches. Now, I want to merge
> Branch to Mainstream and resolve. I have created a batch script to do this.
> The batch script will generate an html report which shows the list of files
> still with conflict.
>
> Problem: In the report, I am able to generate the target view of the
> conflict resolution. i.e., only //depot/Mainstream/test.txt is shown in the
> report. I want //depot/Branch/test.txt also. I am using p4 resolve -n
> command for getting the list of conflicted files.
>
> Has anyone come across such a scenario? Can anybody help me out?!!
>
> Thanks in advance...
>
>
> many regards,
> --
> Santhosh Janardhanan
> Ch, TN, IN.
>
> _________________________________________________________________
> Education: Are exams worrying you all the day long? Write to MSN education
> experts for help.
> http://education.in.msn.com/
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>



-- 
---
Jeff Bowles - jeff.a.bowles at gmail.com



More information about the perforce-user mailing list