RE: Instant diff
"Arthur Barrett" <[email protected]> Sun, 5 Jun 2011 18:53:11 +1100
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
Guy,
Thanks for the feedback.
Can you describe this in a little more detail:
> One feature I used regularly with git was its ability to
> instantly show you every change that's been made to a file
> (or files) in a diff window.
Specifically - how is this different from 'cvs diff -c'?
I mostly work on the 'core' CVS 2.x system and libraries - maybe this is
specifically a 'gui' thing, since you mention 'diff window'. If so -
can you give a URL to a screenshot? There are many many different CVS
GUI's and most SVN/Git/Hg ones I've seen are derived from older CVS
ones, so I wouldn't be at all surprised if whatever it is it is already
done ...
> It can do this because with git, every developer has a complete
> repository on his/her local workstation.
You know that this is is a feature of CVS 2.x (CVSNT) too? But I don't
immediately understand how that is related to 'diff'.
>
> That got me to thinking about how to implement a similar feature in
> WinCvs. While outside of the normal CVS protocol, such a
> thing should be possible.
How has this anything to do with the CVS protocol? The protocol already
includes features to return diffs and the return versions...
> On a module basis, we can have a checkbox
> called "Instant history". If that is checked, then we
> would download into a hidden
> directory the complete repository for that module, and run
> diffs against that.
Please make it clear - are you talking about some GUI feature like a
'instant history checkbox' or some feature of the core tool like
download diffs?
> What do others think of this idea?
>
WinCVS and TortoiseCVS both rely on CVSNT (CVS 2.x) to do all the 'work'
of versioning, the GUI tools are exactly that - just graphical
interfaces to the underlying CVS tool. There is a lot of technical
stuff behind it including things like the CVSAPI (common functions like
'run'), CVSTOOLS (common dialogs), CVS Protocol (what the server and
client use to communicate) and the CVSGUI protocol (what the client and
GUI use to communicate).
Almost any idea you have, has probably already been had, and already
solved. Not because the developers are really smart - it's just that
CVS has been around 25 years and actively developed for ALL of that time
- used by millions of new people every year and with that much going on
- it's just really really hard to have an original idea.
The best approach is to describe the business case - so no talk about
protocols, or CVS directories or checkboxes etc, just describe what you
want in plain simple words. Eg: "I want to see a list of all files
changed before I commit", or "I want to see a list of differences in all
files I've changed before I commit (mock up screenshot attached)".
Finally a couple of technical points:
1) WinCVS and TortoiseCVS rely on CVSNT 2.x. This is a fork of CVS 1.10
available on linux/unix/windows, which was largely kept 'in sync' with
CVS 1.11, but with an enhanced protocol and many additional features
that were considered not appropriate for CVS 1.x.
2) CVS 1.12 backported a couple of features from CVSNT 2.x, and
introduced some new ones. At this point CVSNT 2.x and CVS 1.12 are
quite different. The CVSNT team have intentions to port some of the new
CVS 1.12 features to CVSNT 2.x but we've simply got too much to do, too
many ideas, and not enough hours in the day (and not enough money to pay
for more hours, and no unpaid contributors).
3) 'offline' operations are being persued by the CVS 1.x and CVS 2.x
(CVSNT) teams independantly. Both products create in every local
sandbox a hidden 'Base' directory in the hidden 'CVS' directory which
stores a copy of the 'unmodified' files. CVS 1.12 and CVS 2.5 choose
different times to create these 'Base' files and use them for different
tasks.
3a) If you want a simple 'offline diff' then I think CVS 1.12 already
has this (but at the cost of having two copies of every file). CVSNT
could 'easily' have it since it also supports CVS/Base, but at this time
the 'cost' of doubling the size of every sandbox to support this feature
seems excessive (see 3b)
3b) CVSNT supports an almost fully distributed model. Ie: every
'client' PC can have a full copy of the repository, and perform all
operations like diff, update, merge, log, history locally. Write
operations like 'commit', 'tag' and 'chacl' currently all 'pass through'
to the master server. Simply set up each PC as a 'server' of type 'sync
client' and set up the sync and the sync-back. Precise technique varies
based on linux/windows server/client combinations. Overview here:
http://march-hare.com/cvspro/?pdf=p
Final words: CVS already does diff - and it should already be quick.
If for some reason your developers are finding 'diff' slow - then you
probably should talk to the tech support team about diagnosing the
performance problem than implementing a whole new feature just to
workaround it. Diff works. Diff is a quick, simple, low-cost
operation. If 1 million new users every year don't need a 'fast diff'
-- why do you? Could it be that for everyone else diff is already
blindingly quick and there is something 'wrong' or 'odd' about your
environment?
Final Final words: Whatever change management software you use, please
ensure you contribute to the development. If you want to see projects
continue, they need funding or significant contributions of effort.
With CVSNT it's as simple as purchasing one copy of CVS Suite for each
person who uses server and/or client (plus annual software maintenance
and support). If you've done that you can contact your local technical
support manager and discuss your business requirements, get help with
performance and request enhancements too.
Kind Regards,
Arthur Barrett
Product Manager
March Hare Software Ltd
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cvsgui-dev/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/cvsgui-dev/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/