[interchange-cvs] interchange - jon modified dist/lib/UI/usertag/diff.tag

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Fri Nov 2 04:25:01 2001


User:      jon
Date:      2001-11-02 09:24:14 GMT
Modified:  dist/lib/UI/usertag diff.tag
Log:
Support unified diff format option, and don't clobber other passed
flags when selecting unified or context option.

Revision  Changes    Path
2.2       +5 -3      interchange/dist/lib/UI/usertag/diff.tag


rev 2.2, prev_rev 2.1
Index: diff.tag
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/usertag/diff.tag,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -u -r2.1 -r2.2
--- diff.tag	2001/10/06 06:43:34	2.1
+++ diff.tag	2001/11/02 09:24:14	2.2
@@ -4,13 +4,15 @@
 UserTag diff Routine <<EOR
 sub {
     my ($curr, $prev, $opt) = @_;
-    if($opt->{context}) {
-        $opt->{flags} = ' -c';
-    }
+
+	$opt->{flags} .= ' -c' if $opt->{context};
+	$opt->{flags} .= ' -u' if $opt->{unified};
+
     unless($opt->{flags} =~ /^[-\s\w.]*$/) {
         Log("diff tag: Security violation with flags: $opt->{flags}");
         return "Security violation with flags: $opt->{flags}. Logged.";
     }
+
     my $currfn;
     my $prevfn;
     my $codere = '[-\w#/.]+';