1

I'm using perforce for versioning control. Let's say I am working on a file in the main branch:
//main/xx.cs (it's open for edit)

In the mean time, //main gets branched to //v1 and then //main gets locked. Is there a way I can integrate my local changes in //main/xx.cs directly to //v1/xx.cs ?

Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233

2 Answers2

1

There's a similar question: Can I integrate checked out files into a different branch on perforce

One of the answers there gives:
http://kb.perforce.com/UserTasks/CodelinesAndBranching/BranchingWorkInProgress which looks like it will provide more than you need.

There is also various p4shelve, p4tar options that might help:

  1. P4 Shelve Python addition for any version of Perforce
  2. P4tar offline (or at least off-server) saving of changes
  3. p4 shelve 2009.2 and later Perforce feature to provide built-in shelving.
Community
  • 1
  • 1
Douglas Leeder
  • 52,368
  • 9
  • 94
  • 137
0

Here's one possibility...

  • Sync //main to the changelist where the branch was made. Resolve conflicts.
  • Important! Sync //v1 to the same changelist.
  • Open //v1/xx.cs for edit.
  • The ugly part: manually copy the local copy of //main/xx.cs over the local copy of //v1/xx.cs
  • Sync //v1 to head and resolve conflicts.
  • Submit changes.

Voila!

Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233