I think you are talking about file resolution in a three-way diff tool. Different versions:
Now this will require a little tweaking on Linux. I have a .p4config file that defines my preferred diff tool.
P4CLIENT=mywork P4DIFF=diff -u P4EDITOR=vi P4IGNORE=.p4ignore
Here P4DIFF set to diff -u . For all this to work, the .p4config file must be connected to perforce using an environment variable.
export P4CONFIG=.p4config
Now this is a sweet spot. We really need to run the p4 resolve command.
p4 resolve /path/to/mysource.h
As soon as we do this, it shows that there is a conflict, because someone modified the original version that we worked on. Therefore, it prompts us to action.
/path/to/mysource.h - merging //stream/version/path/to/mysource.h
We can see diff by pressing d .
--- /path/to/mysource.h 2016-09-28 18:34:54.918709150 -0400 +++ /path/to/tmp.6365.102 2016-09-29 11:05:32.228946564 -0400 @@ -16,6 +16,7 @@ we are same in all branches same as everywhere + added line more same @@ -28,7 +29,12 @@ here you go the conflict +>>>> ORIGINAL //stream/version/path/to/mysource.h#1 + the original line is here +==== THEIRS //stream/version/path/to/mysource.h#2 + their line is here +==== YOURS /path/to/mysource.h my line is here +<<<< Accept(a) Edit(e) Diff(d) Merge (m) Skip(s) Help(?) e: e
Now you can correct this entry e . He will open an editor where we can compare different versions between the lines +==== and +<<<< .
Once we finish editing, we can accept by typing a .
Accept(a) Edit(e) Diff(d) Merge (m) Skip(s) Help(?) ae: a
The whole process can be performed from the remote command / shell window. Thus, an X server is not needed.