[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Broken Git repos scanning in project plugin
From:       Valentin Rouet <v.rouet () gmail ! com>
Date:       2015-11-02 10:00:57
Message-ID: CACAhqFV58ZdDqdX=dPwe85wo9e3OLytBx0CPPFCZX4sh0coPog () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Great, thanks for applying my patch.

I have another question/suggestion regarding the Git repos in the projects
plugin: I personally find it slightly annoying that the files that have not
yet been committed but have been staged for commit are still listed under
<untracked>.
 Though they indeed are not yet in the repo's tree, I'd really like to be
able to reload after having added all the newly created files and see them
in their actual pathes instead of in <untracked>.

I'd like your feedback on whether you guys thinks it's a good or a bad
idea. If you think it makes sense, I'd be happy to have a look at how to
achieve that and offer a patch.

Cheers,

Valentin

On Sun, Nov 1, 2015 at 7:23 PM, Christoph Cullmann <cullmann@absint.com>
wrote:

> Hi,
>
> thanks for the patch, still works fine for me (thought I never had the
> problem).
>
> Commited:
>
> https://bugs.kde.org/show_bug.cgi?id=354494
>
> Christoph Cullmann <cullmann@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>       Latest Commit|                            |
> http://commits.kde.org/kate
>                    |
> |/1740e4db3aab2d4b0d0fbdaad1
>                    |                            |4f8080d0b5346e
>              Status|UNCONFIRMED                 |RESOLVED
>          Resolution|---                         |FIXED
>
> --- Comment #3 from Christoph Cullmann <cullmann@kde.org> ---
> Git commit 1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e by Christoph Cullmann,
> on
> behalf of Valentin Rouet.
> Committed on 01/11/2015 at 18:22.
> Pushed by cullmann into branch 'master'.
>
> fix loading of git projects
>
> M  +15   -2    addons/project/kateprojectworker.cpp
>
> http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e
>
> --
> You are receiving this mail because:
> You are watching the assignee of the bug.
>
> ----- Am 31. Okt 2015 um 18:29 schrieb Valentin Rouet v.rouet@gmail.com:
>
> > Here is a patch that fixes the bug and adds some comments to the calls
> of the
> > libGit2 functions. It should still work for people who didn't have the
> problem.
> > Can someone try it out and review the code to include it in the repo?
> >
> > On Sat, Oct 31, 2015 at 6:28 PM, Valentin Rouet < v.rouet@gmail.com >
> wrote:
> >
> >
> >
> > OK, I've been investigating the source code, and have narrowed down the
> place
> > where it happens. It does seem to come from some change in Qt.
> >
> > The problem is in file addons/project/kateprojectworker.cpp at line 358:
> >
> >
> > if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to
> resolv
> > "." as path
> > It seems this line relies on the fact that Qdir::relativeFilePath()
> would return
> > an empty string when called with the current working dir as argument,
> but what
> > it actually returns is the string "."
> >
> > When replacing that test with the following, the content loads:
> >
> >
> > if (relpathUtf8.isEmpty() || relpathUtf8 == ".") {
> > But it's not a full solution, because then what you get is this:
> >
> >  As you can see, there is a "." folder, instead of the files at the
> project's
> > root being displayed directly. This makes me think that this change of Qt
> > functions from returning an empty string to returning "." is affecting
> other
> > places of the code. I also wonder if it really is Qt-related or if it
> has to do
> > with an underlying OS-dependent mechanism... Anyways I haven't been able
> to
> > find any reference to such change in Qt's changelogs.
> >
> > On Sat, Oct 31, 2015 at 6:03 PM, Valentin Rouet < v.rouet@gmail.com >
> wrote:
> >
> >
> >
> > OK, I've been investigating the source code, and have narrowed down the
> place
> > where it happens. It does seem to come from some change in Qt.
> >
> > The problem is in file addons/project/kateprojectworker.cpp at line 358:
> >
> >
> > if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to
> resolv
> > "." as path
> > It seems this line relies on the fact that Qdir::relativeFilePath()
> would return
> > an empty string when called with the current working dir as argument,
> but what
> > it actually returns is the string "."
> >
> > When replacing that test with the following, the content loads:
> >
> >
> > if (relpathUtf8.isEmpty() || relpathUtf8 == ".") {
> > But it's not a full solution, because then what you get is this:
> >
> > As you can see, there is a "." folder, instead of the files at the
> project's
> > root being displayed directly. This makes me think that this change of Qt
> > functions from returning an empty string to returning "." is affecting
> other
> > places of the code. I also wonder if it really is Qt-related or if it
> has to do
> > with an underlying OS-dependent mechanism... Anyways I haven't been able
> to
> > find any reference to such change in Qt's changelogs.
> >
> > On Sat, Oct 31, 2015 at 3:13 PM, Michal Humpula <
> michal.humpula@hudrydum.cz >
> > wrote:
> >
> >
> > Are you capable of downgrading to Qt5.4, just for the fun of testing?:)
> >
> > On Saturday 31 of October 2015 15:11:12 Valentin Rouet wrote:
> >> Hi,
> >>
> >> I'm not completely sure after which update this started to happen, but
> from
> >> what I see in my packages cache, I was on Qt 5.5.0 since august and it
> was
> >> working.
> >>
> >> 2 updates I see are:
> >> - Kate 15.08.1 to 15.08.2 on october 13th
> >> - Qt 5.5.0 to 5.5.1 on october 16th
> >>
> >>
> >> The problem must have been introduced by one of these 2 updates, but I
> >> don't know which.
> >>
> >> On Sat, Oct 31, 2015 at 3:00 PM, Michal Humpula <
> michal.humpula@hudrydum.cz >
> >> wrote:
> >> > Hi Valentin,
> >> >
> >> > can you pinpoint the time when it started to happen? Could it be after
> >> > upgrade
> >> > to Qt5.5?:) I have a very similar issue to yours, which is
> reproducible on
> >> > Qt5.5 but not on Qt5.4:)
> >> >
> >> > Cheers
> >> > Michal
> >> >
> >> > On Saturday 31 of October 2015 13:51:07 Valentin Rouet wrote:
> >> > > Dear Kate developers,
> >> > >
> >> > > First of all, before talking about problems, let me thank you for
> the
> >> >
> >> > great
> >> >
> >> > > pieces of software that Kate/Kwrite are. I've been using them for
> about
> >> >
> >> > 10
> >> >
> >> > > years, and they've always been fulfilling my text-editing and
> >> > > programming
> >> > > needs.
> >> > >
> >> > > I have already reported the bug I'm having on the bugtracker (
> >> > > https://bugs.kde.org/show_bug.cgi?id=354494 ), but didn't get any
> >> >
> >> > feedback
> >> >
> >> > > from any dev, so I'd just like to be sure you're aware of its
> existence,
> >> >
> >> > as
> >> >
> >> > > it seems to me that one major feature is involved. Someone did
> confirm
> >> >
> >> > thay
> >> >
> >> > > had the same problem though, on a different distro but with the same
> >> > > package version.
> >> > >
> >> > > The Git repo scanning feature is great and absolutely necessary.
> I've
> >> >
> >> > been
> >> >
> >> > > working without it for a few days, using the files browser plugin
> >> >
> >> > instead,
> >> >
> >> > > but it's really not filling the void...
> >> > >
> >> > > If you need any additional information to track down the bug,
> please let
> >> >
> >> > me
> >> >
> >> > > know.
> >> > >
> >> > > Thanks in advance,
> >> > >
> >> > > Valentin Rouet
> >
> >
> >
> >
> >
> > _______________________________________________
> > KWrite-Devel mailing list
> > KWrite-Devel@kde.org
> > https://mail.kde.org/mailman/listinfo/kwrite-devel
>
> --
> ----------------------------- Dr.-Ing. Christoph Cullmann ---------
> AbsInt Angewandte Informatik GmbH      Email: cullmann@AbsInt.com
> Science Park 1                         Tel:   +49-681-38360-22
> 66123 Saarbrücken                      Fax:   +49-681-38360-20
> GERMANY                                WWW:   http://www.AbsInt.com
> --------------------------------------------------------------------
> Geschäftsführung: Dr.-Ing. Christian Ferdinand
> Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div><div><div>Great, thanks for applying my \
patch.<br><br></div>I have another question/suggestion regarding the Git repos in the \
projects plugin: I personally find it slightly annoying that the files that have not \
yet been committed but have been staged for commit are still listed under \
&lt;untracked&gt;.<br></div>  Though they indeed are not yet in the repo&#39;s tree, \
I&#39;d really like to be able to reload after having added all the newly created \
files and see them in their actual pathes instead of in \
&lt;untracked&gt;.<br><br></div>I&#39;d like your feedback on whether you guys thinks \
it&#39;s a good or a bad idea. If you think it makes sense, I&#39;d be happy to have \
a look at how to achieve that and offer a \
patch.<br><br></div>Cheers,<br><br></div>Valentin<br></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 7:23 PM, \
Christoph Cullmann <span dir="ltr">&lt;<a href="mailto:cullmann@absint.com" \
target="_blank">cullmann@absint.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br> <br>
thanks for the patch, still works fine for me (thought I never had the problem).<br>
<br>
Commited:<br>
<br>
<a href="https://bugs.kde.org/show_bug.cgi?id=354494" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=354494</a><br> <br>
Christoph Cullmann &lt;<a href="mailto:cullmann@kde.org">cullmann@kde.org</a>&gt; \
changed:<br> <br>
                 What      |Removed                                |Added<br>
