On VCS changes notifications
aleixpol at kde.org
Sat Mar 6 18:39:28 UTC 2010
I was wondering about how could we know that the repository has changed in
Here's some ideas, maybe we can find the proper solution for that:
- Provide the vcs directory from the IBasicVCS class, something like "KUrl
IBasicVCS::repositoryForUrl(const KUrl&);", that would mean expose too much
information then we could have the KDirWatch who did that.
- Create a IBasicVCS signal called "void IBasicVCS::directoryChanged(const
KUrl&)" that would tell us what changed when commiting/updating. we should
connect to it when a project with this is added then just wait for
notifications. Here we would have to hope the VCS plugin does that right but
we could use it (and if implemented properly would work when it's
commited/updated from the console).
- Add a "QList<KUrl> VcsJob::urls() const" method that would tell us what
changed. Then we could listen to the IRunController and whenever some job is
unregistered, we check if it's one of those we're interested on and we
retrieve the info. It's a little unnatural but since the Vcs nature is so
centered on paths, it could make sense. We wouldn't trigger the updates when
the user commits/updates on the console, though.
Note that a simple dirwatcher won't work since when we commit our code
doesn't change at all.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel