[p4] Revision confusion

Ivey, William william_ivey at bmc.com
Thu Aug 30 09:07:10 PDT 2007



> The other surprise was that the revert reverted you back
> to the revision you had synced to

And it really does. I tried it on a file that had differences
between revisions and the revert changed the content to the
earlier version. (Effectively, it's as though you've created
a pending sync which is completed by revert.)

It goes in the other direction too. That is, open revision
1 for editing, sync rev 2, revert and you get rev 2.

I would have thought that the "flush" half of sync would
be skipped if sync can't update the file content. Not sure
if this behavior is a bug or useful in some way that's not
immediately apparent.

-Wm

-----Original Message-----
From: Dave Lewis [mailto:dlewis78731 at gmail.com] 
Sent: Thursday, August 30, 2007 10:49 AM

This seems consistent with the way it works when editing an older
revision, then syncing and resolving to the head revision...  the one
part that really surprised me was the output of p4 have.  it makes
sense, but I guess I had never thought about the have list reflecting
the sync so specifically.  I had tended to think it reflected what was
on the client.

The other surprise was that the revert reverted you back to the
revision you had synced to, rather than the revision you had opened
for edit.  That makes sense too, but I had not thought about this
case.  it is an unusual scenario, it seems to me.

I guess fstat will tell you the details relevant to files open for edit.

Thanks for doing that experiment!

dave

On 8/30/07, Ivey, William <william_ivey at bmc.com> wrote:
> I was watching the modtime thread and tried an experiment,
>
> the results were interesting:
>
>
>
> > p4 have BuildIt.dat
>
> //depot/main/BuildIt.dat#2 - /opt/simcity/auto/daily/main/BuildIt.dat
>
> > p4 edit BuildIt.dat
>
> //depot/main/BuildIt.dat#2 - opened for edit
>
> > p4 sync BuildIt.dat#1
>
> //depot/main/BuildIt.dat#2 - is opened at a later revision - not
changed
>
> > p4 have BuildIt.dat
>
> //depot/main/BuildIt.dat#1 - /opt/simcity/auto/daily/main/BuildIt.dat
>
> > p4 revert BuildIt.dat
>
> //depot/main/BuildIt.dat#1 - was edit, reverted
>
> > p4 edit BuildIt.dat
>
> //depot/main/BuildIt.dat#1 - opened for edit
>
> ... //depot/main/BuildIt.dat - must sync/resolve #2 before submitting
>
> > p4 diff BuildIt.dat
>
> ==== //depot/main/BuildIt.dat#1 -
> /opt/simcity/auto/daily/main/BuildIt.dat ====
>
> > p4 revert BuildIt.dat
>
> //depot/main/BuildIt.dat#1 - was edit, reverted
>
>
>
> Obviously sync doesn't update the file contents, but it does change
>
> the revision. -Wm
>
>
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>




More information about the perforce-user mailing list