DVCS-Git No output executing git log in project dir

Evgeniy Ivanov powerfox at kde.ru
Fri Oct 3 21:10:16 UTC 2008


Uwe Kaiser wrote:
> When you execute the git log command on the project directory the DVCSjob
> produces this       git log '' 
> But git does not work with this input.  
> I add a check to GitExecutor::log if info.fileName() is empty. 
> Eclosed the patch.
> It works, but I don't know if  it is the right way to fix the problem.

Thanks for pointing to this. It's a problem of all executors :(
There always should be an url, because it is used to set working dir to
execute dvcs-commands.
If the working dir is not set application method should ASSERT or return 0.
But "git log Empty KUrl" works for me fine. I've added a test for it.
Since job shouldn't run if url is empty, I don't commit the patch.
Also manual testing has shown «git log ''» and «git log ""» works fine.
It might be a qt bug (I did a bugreport). See,
    QFileInfo fi("/tmp/somedir");
    qDebug() << fi.fileName();
    QFileInfo fi2("/tmp/somedir/");
    qDebug() << fi2.fileName();
I've found it's caused by cute hg/bzr executor-style function:
QString QAbstractFileEngine::fileName(FileName file) const
{
    Q_UNUSED(file);
    return QString();
}
I should become Qt developer, they have stolen my idea how to implement
important things :)


Question to list: can I ASSERT there? It's dangerous for the KDevelop.
But we will 100% know if something is broken.

-- 
Cheers, Evgeniy.
Key fingerprint: F316 B5A1 F6D2 054F CD18 B74A 9540 0ABB 1FE5 67A3





More information about the KDevelop-devel mailing list