Jump to content


Switching streams in "use one workspace" mode isn't removing prev. stream files

streams switching single-workspace

  • Please log in to reply
9 replies to this topic

#1 Max Pavlov

Max Pavlov

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 12 June 2015 - 06:59 AM

Hello.

I got confused and started to use one-stream-one-workspace approach now, but since I what to know stuff that gets me confused I am asking this =)

I have a stream workspace on a windows machine. Via P4V interface I have a settings to reuse current workspace in preferences.

I checkout a dev stream of Project1 - a web application. Work in it.

Then I was to work on a desktop application project - Project2. I have a stream workspace on my machine, so I switch to the dev stream of Project2 with a single context menu click. P4V log even says that Project1 file count is removed and Project2 file count is added.

But when I look into the file system, I see that the new stream's (Project2) files are indeed added to the stream workspace's folder, but the Project1 files are not deleted.

Is this an intended behaviour? Why?

Thanks!

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 26 June 2015 - 12:39 AM

Hello Max,

Sorry for the confusion. To better trouble-shoot this issue, please let us know the following:

A] Which version of P4V and the server are you using?

   Go to menu Help -> System Info and copy and paste the details for:

   - Server version
   - P4V version

B] What are your settings for the following in P4V under the menu Edit -> Preferences -> Streams:

-- When performing stream operations:
- When branching streams, include file deletion actions
- Don't allow streams to be reparented with drag and drop in the stream graph
- Do not warn when checking out, adding or deleting imported files always ??

-- Stream workspaces:
- When clicking 'Work in this Stream'
- When dragging workspace icon to a new stream
- Don't warn me when switching workspaces
- Automatically update the workspace with all stream files when switching between streams

C] Do you have any overlapping or similar files in both Project1 and Project2?

D] Is Project2 a virtual stream related to the Project1 stream? Can you please send the config output for each stream?

   p4 stream -o //Project1/

   p4 stream -o //Project2/

E] After you changed to the Project2 stream with the workspace, did you sync to obtain any files that differ?

REFERENCES

- Using one workspace for multiple streams
http://www.perforce....spaces.multiple

- Workspace Configuration and Streams
Option 1: Define a single workspace, and switch it between streams

http://answers.perfo...rticles/KB/3521

#3 sharkattack

sharkattack

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 14 September 2015 - 09:24 PM

Hi, I heard this issue might have been resolved in the 2015.1 server but I can't find it in the release notes.  P4Shimada - can you confirm?

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 15 September 2015 - 10:03 PM

View Postsharkattack, on 14 September 2015 - 09:24 PM, said:

Hi, I heard this issue might have been resolved in the 2015.1 server but I can't find it in the release notes.  P4Shimada - can you confirm?

Hi. Which issue are you referring to - the P4V issue of switching between streams not updating the files for stream? If so, I did not find it.

Did you test this functionality on the latest 2015.1 server and have an issue?

For reference here are the links for the P4V and Server release notes:

http://www.perforce....er/p4vnotes.txt

http://www.perforce....er/relnotes.txt

#5 sharkattack

sharkattack

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 29 September 2015 - 03:31 PM

Hi, yeah, I'm referring to the issue of switching streams and files getting left behind from the previous stream.  I'll private message you the details of a thread between a former teammate and Perforce support where your support mentioned the issue would be fixed in 2015.1.  I have not yet tested the latest 2015.1 server.

#6 JNighthawk

JNighthawk

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 04 May 2016 - 07:25 PM

I'm having this same issue. I can't figure out how to fix this. Any ideas?

#7 CarolineB

CarolineB

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 26 July 2016 - 10:59 AM

AFAIK, when switching from stream1 to stream2, with P4V, if you have some files opened attached to the default list, they are shelved automatically, but if you have some files opened attached to numbered changelists, you get a warning, telling that you should either submit your files or shelve them; you can however proceed, and then your openeds files are kept.

This is the current behavior for p4V. But you could set a Custom tool to have another behavior, so that when switching to stream2, you automatically enforce the shelving of your opened files, then revert them, then possibly remove files not managed by Perforce (built, etc) with a 'clean -a', and then only, switch. If you work out of p4v, you have even some options now for the switch command, to enforce another behavior of the reconcile part embedded in the switch (switch = reconcile + sync)

P4V's layer for managing streams embedds the most simple process, ideal cases; when you are out of this ideal world, Custom Tools can help :)

#8 sharkattack

sharkattack

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 10 July 2017 - 07:10 PM

We're seeing something similar over here.  We have a custom tool that switches streams without the -f flag.  It runs 'p4 client -s -S <new stream>' and after we sync, files from the previous stream are still left on disk.  We noticed P4V is passing along the -f flag to the 'p4 client' command.  Would that make a difference?  Does the sync command only clean up if the workspace timestamp is updated?  We are using P4V 2017.2 and server 2016.2.

#9 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 358 posts

Posted 10 July 2017 - 09:48 PM

Does your custom tool do a full sync after your switch, or do you sync manually from the depot tree?  IIRC if you sync from the depot tree in P4V it's pretty easy to end up with a "mixed" workspace state since the depot path you're syncing doesn't necessarily include everything that's already synced to the workspace.

#10 sharkattack

sharkattack

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 11 July 2017 - 08:53 PM

Yeah, I think that was the issue.  Our custom tool was determining the head CL in the new stream and syncing the depot path like //depot/stream/...@changelist.  We took that out and now run a basic sync without any path.  That seems to do the trick and extra files are removed!





Also tagged with one or more of these keywords: streams, switching, single-workspace

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users