[M3devel] cvs question: how to know what I have changed on my machine?
Olaf Wagner
wagner at elegosoft.com
Wed Jan 2 12:21:48 CET 2008
On Mon, Dec 31, 2007 at 09:48:26AM +0000, Jay wrote:
>
> I swear I looked for this on the web, several times. :)
> What is the right/fast way to see what I have changed in cvs?
> Is it really to go to the top of the tree and say cvs diff?
> Some source control system I have used, makes "checked in" files
> read only, requires you to "check out", and keeps track of what
> you checked out.
> This model seems quite nice.
cvs works recursively from the current directory by default.
To check what has changed you use
cvs -nq up
which simulates an update and lets you know the status of changes.
To get more details, you use
cvs -q diff -u [files] | less
This is of course what I do most of the times. There may be other
ways.
> There is a fallback if the network is needed and not available.
> It is a little annoying, the inevitable failed save, but it is well
> worth it.
CVS use an optimistic approach wrt. locking, and it works well in
practice. Locks or watches can be set if one really wants to, but
this needs the cooperation of all users. See `cvs edit' and
`cvs watchers' for details.
> I've been doing cvs diff but it seem terribly inefficient.
> Same question for Subversion, though I haven't looked.
> It at least seems to rapidly know what I have changed, on my puny
> tree,
> and I know it also saves away all the originals, so diff is a client
> only operation.
In Subversion, diff is a client operation wrt. the base vesion you
checked out, because that is held as backup copy in your workspace.
This leads to workspaces which occupy twice the amount of space,
but is sometimes worth the effort.
> Oh another question -- how to view history?
In CVS, the history for one file is called log. Use `cvs log file' to
view it. To get a complete history of changes, use the cvs2cl
utility, which accumulates changes recursively into ChangeLog files.
It's what you can see at http://modula3.elegosoft.com/cm3/ChangeLog
for the cm3 repository.
> Like, what i keep doing is navigating to individual files on the web.
> It's fairly tedious.
> It'd be nice if checkins at right about the same time, with the same
> comment,
> where packaged up in the ui, like Perforce (well, for it, it is just
> one change)....
> I usually look at the diffs after commit, besides before.
I'd suggest to do commits at package level (to always have a
consistent version checked-in) and look at the diffs before commit.
There are some more suggestions in
http://modula3.elegosoft.com/cm3/cm3-cm-rules.html
Olaf
> Thanks,
> - Jay
> _________________________________________________________________
>
> Share life as it happens with the new Windows Live. Share now!
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list