p4 resolved File status

29 Views Asked by At

As I understand, the files which have conflicts and are resolved manually , will be shown as "edit" when we invoke the p4 resolved command.

Format:- - -** edit **from

However, for the same DB, for my colleague, its being shown as "merge" for the same file.

Note: The Data base versions which we have taken are of the same version. No discrepancies there.

Can you please let me know on the possible reasons for the same ?

Tried checking online for possible reasons, but couldn't find an answer.

1

There are 1 best solutions below

3
Samwise On

p4 resolved shows information for files opened in the current workspace only (remember that any number of workspaces can have the same depot file open for different pending actions), so if you and your colleague have the same file opened in two different workspaces, it is likely to be in two different states, unless you did everything exactly the same. Changes are generally not synchronized between different workspaces until one of them submits their local file and the other syncs it.

edit from doesn't necessarily mean a manual resolve. A manual resolve might be also be recorded as copy, merge, or ignore if the result of the manual resolve is identical to the existing files matching those results (copy is the "theirs" file, ignore is "yours" i.e. the original workspace file, and merged is the auto-generated merge result).

Conversely, an automatic resolve can be "downgraded" to an edit in a variety of situations, such as:

  • an additional resolve was performed against the file, such that the new file content no longer reflects the earlier automatic resolve
  • the file's open action was changed (e.g. via p4 edit)

It is also possible to forcibly record a merge from for something that's actually an edit from at the time you resolve; I think you can only do this from the command line, and it looks like this:

c:\Perforce\test\merge\bar.txt - merging //stream/main/merge/foo.txt#4
Diff chunks: 0 yours + 0 theirs + 0 both + 1 conflicting
Accept(a) Edit(e) Diff(d) Merge (m) Skip(s) Help(?) e: e
Accept(a) Edit(e) Diff(d) Merge (m) Skip(s) Help(?) ae: am
Use 'ae' to indicate original edits: confirm accept merge (y/n)? y
//Samwise-dvcs-1509687817/merge/bar.txt - merge from //stream/main/merge/foo.txt

Note that the suggested option was ae (accept edit) but I overrode it with am; the CLI prompts to confirm that's what I wanted to do, but if I say yes, it'll go ahead and record it as a merge.

Separately from that, there are situations where different clients might show different output for the same resolve/integrate records, although I don't think that would be the case for merged vs edit -- you'd more typically see this in a case where a very old client renders a newer record type like moved from or undid as add or ignore for backward compatibility purposes.