[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] Changes to Pristine Copy Quick Diff

From: Brock Janiczak <brockj_at_tpg.com.au>
Date: 2005-07-23 03:11:09 CEST

Hi Mark,

Mark Phippard wrote:

>I am always interested to learn more about the parts of Subclipse I do not
>understand. Could you briefly explain how and why this feature would be
>related to the SyncInfo? Doesn't the feature just highlight the areas in
>the source that have been modified? Wouldn't it just be doing some kind
>of real-time diff with the pristine copy?
>
>
We hook into the sync info changed support to know when something has
happened to the revision information of a file. Quick diffs maintain a
'reference copy' of a file that is being compared (either in memory, or
on disk). Our reference copy is the base revision of the file being
edited. A commit operation changes the 'base' revision of the file
being edited, so we should update to the newest base revision which
requires us to replace the reference copy. This is why the changes
remain in the quickdiff after a commit operation. Closing and
re-opening the file makes them go away.

It would have been possible to implement the quick diff by using the
base file directly, but it was easier to copy the CVS implementation :)

Also, if Platform Team ever come up with a Sync based quickdiff (there
is an issue in for it) we could easily switch to using it.

>Is the SyncInfo just a way to short-circuit the diff when we know the file
>has not been modified?
>
>
Close, but not realy. We use this to determine when to refresh the
reference copy. The cool thing about quick diff is that the platform
does the actal diff for you. You just need to supply two documents.

Cheers,
Brock
Received on Sat Jul 23 11:11:09 2005

This is an archived mail posted to the Subclipse Dev mailing list.