Perforce Plugin - Trouble with environment in execution of job?

Morten Volden mvolden2 at gmail.com
Tue Nov 16 10:23:21 UTC 2010


2010/11/15 Milian Wolff <mail at milianw.de>

> Morten Volden, 15.11.2010:
> > Hi All
> >
> > A little while ago I asked on this list about the status of a Perforce
> > plug-in for Kdevelop4. Since no one replied I take it that development on
> > such a plug-in is not going on at the moment. So I started writing a
> > perforce plug-in.
> >
> > My current status in short:
> > I have the plug-in loaded, and it will show in the context menu - So far
> so
> > good.
> >
> > The plugin overrides pure virtual functions in ICentralizedVersionControl
> > and in IBasicVersionControl. E.g. for the edit function I do something
> like
> > this:
> >
> > KDevelop::VcsJob* perforceplugin::edit(const KUrl& localLocation)
> > {
> >     QFileInfo fsObject(localLocation.toLocalFile());
> >     QString filename(fsObject.fileName());
> >     QDir path(fsObject.dir());
> >
> >     DVcsJob* job = new DVcsJob(path, this, KDevelop::OutputJob::Verbose);
> >     if(job)
> >         kDebug() << "After Creating job, the path is " << path.path() <<
> > "and the filename is " << filename << "... And the jobs dir is: " <<
> > job->directory().path();
> >     *job << "p4" << "edit" << filename;
> >     return job;
> > }
> >
> > When Trying to edit one of the files in my perforce testbed the kDebug
> > gives me the following output:
> >
> > perforceplugin::edit: After Creating job, the path is
> > "/home/mvo/testbed/perforcetest" and the filename is  "main.cpp" ... And
> > the jobs dir is:  "/home/mvo/testbed/perforcetest"
> >
> > Which leads me to believe the DVcsJob I am creating has the correct CWD
> > (i.e. /home/mvo/testbed/perforcetest ). However, the command issued by
> the
> > job fails for reasons that escape me (as can be seen in the screenshot
> > below).
> >
> > http://imagebin.ca/view/89faihm.html
> >
> > The perforce server and port are specified in the file p4config.txt (p4
> > will look for its settings in a file of that name).
> >
> > If I issue the same command in a kdevelop konsole, it works (see konsole
> > window in screenshot below)
> >
> > http://imagebin.ca/view/G4zUSuW.html
> >
> > Can anyone shed some light on what the difference is between the command
> in
> > the DvcsJob and the command issued in the terminal?
>
> this looks strange indeed. You should try debugging DVcsJob::start and see
> whether e.g. setting the environment has an effect on the workingdir set
> for
> the process.
>
> Otherwise maybe Aleix has some info as he worked on the git support.
>
> Hope we can find out why this is not working :)
>
> Btw, where do we find your sourcecode? It would be cool if you could
> develop
> that in the open from the start, esp. so we can look at your sources when
> you
> have a problem.
>
> I will try to place the code somewhere public tonight.

Where is the preferred place to put plugin code these days?

/Morten

bye
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101116/12bf77bd/attachment.html>


More information about the KDevelop-devel mailing list