]> granicus.if.org Git - docbook-dsssl/commitdiff
deal with subjects that have linebreaks in them or that end with the revision number
authorMichael Smith <xmldoc@users.sourceforge.net>
Sat, 5 Apr 2008 12:53:32 +0000 (12:53 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Sat, 5 Apr 2008 12:53:32 +0000 (12:53 +0000)
contrib/tools/svn2twitter/svn2twitter

index 4d1d8eb6a44150f94e9e526910406666b692233b..e3ea4ff1913bfd9c12b5cf439c3961b713db1933 100755 (executable)
@@ -23,10 +23,13 @@ my $webvcsurl   = shift @ARGV;
 my $subject     = shift @ARGV;
 my $twitteruser = shift @ARGV;
 my $twitterpass = shift @ARGV;
+
+$subject =~ tr/\n/ /;
 my $revision    = $subject;
 
 # parse out just the [NNNN] revision number from the Subject
-$revision =~ s/^.+\[([0-9]+)\] .+$/$1/;
+$revision =~ s/^.+\[([0-9]+)\].*$/$1/;
+#print "$revision\n";
 
 my $revs = SVN::Log::retrieve ($repository, $revision);