r43756 - /scripts/KGB/client/KGB_sendcommit

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sun Sep 6 08:10:44 UTC 2009


Author: dmn
Date: Sun Sep  6 08:10:37 2009
New Revision: 43756

URL: http://svn.debian.org/wsvn/?sc=1&rev=43756
Log:
omit flags if the change is a mere modification

rationale is that modifications are the most of the changes and special flags
better note exceptions (i.e. prop mods, add, delete)

Modified:
    scripts/KGB/client/KGB_sendcommit

Modified: scripts/KGB/client/KGB_sendcommit
URL: http://svn.debian.org/wsvn/scripts/KGB/client/KGB_sendcommit?rev=43756&op=diff
==============================================================================
--- scripts/KGB/client/KGB_sendcommit (original)
+++ scripts/KGB/client/KGB_sendcommit Sun Sep  6 08:10:37 2009
@@ -198,9 +198,16 @@
 
 sub change2text {
     my $c = shift;
-    my $path = $c->{path};
-    $path =~ s,^/,,;
-    return "(" . $c->{action} . $c->{prop_change} . ")" . $path;
+    my $a = $c->{action};
+    my $pc = $c->{prop_change};
+    my $p = $c->{path};
+
+    my $text = '';
+    # ignore flags for modifications (unlless there is also a property change)
+    $text = "($a$pc)" if $a ne 'M' or $pc;
+    $p =~ s,^/,,;       # strip leading slash from paths
+    $text .= $p;
+    return $text;
 }
 
 # v1 protocol




More information about the Pkg-perl-cvs-commits mailing list