Jump to content


Moving files from a stream depot to standard depot

move stream

  • Please log in to reply
3 replies to this topic

#1 Alejandro Garcia-Tunon

Alejandro Garcia-Tunon

    Member

  • Members
  • PipPip
  • 10 posts

Posted 10 July 2014 - 04:37 PM

I need to move some files from a stream depot to a regular depot.  I can't do this using a stream workspace, because the destination is not in the client view.  I also can't do this from a non-stream workspace that has both locations mapped, because of the error:  "warning: cannot submit from non-stream client".

What are my options here?

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 10 July 2014 - 08:32 PM

Typically, the user is not permitted to use a Streams client workspace with Classic depot, and is also not permitted to use a Classic client workspace with a Streams depot.

However, there is a workaround that allows the user to use the same client workspace to submit to either a Classic or a Streams depot. There are two basic scenarios. In either scenario, the process is fairly simple:
  • Switch the client workspace view (from a Streams depot to a Classic depot, or vice versa) without syncing
  • Submit the opened files
  • Switch back to the original client workspace view


Scenario 1


Your client workspace is mapped to //stream/a, and you have some opened files in //stream/b that you'd like to submit.

First, use the -f flag to switch your client workspace view to that of the Stream client workspace you'd like to use:

p4 client -f -s -S //stream/b


(Using the -f flag allows you to switch client workspace view even though you already have files open for edit)

Important Note: DO NOT SYNC!


Next, submit your file(s) while supplying the changelist description at the command line:

p4 submit -d "your changelist description text here" //stream/b/...



Finally, use the -f flag to switch your client workspace view back to how it was initially:

p4 client -f -s -S //stream/a/...


Scenario 2


Your client is mapped to //stream/a, and you have some opened files in //depot/classic/stuff that you'd like to submit.

First, prepare to edit your current client workspace specification:

$ p4 client


Next, edit your client spec and remove the 'Stream:' line. But don't edit the 'View' field.


Next, submit your file(s) while supplying the changelist description at the command line:

$p4 submit -d "your changelist description text here" //depot/classic/stuff/...



Finally, use the -f flag to switch your client workspace view back to how it was initially:

$p4 client -f -s -S //stream/a

If you want to migrate from classic to stream depot instead, then see the document here:
    http://answers.perfo...to-Stream-Depot

#3 Alejandro Garcia-Tunon

Alejandro Garcia-Tunon

    Member

  • Members
  • PipPip
  • 10 posts

Posted 11 July 2014 - 02:07 AM

None of these methods quite work for what I'm doing.  Method 2 was the closest, but I had to modify it a bit to fit what's going on.  Basically, I tried using this method with a standard workspace, and splitting the change into 2 checkins, but that didn't actually work.  I got the following error:

"needs fromfile //streamdepot/main/file.a"

Here's the full scenario.  I need to have both paths visible in my workspace view to do a move, so I started with a standard workspace, and mapped both the stream depot and the standard depot paths.  I perform the move, which leaves me with a changelist that has files in the stream depot checked out for delete, and files in the the standard depot checked out for add.  I tried just submitting the files in the standard depot with the intention of using the notes in scenario 2 to then submit the files in the stream depot, but i got the "fromfile" error above.

Any idea what could be done?

#4 chuckp

chuckp

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 03 February 2015 - 07:03 PM

Just to clarify, no special clients or options are required to use Streams and there is no problem moving files back and forth between a Streams view and a Classic view. All you have to do is set up two separate workspaces, one for Streams and one for Classic. Once you have those, you can switch workspaces at will in P4V. You can copy files from a Streams Windows directory to a Classic directory and vice versa, and then submit them in either workspace.

The only challenge may be to keep the two workspaces in sync. I avoid the problem by keeping the files I am developing in the Classic view completely separate from the files in the "official" Streams Main branch. In other words, I map the Classic workspace only to my Development files. I map my Streams workspace only to the Main branch. That way, the two are completely separate and do not share any files, so there is no syncing to be done. I work every day in my Classic Development workspace, checking out, saving, and submitting files there as needed. Then when it's time to copy a finished Development file to the "official" Main branch repository, I follow the procedure in the next paragraph.

To submit a file from Development to Main, I Check Out the file in the Streams Main workspace, copy the file from the Development Windows directory to the Main Windows directory, and Submit the file in the Main Streams workspace.

I am new at this, so there may be issues I'm not aware of, but I am writing this note to the forum because I had so much trouble finding a clear answer about how to move files from Streams to Classic and vice versa.





Also tagged with one or more of these keywords: move, stream

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users