<br><br><div class="gmail_quote">On Sun, Mar 7, 2010 at 4:23 PM, Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 06.03.10 19:39:28, Aleix Pol wrote:<br>
> I was wondering about how could we know that the repository has changed in<br>
> any way.<br>
><br>
> Here's some ideas, maybe we can find the proper solution for that:<br>
> - Provide the vcs directory from the IBasicVCS class, something like "KUrl<br>
> IBasicVCS::repositoryForUrl(const KUrl&);", that would mean expose too much<br>
> information then we could have the KDirWatch who did that.<br>
<br>
</div>Can you elaborate a bit what "vcs directory" is and what you want to do<br>
<div class="im">that?<br></div></blockquote><div>I mean the .git/.svn directory. we could set a dir watcher on that.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
<br>
> - Create a IBasicVCS signal called "void IBasicVCS::directoryChanged(const<br>
> KUrl&)" that would tell us what changed when commiting/updating. we should<br>
> connect to it when a project with this is added then just wait for<br>
> notifications. Here we would have to hope the VCS plugin does that right but<br>
> we could use it (and if implemented properly would work when it's<br>
> commited/updated from the console).<br>
<br>
</div>Well, thats the best thing, we can even have separate signals<br>
"comitFinished(const KUrl::List&)" and "directoryUpdated(const<br>
KUrl::List&)". Additionally we'd probably should connect to a signal in<br>
the documentcontroller thats triggered when a file is saved. The good<br>
thing about having separate signals is that it might be easier to update<br>
and fetch the status as the commitFinished() can have a list of only<br>
those files that have really been comitted.<br>
<br>
The repository-interface might also need some signal to notify<br>
interested parties when the repository got a change, so that one can<br>
display this in the project tree too (this one would probably rely on a<br>
timer regularly fetching the information).<br>
<div class="im"><br>
> - Add a "QList<KUrl> VcsJob::urls() const" method that would tell us what<br>
> changed. Then we could listen to the IRunController and whenever some job is<br>
> unregistered, we check if it's one of those we're interested on and we<br>
> retrieve the info. It's a little unnatural but since the Vcs nature is so<br>
> centered on paths, it could make sense. We wouldn't trigger the updates when<br>
> the user commits/updates on the console, though.<br>
<br>
</div>I don't like this, as the vcs-plugins has no idea when the "changed<br>
urls" list can be cleared. So the only option would be clearing it each<br>
time after calling, which is a problem with multiple plugins want to do<br>
something when a vcs-plugin did something.<br>
<br>
Andreas<br>
<font color="#888888"><br>
--<br>
You'll wish that you had done some of the hard things when they were easier<br>
to do.<br>
</font><div><div></div><div class="h5"><br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br>