Kristis Makris <[EMAIL PROTECTED]> napisał(a):
> On Mon, 2006-11-27 at 13:27 +0100, [EMAIL PROTECTED] wrote:
>> Hi
>> I’m finishing implementing the second solution for linking mantic -> 
>> subversion but I think it is up to you to decide which solution is the 
>> best 
>> from designing point of view:
>> 1)   We can modify sub prepare_log_message, or even better - customize 
>> some 
>> of the format applied there in a gluer configuration file so render 
>> http 
>> linking possible
>> + can be used for all bugtracking systems with small changes
> 
> Actually, http linking won't be possible that way, if I'm understanding
> what you are saying correctly. The bug-tracking systems themselves must
> support parsing the affected list of files and autolinking them.
> 
> The reason is that if you change prepare_log_message to produce
> something like:
> 
> Affected files:
> --------------:
> 
> <a href="http:/some.url/something.cgi?1.4">1.4</a> -> ...
> 
> then, bugzilla for example, won't make this show up as:
> 
> 1.4 -> ...
> 
> with "1.4" being hyperlinked. They don't do that as a general policy in
> order to avoid cross-site scripting attacks. I don't know what's the
> case with Mantis, but they might be implementing a similar security
> policy.
> 
OK. Granted.

>> 2)   We can reparse bugnote_view_inc.php in mantis
>> + can be used for entries already in the database
> 
> That sounds a lot better. A patch was already submitted in their system
> by Dirk that attempts to do that:
> 
> http://bugs.mantisbt.org/view.php?id=6368
> 
> in particular: 
> 
> http://bugzilla.mkgnu.net/attachment.cgi?id=97
OK I reused some of their code.


>> -    we must merge with each mantis release
>> 
>> Let me know what you would like to see as the target solution. Both 
>> mentioned by me are complementary in a way.
> 
> I'd go with the second option.
> 
>> So far simple test script for the batch file for comparing files looks 
>> like 
>> this. I know I need to add tortoiseSVN patch search:
> 
> What is the "batch file for comparing files" is intented for ? I
> probably don't understand what you are doing.
OK - my intention is not only to show 2 versions from Mantis but also run 
TortoiseDiff on user machine with differences between two files - this is 
done by a batch file returned by php script - here it goes:

<?php
        //example usage: 
http://wawntdev1/battest.php?file1_path=subversion_test/trunk/A30BarMsg.cpp&file1_rev=11&file2_rev=2058

        //***************************************************
        //* Process & prepare data
        //***************************************************

        $batch_name = "tortoise_diff.bat";

        $svn_server = "svn://".$_SERVER["HTTP_HOST"];

        $file1_path = $_GET["file1_path"];
        $file1_name = substr(strrchr($file1_path , "/"), 1);
        

        $file1_rev = $_GET['file1_rev'];
        $file2_rev = $_GET['file2_rev'];
        
        $file1_save = "%TEMP%\\".$file1_name.".".$file1_rev;
        $file2_save = "%TEMP%\\".$file1_name.".".$file2_rev;



        //***************************************************
        //* Send batch file
        //***************************************************
        
        // Phase 0: Send Batch headers
        Header("Pragma: no-cache");
    Header("Content-Type: application/octet-stream");
    Header("Content-Location: ". $batch_name);
    Header("Content-Disposition: filename=". $batch_name);

        // Phase 0.9: Find Tortoise
        echo "@set reg_cmdM=reg query HKLM\Software\TortoiseSVN /v 
Directory\r\n";

        echo "@for /f \"usebackq tokens=3 delims=       \" %%i in 
(`%reg_cmdM%`) do set 
directory_path=%%i\r\n";

        
        echo "@cd %directory_path%\bin\r\n";
        echo "@echo directory_path=%directory_path%\r\n";

        // Phase 1: get files from the database
        echo "TortoiseProc.exe /command:cat /path:\"$svn_server/$file1_path\" 
/savepath:\"".$file1_save."\" /revision:$file1_rev\r\n";
        echo "TortoiseProc.exe /command:cat /path:\"$svn_server/$file1_path\" 
/savepath:\"".$file2_save."\" /revision:$file2_rev\r\n";        
        
        
        // Phase 2: Run diff
        echo "start /wait TortoiseMerge.exe \"".$file1_save."\" 
\"".$file2_save."\"\r\n";

        // Phase 3: Clean-up: Delete temporaty files
        echo "del $file1_save\r\n";
        echo "del $file2_save\r\n";


?>

 
> I was suggesting that you modify scmbug_merge to retrieve the list of
> affected files, and then extend it to commit in the base label the
> changes. To discover if the changes are already present in the base
> label, wouldn't it be enough to run "patch --dry-run < patchfile" and
> see the exit status ?
> 
I'll work with that starting since tomorrow. I just wanted to tune up 
mantis / tortoise linking before that.

Thanks for your help and assistance - let you know how it is going with 
incremental builds.

Best regards
marek



_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to