[Ultrapossum-cvs 1122] utils/misc/ldifdiff 1.18,1.19,ldifdiff

Back to archive index

Masato Taruishi taru****@users*****
2004年 11月 11日 (木) 18:34:49 JST


===================================================================
RCS file: utils/misc/ldifdiff/ldifdiff,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- utils/misc/ldifdiff/ldifdiff	2004/11/11 08:59:06	1.18
+++ utils/misc/ldifdiff/ldifdiff	2004/11/11 09:34:49	1.19
@@ -84,7 +84,7 @@
 }
 
 sub debug {
-# print STDERR join('\n', @_ );
+ print STDERR join('\n', @_ ) if $ENV{DEBUG};
 }
 
 my $exattrs = "";
@@ -156,8 +156,8 @@
   ( my $oldentry, my $newentry, my $oldentry_decode, my $newentry_decode, my $dn, my $modfh ) = @_;
 
   debug "different: $dn\n";
-  debug "$oldentry_decode\n";
-  debug "$newentry_decode\n";
+  debug "[$oldentry_decode]\n";
+  debug "[$newentry_decode]\n";
 
   my %oldattr = ();
   my %oldattr_decode = ();
@@ -172,7 +172,7 @@
     debug "adding old attr: $_ for $dn\n";
     if ( $_ =~ /(([^:]+)(:+)\s*.+)/ ) {
       $oldattr{$2} = "" if ! $oldattr{$2};
-      $oldattr{$2} = $oldattr{$2} . $1;
+      $oldattr{$2} = $oldattr{$2} . $1 . "\n";
     } else {
       print STDERR "Unsupported ldif format: $_\n";
     } 
@@ -191,7 +191,7 @@
     debug "adding new attr: $_ for $dn\n";
     if ( $_ =~ /(([^:]+)(:+)\s*.+)/ ) {
       $newattr{$2} = "" if ! $newattr{$2};
-      $newattr{$2} = $newattr{$2} . $1;
+      $newattr{$2} = $newattr{$2} . $1 . "\n";
     } else {
       print STDERR "Unsupported ldif format: $_\n";
     } 
@@ -211,7 +211,7 @@
     if( ! $newattr{$_} ) {
       debug "attr delete: $_\n";
       print $modfh "delete: $_\n";
-      print "-\n";
+      print $modfh "-\n";
     } else {
       if( !($oldattr_decode{$_} eq $newattr_decode{$_}) ) {
         debug "attr modify: $_ -> $newattr{$_}\n";



Ultrapossum-cvs メーリングリストの案内
Back to archive index