----------------------------------------------------------------------------<br>
         Latest Commit|                                          |<a \
href="http://commits.kde.org/kate" rel="noreferrer" \
                target="_blank">http://commits.kde.org/kate</a><br>
                             |                                          \
                |/1740e4db3aab2d4b0d0fbdaad1<br>
                             |                                          \
                |4f8080d0b5346e<br>
                    Status|UNCONFIRMED                          |RESOLVED<br>
              Resolution|---                                      |FIXED<br>
<br>
--- Comment #3 from Christoph Cullmann &lt;<a \
href="mailto:cullmann@kde.org">cullmann@kde.org</a>&gt; ---<br> Git commit \
1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e by Christoph Cullmann, on<br> behalf of \
Valentin Rouet.<br> Committed on 01/11/2015 at 18:22.<br>
Pushed by cullmann into branch &#39;master&#39;.<br>
<br>
fix loading of git projects<br>
<br>
M   +15     -2      addons/project/kateprojectworker.cpp<br>
<br>
<a href="http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e" \
rel="noreferrer" target="_blank">http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e</a><br>
 <br>
--<br>
You are receiving this mail because:<br>
You are watching the assignee of the bug.<br>
<span class=""><br>
----- Am 31. Okt 2015 um 18:29 schrieb Valentin Rouet <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a>:<br> <br>
&gt; Here is a patch that fixes the bug and adds some comments to the calls of \
the<br> &gt; libGit2 functions. It should still work for people who didn&#39;t have \
the problem.<br> &gt; Can someone try it out and review the code to include it in the \
repo?<br> &gt;<br>
&gt; On Sat, Oct 31, 2015 at 6:28 PM, Valentin Rouet &lt; <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a> &gt; wrote:<br> &gt;<br>
&gt;<br>
&gt;<br>
&gt; OK, I&#39;ve been investigating the source code, and have narrowed down the \
place<br> &gt; where it happens. It does seem to come from some change in Qt.<br>
&gt;<br>
&gt; The problem is in file addons/project/kateprojectworker.cpp at line 358:<br>
&gt;<br>
&gt;<br>
&gt; if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to \
resolv<br> &gt; &quot;.&quot; as path<br>
&gt; It seems this line relies on the fact that Qdir::relativeFilePath() would \
return<br> &gt; an empty string when called with the current working dir as argument, \
but what<br> &gt; it actually returns is the string &quot;.&quot;<br>
&gt;<br>
&gt; When replacing that test with the following, the content loads:<br>
&gt;<br>
&gt;<br>
&gt; if (relpathUtf8.isEmpty() || relpathUtf8 == &quot;.&quot;) {<br>
&gt; But it&#39;s not a full solution, because then what you get is this:<br>
&gt;<br>
</span><span class="">&gt;   As you can see, there is a &quot;.&quot; folder, instead \
of the files at the project&#39;s<br> &gt; root being displayed directly. This makes \
me think that this change of Qt<br> &gt; functions from returning an empty string to \
returning &quot;.&quot; is affecting other<br> &gt; places of the code. I also wonder \
if it really is Qt-related or if it has to do<br> &gt; with an underlying \
OS-dependent mechanism... Anyways I haven&#39;t been able to<br> &gt; find any \
reference to such change in Qt&#39;s changelogs.<br> &gt;<br>
&gt; On Sat, Oct 31, 2015 at 6:03 PM, Valentin Rouet &lt; <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a> &gt; wrote:<br> &gt;<br>
&gt;<br>
&gt;<br>
&gt; OK, I&#39;ve been investigating the source code, and have narrowed down the \
place<br> &gt; where it happens. It does seem to come from some change in Qt.<br>
&gt;<br>
&gt; The problem is in file addons/project/kateprojectworker.cpp at line 358:<br>
&gt;<br>
&gt;<br>
&gt; if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to \
resolv<br> &gt; &quot;.&quot; as path<br>
&gt; It seems this line relies on the fact that Qdir::relativeFilePath() would \
return<br> &gt; an empty string when called with the current working dir as argument, \
but what<br> &gt; it actually returns is the string &quot;.&quot;<br>
&gt;<br>
&gt; When replacing that test with the following, the content loads:<br>
&gt;<br>
&gt;<br>
&gt; if (relpathUtf8.isEmpty() || relpathUtf8 == &quot;.&quot;) {<br>
&gt; But it&#39;s not a full solution, because then what you get is this:<br>
&gt;<br>
</span><div><div class="h5">&gt; As you can see, there is a &quot;.&quot; folder, \
instead of the files at the project&#39;s<br> &gt; root being displayed directly. \
This makes me think that this change of Qt<br> &gt; functions from returning an empty \
string to returning &quot;.&quot; is affecting other<br> &gt; places of the code. I \
also wonder if it really is Qt-related or if it has to do<br> &gt; with an underlying \
OS-dependent mechanism... Anyways I haven&#39;t been able to<br> &gt; find any \
reference to such change in Qt&#39;s changelogs.<br> &gt;<br>
&gt; On Sat, Oct 31, 2015 at 3:13 PM, Michal Humpula &lt; <a \
href="mailto:michal.humpula@hudrydum.cz">michal.humpula@hudrydum.cz</a> &gt;<br> &gt; \
wrote:<br> &gt;<br>
&gt;<br>
&gt; Are you capable of downgrading to Qt5.4, just for the fun of testing?:)<br>
&gt;<br>
&gt; On Saturday 31 of October 2015 15:11:12 Valentin Rouet wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not completely sure after which update this started to happen, but \
from<br> &gt;&gt; what I see in my packages cache, I was on Qt 5.5.0 since august and \
it was<br> &gt;&gt; working.<br>
&gt;&gt;<br>
&gt;&gt; 2 updates I see are:<br>
&gt;&gt; - Kate 15.08.1 to 15.08.2 on october 13th<br>
&gt;&gt; - Qt 5.5.0 to 5.5.1 on october 16th<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The problem must have been introduced by one of these 2 updates, but I<br>
&gt;&gt; don&#39;t know which.<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Oct 31, 2015 at 3:00 PM, Michal Humpula &lt; <a \
href="mailto:michal.humpula@hudrydum.cz">michal.humpula@hudrydum.cz</a> &gt;<br> \
&gt;&gt; wrote:<br> &gt;&gt; &gt; Hi Valentin,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; can you pinpoint the time when it started to happen? Could it be \
after<br> &gt;&gt; &gt; upgrade<br>
&gt;&gt; &gt; to Qt5.5?:) I have a very similar issue to yours, which is reproducible \
on<br> &gt;&gt; &gt; Qt5.5 but not on Qt5.4:)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cheers<br>
&gt;&gt; &gt; Michal<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Saturday 31 of October 2015 13:51:07 Valentin Rouet wrote:<br>
&gt;&gt; &gt; &gt; Dear Kate developers,<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; First of all, before talking about problems, let me thank you for \
the<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; great<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; pieces of software that Kate/Kwrite are. I&#39;ve been using them \
for about<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; 10<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; years, and they&#39;ve always been fulfilling my text-editing \
and<br> &gt;&gt; &gt; &gt; programming<br>
&gt;&gt; &gt; &gt; needs.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; I have already reported the bug I&#39;m having on the bugtracker \
(<br> </div></div>&gt;&gt; &gt; &gt; <a \
href="https://bugs.kde.org/show_bug.cgi?id=354494" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=354494</a> ), but didn&#39;t get \
any<br> <span class="">&gt;&gt; &gt;<br>
&gt;&gt; &gt; feedback<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; from any dev, so I&#39;d just like to be sure you&#39;re aware of \
its existence,<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; as<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; it seems to me that one major feature is involved. Someone did \
confirm<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; thay<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; had the same problem though, on a different distro but with the \
same<br> &gt;&gt; &gt; &gt; package version.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; The Git repo scanning feature is great and absolutely necessary. \
I&#39;ve<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; been<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; working without it for a few days, using the files browser \
plugin<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; instead,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; but it&#39;s really not filling the void...<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; If you need any additional information to track down the bug, \
please let<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt; me<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; know.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; Thanks in advance,<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; Valentin Rouet<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</span>&gt; _______________________________________________<br>
&gt; KWrite-Devel mailing list<br>
&gt; <a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> <span \
                class="HOEnZb"><font color="#888888"><br>
--<br>
----------------------------- Dr.-Ing. Christoph Cullmann ---------<br>
AbsInt Angewandte Informatik GmbH         Email: cullmann@AbsInt.com<br>
Science Park 1                                      Tel:     <a \
href="tel:%2B49-681-38360-22" value="+496813836022">+49-681-38360-22</a><br> 66123 \
Saarbrücken                                 Fax:     <a \
href="tel:%2B49-681-38360-20" value="+496813836020">+49-681-38360-20</a><br> GERMANY  \
WWW:     <a href="http://www.AbsInt.com" rel="noreferrer" \
                target="_blank">http://www.AbsInt.com</a><br>
--------------------------------------------------------------------<br>
Geschäftsführung: Dr.-Ing. Christian Ferdinand<br>
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB \
11234</font></span><br>_______________________________________________<br> \
KWrite-Devel mailing list<br> <a \
href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br> <a \
href="https://mail.kde.org/mailman/listinfo/kwrite-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
<br></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic