Discussion:
[p4] Reverting unchanged files faster
Gregg G. Wonderly
1999-08-23 15:13:01 UTC
Permalink
I think a useful user interface enhancement would be the following.
I sometimes work offline and just change files to writable and wail
away on them. When I reconnect, I typically checkout the whole
tree that I have been working under. I'd like to be able to use
"revert unchanged files" to quickly cancel editing of the files
I have not changed. Unfortunately, the implementation is that the
unchanged files are located, but to revert the "editing", I must
also allow the server to send me a complete copy of the current
version of the file. It seems like revert needs a flag that can
be used in this case that says just cancel the edit and don't send
me the copy of the file, what I have is what I want.

-----
***@c2-tech.com (C2 Technologies Inc)
Nick Pisarro
1999-08-23 15:35:26 UTC
Permalink
Post by Gregg G. Wonderly
Unfortunately, the implementation is that the
unchanged files are located, but to revert the "editing", I must
also allow the server to send me a complete copy of the current
version of the file. It seems like revert needs a flag that can
be used in this case that says just cancel the edit and don't send
me the copy of the file, what I have is what I want.
If the files are indeed confirmed as unchanged it should never make sense
to redownload the file.

An option is not necessary. It should never download the file.

Nick Pisarro, Jr.
Aperture Technologies, Inc.
Scott Blachowicz
1999-08-23 15:50:35 UTC
Permalink
Post by Nick Pisarro
An option is not necessary. It should never download the file.
So, it should probably to the equivalent of 'p4 diff -sr' internally
to decide if the file should be re-downloaded.

***@seaslug.org
Jeff Bowles
1999-08-23 15:36:15 UTC
Permalink
You can slice it two different ways to get the off-line editing you
want: edit-before-disconnecting is one way, but not the only way.

[Open-for-edit before disconnecting]
If you "p4 edit ..." before taking the laptop to the beach, you
can do all your work happily at the beach and, when you return,
can run "p4 diff -sr ... | p4 -x - revert" and it'll revert all
unchanged files.

I like this method because it's very, very clean. You point
out, accurately, that "revert" transfers new content for each
reverted file, which might be a bit more time than you want. If
so, read on...

[Open-for-edit after reconnecting]
If you just run "p4 sync" to get current, you'll have readonly
files on your workspace. (There's a client spec option to tweak
this, but it's not worth your time for this example.)

You can take the laptop to the beach, and as you need to change
files, mark them writeable and make your edits. Then when you
reconnect, run "p4 diff -se | p4 -x - edit" and it'll find all
files [on the client] that have contents that have been modified
from the original contents you were given, and writes that as a
file-list that "p4 -x - edit" uses to mark each file
'open-for-edit'. Note that it hasn't transferred new content to
your machine as a result of running "p4 edit", so it doesn't
overwrite your work.

This takes a bit less time when you reconnect because
it's not tranferring any content back/forth.

Of course, in both cases, you'd run "p4 submit" after all of this
to publish your changes to everyone else!

That said, both are "okay" and both work well. Use the one
you like the most.

-Jeff Bowles
San Francisco
-----Original Message-----
Sent: Monday, August 23, 1999 8:13 AM
Subject: [p4] Reverting unchanged files faster
I think a useful user interface enhancement would be the following.
I sometimes work offline and just change files to writable and wail
away on them. When I reconnect, I typically checkout the whole
tree that I have been working under. I'd like to be able to use
"revert unchanged files" to quickly cancel editing of the files
I have not changed. Unfortunately, the implementation is that the
unchanged files are located, but to revert the "editing", I must
also allow the server to send me a complete copy of the current
version of the file. It seems like revert needs a flag that can
be used in this case that says just cancel the edit and don't send
me the copy of the file, what I have is what I want.
-----
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
John Hethcox
1999-08-23 16:01:49 UTC
Permalink
I have a slow connection back to my 'mothership' and the standard "p4
diff -sr ... | p4 -x - revert" takes a very long time on a modest amount of
code. I have been using LockSweep with generally good results. The tools
marks everything writeable and hashes the files. After editing, LockSweep
will tell you what files you changed/added/deleted and you only have to
access p4 to check in the changes. It would be very useful for me if this
was integrated into p4.
Post by Jeff Bowles
You can slice it two different ways to get the off-line editing you
want: edit-before-disconnecting is one way, but not the only way.
[Open-for-edit before disconnecting]
If you "p4 edit ..." before taking the laptop to the beach, you
can do all your work happily at the beach and, when you return,
can run "p4 diff -sr ... | p4 -x - revert" and it'll revert all
unchanged files.
I like this method because it's very, very clean. You point
out, accurately, that "revert" transfers new content for each
reverted file, which might be a bit more time than you want. If
so, read on...
[Open-for-edit after reconnecting]
If you just run "p4 sync" to get current, you'll have readonly
files on your workspace. (There's a client spec option to tweak
this, but it's not worth your time for this example.)
You can take the laptop to the beach, and as you need to change
files, mark them writeable and make your edits. Then when you
reconnect, run "p4 diff -se | p4 -x - edit" and it'll find all
files [on the client] that have contents that have been modified
from the original contents you were given, and writes that as a
file-list that "p4 -x - edit" uses to mark each file
'open-for-edit'. Note that it hasn't transferred new content to
your machine as a result of running "p4 edit", so it doesn't
overwrite your work.
This takes a bit less time when you reconnect because
it's not tranferring any content back/forth.
Of course, in both cases, you'd run "p4 submit" after all of this
to publish your changes to everyone else!
That said, both are "okay" and both work well. Use the one
you like the most.
-Jeff Bowles
San Francisco
-----Original Message-----
Sent: Monday, August 23, 1999 8:13 AM
Subject: [p4] Reverting unchanged files faster
I think a useful user interface enhancement would be the following.
I sometimes work offline and just change files to writable and wail
away on them. When I reconnect, I typically checkout the whole
tree that I have been working under. I'd like to be able to use
"revert unchanged files" to quickly cancel editing of the files
I have not changed. Unfortunately, the implementation is that the
unchanged files are located, but to revert the "editing", I must
also allow the server to send me a complete copy of the current
version of the file. It seems like revert needs a flag that can
be used in this case that says just cancel the edit and don't send
me the copy of the file, what I have is what I want.
-----
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Loading...