[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ddts-script 0.4.6



Bonjour,

journal des modifications :
version 0.4.6
  - add: example values for config file in manpage
    thanks to Christophe Mertz for reporting this missing feature
  - bug fix:
    - add: remove `*~$' files (emacs temp files) in `$bug_dir' ans `rev_dir'
      thanks to Nicolas Sabouret for reporting this bug
    - change: spelling in manpage
      thanks to Christophe Mertz for reporting this bug
    - change: write correct diff for short desc in `parse_review'
      thanks to Vincent Haverlant for reporting this bug

La rustine est attachée, le script complet n'a pas bougé :
http://perso.wanadoo.fr/nico.bertol/ddts/ddts-script.txt


Nicolas
-- 
--- ddts-script_0.4.5.txt	Sat Jan  5 11:05:55 2002
+++ ddts-script_0.4.6.txt	Tue Jan  8 00:01:49 2002
@@ -111,7 +111,7 @@
 
 Rename the F<package.bug> file in your F<bug_dir> directory into F<package.fix>.
 
-Edit it with your favarite text editor. It contains all changes and comments of
+Edit it with your favorite text editor. It contains all changes and comments of
 the reviewers.
 
 Select the lines you want to keep. Change the first character of the line into
@@ -183,20 +183,29 @@
 
 =head1 CONFIG FILE
 
-This is your F<~/.ddts-script> file, it MUST contain the following variables:
+This is your F<~/.ddts-script> file.
+
+It contains lines to define variables:
+
+$I<variable_name> = 'I<variable_value>';
+
+Some sample values are provided into square brackets, they should be suitable
+for most installations.
+
+The file MUST contain the following variables:
 
 
 directories (must be different from each other):
 
 =over 4
 
-=item I<$tr_dir>, directory for translations
+=item I<$tr_dir>, directory for translations [$ENV{HOME}/ddts/tr]
 
-=item I<$rev_dir>, directory for reviews
+=item I<$rev_dir>, directory for reviews [$ENV{HOME}/ddts/rev]
 
-=item I<$bug_dir>, directory for bug reports
+=item I<$bug_dir>, directory for bug reports [$ENV{HOME}/ddts/bug]
 
-=item I<$temp_dir>, directory for temporary files
+=item I<$temp_dir>, directory for temporary files [/tmp]
 
 =back
 
@@ -204,21 +213,21 @@
 
 =over 4
 
-=item I<$todo_e>, extension for descriptions to work on
+=item I<$todo_e>, extension for descriptions to work on [todo]
 
-=item I<$tr_e>, extension for translated descriptions
+=item I<$tr_e>, extension for translated descriptions [tr]
 
-=item I<$rev_e>, extension for reviewed descriptions
+=item I<$rev_e>, extension for reviewed descriptions [rev]
 
-=item I<$bug_e>, extension for bug reports mixing files
+=item I<$bug_e>, extension for bug reports mixing files [bug]
 
-=item I<$fix_e>, extension for fixed bug reports
+=item I<$fix_e>, extension for fixed bug reports [fix]
 
-=item I<$sent_e>, extension for descriptions sent to the ddts
+=item I<$sent_e>, extension for descriptions sent to the ddts [sent]
 
-=item I<$old_e>, extension for backup files
+=item I<$old_e>, extension for backup files [old]
 
-=item I<$ok_e>, extension for descriptions which passed the review process
+=item I<$ok_e>, extension for descriptions which passed the review process [ok]
 
 =back
 
@@ -226,21 +235,21 @@
 
 =over 4
 
-=item I<$comment>, comment string for review, a space character will be added to this string
+=item I<$comment>, comment string for review, a space character will be added to this string [>>]
 
-=item I<$debug>, verbosity level (see below)
+=item I<$debug>, verbosity level (see below) [1]
 
-=item I<$editor>, editor command, must contain `B<%s>' for the filename
+=item I<$editor>, editor command, must contain `B<%s>' for the filename [$ENV{EDITOR} %s]
 
 =item I<$mail_addr>, your email address
 
 =item I<$mail_from>, the mail address you want the ddts to answer to
 
-=item I<$mail_self>, set to `B<yes>' if your want to be sent a copy of outgoing mail
+=item I<$mail_self>, set to `B<yes>' if your want to be sent a copy of outgoing mail [yes]
 
-=item I<$mail_enc>, mail encoding for mime
+=item I<$mail_enc>, mail encoding for mime [8bit]
 
-=item I<$mail_charset>, mail charset for mime
+=item I<$mail_charset>, mail charset for mime [iso-8859-1]
 
 =back
 
@@ -268,7 +277,7 @@
 
 =cut
 
-my $version = "0.4.5";
+my $version = "0.4.6";
 
 # Test if configuration as been made
 foreach ($tr_dir, $bug_dir, $rev_dir, $temp_dir) {
@@ -831,13 +840,13 @@
 				$todo = &get_header("$rev_dir/$package")
 		  		       ."Description: $description";
 				my @diff = split ("\n", &superdiff($original, $reviewed));
-				if ($diff[0] =~ /^$comment-/) {
-					$diff[0] =~ s/^$comment-//;
-					$diff[1] =~ s/^$comment\+//;
-					$todo .= "$comment-Description-$langage\: ".$diff[0]."\n"
-					        ."$comment+Description-$langage\: ".$diff[1]."\n";
-					shift @diff;
-					shift @diff;
+				if ($diff[0] =~ /^$comment-/) {						# short desc has been modified
+					$diff[0] =~ s/^$comment-//		;			# remove diff tag
+					$todo .= "$comment-Description-$langage\: ".$diff[0]."\n";	# add old short desc
+					($diff[0]) = grep(/^$comment\+\S/, @diff);			# get new short desc
+					$diff[0] =~ s/^$comment\+//;					# remove diff tag
+					$todo .= "$comment+Description-$langage\: ".$diff[0]."\n";	# add new short desc
+					@diff = grep(/^($comment[+-])? /, @diff);			# keep long desc
 				} else {
 					$todo .= "Description-$langage\: ";
 				}
@@ -1333,12 +1342,14 @@
 		next if /^\./;
 
 		&remove_file("$bug_dir/$_") if /\.$old_e$/;
+		&remove_file("$bug_dir/$_") if /\~$/;
 	}
 
 	foreach (&ls_dir($rev_dir)) {
 		next if /^\./;
 
 		&remove_file("$rev_dir/$_") if /\.$old_e$/;
+		&remove_file("$rev_dir/$_") if /\~$/;
 
 		s/\..*$//;
 		if (-e "$rev_dir/$_.$todo_e") {

Reply to: