Re: Instant diff
Guy Rouillier <[email protected]> Mon, 06 Jun 2011 02:22:40 -0400
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
On 6/5/2011 3:53 AM, Arthur Barrett wrote:
> Guy,
>
> Thanks for the feedback.
Arthur, thanks for the long reply. I'll try to fill in missing details.
>
> 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 ...
I've taken a couple screenshots of a popular Git GUI called SmartGit,
and uploaded to my PhotoBucket site:
http://s247.photobucket.com/albums/gg134/guy-rouillier/Computer/.
The first is the main window for the app. As you click one file or a
another, you instantly see the diffs (if any, which there aren't in the
screenshot I provided) in the two diff windows at the bottom. As I
mentioned this works because the developer's local system has a complete
copy of the repo. This differs from CVS in that first, I must
specifically ask for a diff on a particular file; when I do, the local
client has to contact the server to get the previous version of the
file, then do the diff locally.
The second screenshot shows the results of clicking the log button while
on a particular file. In Git, changes are recorded as a sequence of
commits. So, the log window shows all the commits that contain changes
for the selected file; if I had clicked on the project name instead of a
single file, it would have shown me a commit tree for the entire
project. Once you have a log window, you can again click one commit
after another, and the diffs are instantly displayed in the two diff
windows.
>
>> 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...
Right, but to be able to instantly display all diffs, I'd need a
complete copy of the remote CVS repository locally. That is not part of
the CVS API. I've since read a bit on the net and rsync seems to be a
popular way to obtain a local copy of a CVS repository, so perhaps
enhancing the CVS API is unnecessary.
>
>
>> 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?
Both. You'd need underlying support to make this possible. The GUI
part is easy, once you have the repo copied locally to instantly
generate the diffs.
>
>> What do others think of this 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)".
Hopefully, the additional info I provided and screenshots will help.
>
> Finally a couple of technical points:
>
> 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.
That would be a start, but it would only allow me to see a diff between
my current changes and the original content of the same file version.
I'd like to be able to instantly click through the entire history of
changes.
>
> 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
Thanks, 3b sounds like what I'm after. I'll take a look.
>
>
> 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?
I'm sure diff is quick. Having to download file versions from a central
server is slow.
> 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.
Indeed I try to. I've contributed code to the CvsGui project and have
committer rights there. I've identified minor bugs in CVSNT in the past
and passed them along to MarchHare; I know at least one was implemented.
Unfortunately, that would be more difficult today; few people are
going to shell out several hundred dollars for the privilege of
submitting bug reports or code enhancements. I understand MarchHare
needs income to continue their fine work with CVSNT; I suppose no easy
answers exist.
To be honest, the group at work looked at Git because some were
uncomfortable with MarchHare taking the open source CVSNT private. A
valid concern is that MarchHare could make enhancements to CVSNT that
result in a completely proprietary version control system, which of
course is contrary to the spirit of open source. But I really didn't
intend to get into a discussion of open source and business practices
here; I greatly appreciate the work MarchHare has done with CVSNT, and
you personally for the years of help you have provided on this list (and
the CVSNT list, to which I am also subscribed.)
Thanks.
--
Guy Rouillier
------------------------------------
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/