[interchange-cvs] interchange - heins modified dist/lib/UI/usertag/diff.tag
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Sat Oct 6 02:44:01 2001
User: heins
Date: 2001-10-06 06:43:34 GMT
Modified: dist/lib/UI/usertag diff.tag
Log:
* Minor enhancement to translate \r to \n.
* Not for stable tree, though I bet it doesn't matter.
Revision Changes Path
2.1 +7 -2 interchange/dist/lib/UI/usertag/diff.tag
rev 2.1, prev_rev 2.0
Index: diff.tag
===================================================================
RCS file: /anon_cvs/repository/interchange/dist/lib/UI/usertag/diff.tag,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- diff.tag 2001/07/18 02:22:15 2.0
+++ diff.tag 2001/10/06 06:43:34 2.1
@@ -20,7 +20,9 @@
my $col = $2;
my $key = $3;
$currfn = "tmp/$Vend::SessionName.current";
- Vend::Util::writefile(">$currfn", tag_data($table, $col, $key));
+ my $data = tag_data($table, $col, $key);
+ $data =~ s/\r\n?/\n/g if $opt->{ascii};
+ Vend::Util::writefile(">$currfn", $data);
}
else {
$currfn = $curr;
@@ -30,11 +32,14 @@
my $col = $2;
my $key = $3;
$prevfn = "tmp/$Vend::SessionName.previous";
- Vend::Util::writefile(">$prevfn", tag_data($table, $col, $key));
+ my $data = tag_data($table, $col, $key);
+ $data =~ s/\r\n?/\n/g if $opt->{ascii};
+ Vend::Util::writefile(">$prevfn", $data);
}
else {
$prevfn = $prev;
}
+#Debug("diff command: 'diff $opt->{flags} $prevfn $currfn'");
return `diff $opt->{flags} $prevfn $currfn`;
}
EOR