P4Web Release 2005.1 User Guide
[Getting Started] [How To...] [Browser Tips] [Glossary] [Road Map]
Resolving Files
The resolve command is used tell Perforce how to combine changes
between files, and to merge file content, if desired.
You can run resolve on open files only, and only if they need
resolving.
P4Web uses the
"" icon
to show you which of your open files need to be resolved.
There are two situations that require files to be resolved:
-
You have files open for edit
and there are newer versions of the files in the depot.
As soon as you re-sync the files, or attempt
to submit them, they will
need to be resolved to account for the changes made in the
new file versions.
-
You have files open for integrate.
These files will need resolving as soon as they
are opened to account for the changes made in the files
you are integrating from.
You can run resolve by:
-
Selecting a directory in the Files tab and then selecting Resolve... from the pulldown menu.
This operates on all unresolved files under that directory. It takes you to the "Resolve" options page.
-
Selecting a file in the Files tab and then selecting Resolve... from the pulldown menu.
This operates only on that file.
It takes you to the "Resolve" options page.
The Resolve options page
Selecting Resolve... from the pulldown menu
takes you to the Resolve options page where
you can select resolve options,
preview the resolve command you
are about to run, and run the command.
(Previewing the command shows you which files will be affected,
but doesn't tell you what the outcome will be.)
For the purpose of files handled by the resolve command:
- theirs is the file the changes are coming from.
For a file opened for integrate,
theirs is the file being integrated from.
For a file opened for edit,
theirs is the newer version of the file in the depot.
- yours is the file the changes are going into.
This is the file opened in your workspace, which you will
submit to the depot after resolving.
The Resolve options page lets you choose
how the resolve will be done.
Your choices are:
- Interactively - launches a resolve program in a separate
window. If you have specified a resolve program to use with Perforce, P4Web launches that. If not, the default Perforce resolve program launches and cycles through
all the unresolved files, letting you choose how to handle each one
individually.
Use the "help" command to find
out more, or see
Resolving Files in
Getting Started with Perforce and P4Web.
- Automatically - this is useful to resolve all your unresolved files
in one non-interactive batch. You can choose from these
automatic resolve options:
- Accept safe (unilateral) changes.
Resolves files if only one leg of each file, yours or theirs,
has changed.
This works with both binary and text files.
For each unresolved file:
- If yours has changed and theirs has not changed, or if neither yours
nor theirs has changed, the resolve
is handled by "ignoring" theirs. The content of your workspace file is not
modified, and the file no longer needs resolving.
- If theirs has changed and yours has not changed, the resolve
is handled by copying theirs into into yours. Your workspace file is now
identical to theirs, and the file no longer needs resolving.
(This is considered safe because you can always restore your original
workspace file by reverting it.)
- If both theirs and yours have changed, the resolve is skipped for
this file.
Your workspace file is not modified, and the file still needs resolving.
You can then run resolve with either the "interactive" option
or the "accept only non-conflicting merges" option
to get the skipped file resolved.
- Accept only non-conflicting merges.
Works with text files only.
It resolves each file exactly as above, except that in the third case
where both yours and theirs have changed, the file is resolved
if the changes do not conflict:
-
Their file content is combined with your file content to produce
a merged file.
If none of their changes occur in the same place as yours, or if
changes that do occur in the same place are exactly the same,
the merged file is copied into your workspace file,
and the file no longer needs resolving.
-
If their file was changed in any of the same places as yours,
but those changes are not identical to yours, the resolve is skipped
for this file.
Your workspace file is not modified, and the file still needs resolving.
You should then run resolve with the "interactive" option
to get the skipped file resolved.
- Accept all merges.
Works with text files only.
This resolves each file exactly as above, except
that the merged file is copied into your workspace file
even if there were conflicting changes.
Resolves are never skipped using this option,
but the resulting workspace files may contain conflict markers.
This option is not recommended unless you have some reliable
way of checking to make sure you've edited out the conflict markers
later. A better choice is to use the "interactive" option so that
the merged file is only copied to your workspace
after you've edited out the conflicts.
- Accept yours (ignore theirs).
This option resolves files without changing the content of your
opened files.
Use this when their files contain changes that should be ignored,
or were made in error.
Resolves are never skipped using this option.
- Accept theirs (ignore yours).
This option resolves files by copying the content of their files into
your opened workspace files.
Any previous edits you may have done to opened files will be lost when
you choose this option!
Resolves are never skipped using this option.
- Force re-resolve of previously resolved files.
Normally if you try to run resolve on files that have already
been resolved, nothing happens. Use this option to force resolve
to treat files as if they had not previously been resolved.
(This option does not restore the contents of your workspace
files to their "pre-resolved" state before doing the re-resolve.)
- Mark non-conflicting changes in merged result.
This causes merged or copied files to contain markers for non-conflicting
changes as well as conflicting changes. You can search for and remove
these markers in the editor, either while doing an "interactive"
resolve or after automatically resolving files. In either case,
it is up to you to remember to remove the markers after the files are
resolved.
Restricting files
If you came to the "Resolve" options page by selecting a directory first,
you can restrict the files to be resolved.
Regardless of which files you select, files will only resolved if
they are already opened in your workspace and need resolving.
Copyright 2005 Perforce Software.
All rights reserved.