Jump to content

P4 switching client with opened files


  • Please log in to reply
1 reply to this topic

#1 mister_wilson


    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • LocationMontreal, Quebec

Posted 11 August 2017 - 08:06 PM


I apologize in advance if this has been asked and answered already. (If it has could someone direct me to the thread?)
I was just wondering if adding -f to the 'p4 client -i' command will revert any opened files prior to switching the workspace?

For example: I am currently using P4V Rev. P4V/NTX64/2017.2/1535556 and when I try to switch my Stream: while having files opened for edit I receive the following message:  Client 'jwilson_MyTestClient' has files opened; use -f to force switch.

P4V doesn't seem to have an option to include -f when editing a workspace so I guess this would be more of a command line or API question :-)



#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 1190 posts

Posted 11 August 2017 - 08:23 PM

I think the error is in regards to the "client -s" command, not "client -i".  Using "-f" on a "client -s" will leave the files open in the previous depot location, which is usually not helpful.

I highly recommend checking out the "p4 switch" command -- IIRC P4V was never updated to use "p4 switch" after we implemented it as a friendlier alternative to "p4 client -s", but it's *awesome* and tries to make switching with open files a painless process.  (Check out the "-r" flag that lets you bring your pending changes to the new stream!)

Also tagged with one or more of these keywords: P4

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users