[Po4a-commits] r2256 - in /trunk: README.maintainers lib/Locale/Po4a/Po.pm po4a

barbier-guest at users.alioth.debian.org barbier-guest at users.alioth.debian.org
Thu Sep 23 19:07:39 UTC 2010


Author: barbier-guest
Date: Thu Sep 23 19:07:35 2010
New Revision: 2256

URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2256
Log:
Do no more generate backups for PO files

The --no-backups and --rm-backups flags are kept
for now, but do nothing.

Modified:
    trunk/README.maintainers
    trunk/lib/Locale/Po4a/Po.pm
    trunk/po4a

Modified: trunk/README.maintainers
URL: http://svn.debian.org/wsvn/po4a/trunk/README.maintainers?rev=2256&op=diff
==============================================================================
--- trunk/README.maintainers (original)
+++ trunk/README.maintainers Thu Sep 23 19:07:35 2010
@@ -100,13 +100,13 @@
 A typical dist rule could then be:
 
 dist:
-	po4a --rm-backups <package>.cfg
+	po4a <package>.cfg
 	...
 
 If automake is used, the following could also be used.
 
 dist-hook:
-	po4a --rm-backups <package>.cfg
+	po4a <package>.cfg
 	...
 
 
@@ -121,13 +121,13 @@
 
 clean:
 	# Update the POT and POs
-	cd <...>/po4a && po4a --no-translations --rm-backups <package>.cfg
+	cd <...>/po4a && po4a --no-translations <package>.cfg
 	# Delete translated documentation
 	rm -rf <...>/translated
 
 build:
 	# Generate the translations
-	cd <...>/po4a && po4a --rm-backups <package>.cfg
+	cd <...>/po4a && po4a <package>.cfg
 
 However, you should try to avoid distribution-specific build systems, to
 ensure the portability of your software.

Modified: trunk/lib/Locale/Po4a/Po.pm
URL: http://svn.debian.org/wsvn/po4a/trunk/lib/Locale/Po4a/Po.pm?rev=2256&op=diff
==============================================================================
--- trunk/lib/Locale/Po4a/Po.pm (original)
+++ trunk/lib/Locale/Po4a/Po.pm Thu Sep 23 19:07:35 2010
@@ -511,12 +511,6 @@
             my ($atime, $mtime) = (time,time);
             utime $atime, $mtime, $old_po;
         } else {
-            if ($backup) {
-                copy $old_po, $old_po."~"
-                    or die wrap_msg(dgettext("po4a","Can't copy %s to %s: %s."),
-                                    $old_po, $old_po."~", $!);
-            } else {
-            }
             move $new_po, $old_po
                 or die wrap_msg(dgettext("po4a","Can't move %s to %s: %s."),
                                 $new_po, $old_po, $!);

Modified: trunk/po4a
URL: http://svn.debian.org/wsvn/po4a/trunk/po4a?rev=2256&op=diff
==============================================================================
--- trunk/po4a (original)
+++ trunk/po4a Thu Sep 23 19:07:35 2010
@@ -381,11 +381,13 @@
 
 =item --no-backups
 
-Do not generate the .po~ backup files.
+This flag does nothing since 0.41, and may be removed
+in later releases.
 
 =item --rm-backups
 
-Remove the .po~ backup files (implies --no-backups).
+This flag does nothing since 0.41, and may be removed
+in later releases.
 
 =item --translate-only I<translated-file>
 
@@ -664,7 +666,6 @@
 
     # The rm- options imply the no-
     $opts{"no-translations"} = 1 if $opts{"rm-translations"};
-    $opts{"no-backups"} = 1 if $opts{"rm-backups"};
 
     if (defined $opts{"srcdir"} and not -d $opts{"srcdir"}) {
         die wrap_msg(gettext("Invalid %s. Directory %s does not exist."),
@@ -1271,9 +1272,7 @@
 	    if ($po4a_opts{"verbose"});
 	my $msgmerge_opt = $po4a_opts{"msgmerge-opt"};
 	$msgmerge_opt =~ s/\$lang\b/$lang/g if scalar @langs;
-	my $cmd = "msgmerge -U ".$po_filename{$lang}." $pot_filename ".$msgmerge_opt.
-	          (($po4a_opts{"no-backups"}||$po4a_opts{"split"})?
-	           " --backup=none":"");
+	my $cmd = "msgmerge -U ".$po_filename{$lang}." $pot_filename ".$msgmerge_opt." --backup=none";
 	run_cmd($cmd);
 	system "msgfmt --statistics -v -o /dev/null ".$po_filename{$lang}
 	    if $po4a_opts{"verbose"};
@@ -1339,18 +1338,8 @@
             unless ($po4a_opts{"force"}) {
                 move_po_if_needed($tmp_file,
                                   $split_po{$lang}{$master},
-                                  $po4a_opts{"no-backups"}?0:1);
+                                  0);
             } else {
-                if (    -f $split_po{$lang}{$master}
-                    and not $po4a_opts{"no-backups"}) {
-                    copy $split_po{$lang}{$master},
-                         $split_po{$lang}{$master}."~"
-                        or die wrap_msg(dgettext("po4a",
-                                                 "Can't copy %s to %s: %s."),
-                                        $split_po{$lang}{$master},
-                                        $split_po{$lang}{$master}."~",
-                                        $!);
-                }
                 move $tmp_file, $split_po{$lang}{$master}
                     or die wrap_msg(dgettext("po4a",
                                              "Can't move %s to %s: %s."),
@@ -1360,19 +1349,6 @@
             }
         }
     }
-    chdir $po4a_opts{"calldir"}
-	if (defined $po4a_opts{"srcdir"});
-}
-
-if ($po4a_opts{"rm-backups"}) {
-    chdir $po4a_opts{"srcdir"}
-	if (defined $po4a_opts{"srcdir"});
-
-    # Delete the .po~ backup files generated by msgmerge
-    foreach $lang (sort keys %po_filename) {
-	unlink $po_filename{$lang}."~";
-    }
-
     chdir $po4a_opts{"calldir"}
 	if (defined $po4a_opts{"srcdir"});
 }




More information about the Po4a-commits mailing list