[p4] Travelling back and forth without destroying the depot

G Barthelemy gb.perforce at googlemail.com
Tue Jan 5 05:51:54 PST 2010


On Tue, Jan 5, 2010 at 11:45 AM, Paulo De Oliveira Cantante De Matos
<Paulo.Matos at csr.com> wrote:
> Hi,
>
> I have a depot with several directories. I want one of the directories
> ~/depot/foo/bar as it was at a given time (lets say I have a specific
> date in mind). Then I want to go back to the most up-to-date version. I
> thought I could do something like:
>
>        rm -Rf ~/depot/foo/bar
>        p4 sync -f //depot/foo/bar/...@<date>
>        ... <test something>
>        p4 sync -f //depot/foo/bar/...
>
>
> Any tips on the best way to work this out?

Why rm and then force the sync ? There is no much point in doing that
unless you want to get rid of - or clobber - unmanaged files in the
workspace. I would do:

p4 sync //depot/foo/bar/...@<date>
<test something>
p4 sync//depot/foo/bar/...

should have the same result under normal circumstances while being
less of a strain on the server.
-- 
Guillaume




More information about the perforce-user mailing list