Andreas Pakulat apaku at gmx.de
Tue Jun 17 12:42:35 UTC 2008

On 17.06.08 15:21:27, Evgeniy Ivanov wrote:
> Andreas Pakulat wrote:
>> On 16.06.08 18:38:56, Evgeniy Ivanov wrote:
>>> @@ -282,6 +282,7 @@
>>>      QStringList entries = dir->entries();
>>>      kDebug(9010) << "entries:" << entries.join(",");
>>>  +    //TODO: if we use DVCS we don't require it, if tdir used some 
>>> unrequired copies are done...
>> I can't understand this comment.
> As I understand current algorithm is so: create tdir and unpack the  
> archive with a template (line 174, createProject()) to the tdir and then  
> to copy files from this tmpdir to the destination dir (line 308, which  
> is another tdir in VCS case). For DVCS we can unpack files directly to  
> the project's dir.
> I'm not strong in VCS, but I think even for VCS we can use another way:  
> why do we unpack it to the tdir created in the unpackArchive() and then  
> copy to the another tdir created in the createProject()? We use unpack  
> to tdir1 -> copy to tdir2 -> import tdir2, what about unpacking to tdir1  
> -> importing tdir1 or unpacking to projDir in DVCS case?

If you look closer you'll see that the tdir is only used when unpacking
files and the reason is that the files need to have some macro replacing
done on them. And to not have to read this file more than once after
unpacking, the macro expansion is done during copying the file (that
reminds me, copyFile isn't the best name for that function). Also the
tempdir allows for easier removal of the initial unpacked files (which
need macro expansion on their content and name), because I can just
unlink the whole directory instead of deleting the un-expanded files


You will never know hunger.

More information about the KDevelop-devel mailing list