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. > 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 > - 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. 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 ? e.g. if you checkout Scmbug from CVS right now and run: $ scmbug_merge --commit-bugs=1 --merge-bugs=15 --scm=Subversion --repository=/tmp/testsuite_repository --base-label=p_kpm_somelabel --product=TestProduct you'll see that you get back the list of affected files for bug 15. The way I envisioned things, you should be extending src/lib/product/Tools/Merge.pm.in to do the remaining of the merging work. > <?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 = "subversion_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 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 "TortoiseProc.exe /command:diff /path:\"".$file1_save."\" > /path2:\"".$file2_save."\"\r\n"; > 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"; > > > ?> > _______________________________________________ scmbug-users mailing list [email protected] http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users
