[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:       Christoph Cullmann <cullmann () absint ! com>
Date:       2015-11-02 19:28:30
Message-ID: 1092787020.2542.1446492510853.JavaMail.zimbra () absint ! com
[Download RAW message or body]

Hi,

;) Cool!

First: I think its best to hand in the patches at reviewboard.kde.org, then we
can more easily discuss them with others ;=)

For the second thing, about how to indicate the status and the returned QStringList:

The string list was the first idea to get it working as I created that stuff.

Perhaps it would make more sense to directly fill the mode or return at least
model items that can be used later for construction of that, then one could
just set a good icon name or style for the text for the files in question.

ATM that string => model item stuff is happening after the file list creation
in the worker.

Greetings
Christoph

----- Am 2. Nov 2015 um 18:54 schrieb Valentin Rouet v.rouet@gmail.com:

> Thanks for the positive feedback,
> 
> I've started to work on it, and have already come up with the first part, which
> is displaying the new staged files in the list (see patch attached).
> Now for the second part, I agree that it would be good to display those files in
> some distinctive way (and actually it would also be quite nice to use the
> opportunity to have a style for all existing files which are currently
> different from HEAD, which the libgit2 function I used also returns). The
> problem there is I'm not really familiar with Qt, and don't really know where
> to look in order to set the font style of the files in the list. Can someone
> provide me with some guidance on this? Also, the way I see it, it might require
> the files object returned by the Worker to be something more than a simple
> QStringList, to be able to associate some metadata about each file, and not
> have to check again for each file when processing the list.
> 
> Valentin
> 
> On Mon, Nov 2, 2015 at 4:35 PM, Christoph Cullmann < cullmann@absint.com >
> wrote:
> 
> 
> Hi,
> 
>> Great, thanks for applying my patch.
> thanks for providing it!
> 
>> 
>> 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.
> I think it would be nice, too, if there is some visual indication that they are
> still
> not "tracked" like different font style or icon overlay ;=)
> 
> Definitely a good idea, patches welcome ;=)
> 
> Greetings
> Christoph
> 
>> 
>> 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
>> 
>> 
>> 
>> _______________________________________________
>> 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
> 
> 
> _______________________________________________
> 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

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

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