Bogatyr
Bogatyr

Reputation: 19333

How to revert open files in workspace WITHOUT removing them from their changelist in perforce?

Is it possible in perforce (server version 2010.1/265509 (2010/09/23), so I don't have newer "git like" server functionality) to revert all the open files in a client without the files being removed from the changelist they belong to?

By default if I have a file open and in a changelist (non-default), and I want to do a quick "context switch" away from my current working state, look at something else, then return to my prior working state, I do this:

At the in-between stage during "do stuff", p4 describe C shows no files in the changelist. This is disturbing and annoying and makes keeping track of what's in C harder than it should be.

Is there some way to "revert all open files" so that "p4 describe C" keeps all the files in changelist C?

Upvotes: 2

Views: 745

Answers (2)

jamesdlin
jamesdlin

Reputation: 90175

There's no direct way to do what you're specifically asking for (although if you really wanted to, you could write a script to revert the files in a specified changeset and then to immediately reopen them).

However, if your intent is just to list the files in a shelved changeset C, instead of using p4 describe C, you can use p4 files @=C.

Upvotes: 2

Bryan Pendleton
Bryan Pendleton

Reputation: 16389

You can have more than one workspace. I often have dozens of workspaces.

Upvotes: 0

Related Questions