How can I instruct Perforce to merge changes into an existing, open, and modified file in the workspace when unshelving a file shelved in the depot? The only options that Perforce appears to offer the user is to overwrite or revert the existing file in the workspace, but this does not allow, for example, to unshelve and integrate changes to the same file from multiple change lists. Is there a way around this limitation?
相关问题
- TFS Power tools Migrate doesn't actually migra
- hg shelve installed but hg: unknown command 'u
- How to trigger a Jenkins build on a Perforce submi
- Perforce external diff in Eclipse?
- Customizing the output of Perforce RCS keyword exp
相关文章
- Perforce fast sync a directory to a clean state
- git-p4 submit fails with “Not a valid object name
- Unable to integrate fully from main branch to feat
- Find a string in Perforce file without syncing
- Value of using Git with ClearCase, AccuRev or Perf
- p4v does not show the complete list of checked out
- Integrating moved files in perforce
- How to fix Perforce error “Can't clobber writa
If you checkout your file, and then try to submit it, it will give you the option of getting the latest revision without replacing your copy. Then it will subsequently will give you the ability to run a merge tool, where you must resolve any conflicts before submitting.
What I typically do is right-click on the shelved file and select "Diff Against Workspace File". When you open up the Diff tool, you can select a button in the toolbar to "Edit file in right pane". This essentially starts a two-way merge. With each difference you can select the changes you want from the shelved file (differences are selected from the workspace file by default).
However, it would be nice if Perforce added a type of merge feature to do this more automatically.
Edit to add: Perforce now has a built-in capability to merge files when unshelving. If the user unshelves a file that is also checked out, and "Revert checked out files before unshelving" is unchecked, Perforce will mark that file for resolve. I looked through the release notes and was not able to find in which version this capability was added, but based on this link (see near bottom of
p4 unshelve
description), it was added no later than 2012.1.Edited again to add: That feature was added in release 2011.1 of the server. Here's the release note: