VCS OpenAPI : what to do with files detected as out of date ?
My VCS implementation, while walking the dirty files, detects also which files are out of date : an "svn update" would change them to a newer revision.
How am I supposed to feed this info in the ChangeBuilder ? I've been using a Change with FileStatus.OBSOLETE but I'm not sure this is adequate.
I guess it would be nice to have them appear in the IncomingChanges tab, but I do not have one (yet)
Any clues ?
Please sign in to leave a comment.
Hello Thibaut,
You aren't supposed to feed this to ChangelistBuilder. The Incoming Changes
tab works on the basis of CommittedChangesProvider interface, which works
mostly independently of the files in the local working copy.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
ok ... if i feed those changes to the CommittedChangesProvider , will there be a visual clue indicating that those files need to be updated ?
And then, what is the FileStatus.OBSOLETE for ?
Hello Thibaut,
To get all this stuff, you need to implement CachingCommittedChangesProvider.
I should really write some docs describing how this works. :)
This is mainly a leftover from previous versions. It is not used by incoming
changes / outdated version notification in any way.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I gave a look at the CachingCommittedChangesProvider and it indeed can use some javadocs :)
I didn't look yet at how it is used in svn plugin which might help though.
What I've seen from the OBSOLETE status is it gives a browny green color to the files.
I think that's a good thing to have them visible (as I get the "outdated" info as a byproduct of the other ones anyway).
I guess the incoming changes (via the CachingCommittedChangesProvider implementation) isn't queried until you swith to it's tab right ? so that also means there will be no visual clue in the project tree for outdated files, or am I wrong ?
Lastly, and on a totally different point, I noticed one of the classes of my plugin in the project tree turning dark grey, I think it's when I renamed the class, does that make sense ? is there a doc somewhere that briefly explains what each color means ?
Hello Thibaut,
I don't think that such files can behave as proper changes. It doesn't make
sense to move an "outdated" change to another changelist, does it?
The CachingCommittedChangesProvider is polled by timer after the user has
initialized the VCS history cache, regardless of whether the tab is active.
Right now there is no highlighting in project view for files detected as
outdated through CommittedChangesProvider, but that's likely to be implemented
later (see IDEA-14310).
This represents the deleted status. You can see the colors for all statuses
in the Colors and Fonts settings dialog, and I believe it's documented somewhere
in the help file as well.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks for the helpful answers :)
>I don't think that such files can behave as proper changes. It doesn't make sense to move an "outdated" change to another changelist, does it?
I agree, those should not be included in changelists as they were not changed by the user.
I'll get to implement it using CachingCommittedChangesProvider , just need to figure out how to do it ;)