0
votes

To create a working version, I've reverted MAIN with a Changelist number, updated some directory to HEAD version, also added some new files and folders. All new files, folders have been committed to perforce. I want to create a snapshot of current workspace. Since current workspace contains many special changes, not sure how to create a branch of current working code without missing anything?

Current workspace structure:

~/workspace/some_are_old_changelist_xxx
~/workspace/some_are_head
~/workspace/some_are_new_added_files_folders

Depot structure:

//depot/MAIN/...

Want to branch current workspace to:

//depot/DEV/1.0/...

1

1 Answers

0
votes

To branch from the revision you currently have in your workspace use the #have revision specifier for the source revision range:

p4 integrate //depot/MAIN/...#have //depot/dev/fisher/special/...
p4 submit

Since you didn't give any details about your environment I'm assuming you're using a "classic" depot and have a default client view that maps the whole thing. The steps/syntax are slightly different if you have a streams depot or a focused client view (you'd need to create a new stream spec and/or update your client) but the semantics are basically the same -- the key thing is that you want to branch from #have rather than the default #head.