in reply to Using grep on windows

You've got a number of major problems.

Fix:

use strict; use warnings; my ($repo_path, $txn_name) = @ARGV; my $svnlook = "D:\\Subversion\\bin\\svnlook.exe"; my $committer = `$svnlook author $txn_name $repo_path` or die("Unable to get committer with svnlook.\n"); chomp($committer); my $commitlog = `$svnlook log $txn_name $repo_path` or die("Unable to get log message with svnlook.\n"); my ($cnr_number) = $commitlog =~ /^(CNR[0-9]+)/m or die("You must enter a valid CNR\n");

Replies are listed 'Best First'.
Re^2: Using grep on windows
by rogermills (Initiate) on Oct 27, 2009 at 20:56 UTC
    Well now i know i have a long way to go..... Now the problem is all commits are getting rejecting even those which have a valid issue number at the start of the log message. Like CNR12345
      Is "CNR12345" at the very start of a line? That's what my regex pattern checks for.
        yes.. but it will reject all commits even if it has a CNR Log mesasge is like this CNR12345 Whatever message
        yes it is at the start of the comment. But it doesn't work even if u put log message manually. Here is the comment in the log message "CNR12345 commit to hook check"