[taskjuggler] Re: Big project: define html reports in a common file for all projects?

From: Chris Schlaeger (cs_at_suse.de)
Date: Thu Aug 04 2005 - 17:24:53 CEST


From: Chris Schlaeger <cs@suse.de>
Message-Id: <20050804152453.34F582731024@einstein.suse.de>
Date: Thu,  4 Aug 2005 17:24:53 +0200 (CEST)
Subject: [taskjuggler] Re: Big project: define html reports in a common file for all projects?


h_dk wrote on Thu, 04 August 2005 07:46
> Hi Chris,
> Current working directory should be the directory of the calling file, not the directory of the included file.
>
> I'll see if upgrading fixes this.

That is unlikely. I've just looked at the 2.1.1 code in Report::open():

        QString absFileName = fileName;
        // Check if the fileName is not an absolute file name.
        if (fileName[0] != '/')
        {
            // Prepend the path of the file where the report was defined, so
            // relative report file names are always interpreted relative to
            // their definition.
            QString path;
            if (defFileName[0] == '/')
                path = defFileName.left(defFileName.findRev('/', -1) + 1);
            absFileName = path + fileName;
        }
        f.setName(absFileName);

This is how the include mechanism work in other places. I'm not sure if this is the wisest thing to do, but I hesitate to change this behavior without very good reason as it would break compatibility with older versions.

But making the report definition a macro and calling it with a parameter for the file name should work in your case. But keep in mind that if it's not an absolute file name, the current working directory of the file where the report is defined will be prepended. In case of a macro this is the macro call, not the macro definition.

Chris

--
TaskJuggler Developer
-- 
To unsubscribe, email the address listed in the List-Unsubscribe header
For additional commands, email: taskjuggler-help@suse.com


This archive was generated by hypermail 2.1.7 : Thu Aug 04 2005 - 17:24:58 CEST