in reply to Re^3: Find svn log revisions with log message matching a given string
in thread Find svn log revisions with log message matching a given string

C:\Users\HP>svn log --limit 10 https://mySVN | perl -ne "BEGIN{$/="-"x +72; $re = shift} print"$r\n"if((($r) =split)&&/$re/)" 2.5996485
Backslash found where operator expected at -e line 1, near "$r\" (Missing operator before \?) Can't use an undefined value as a symbol reference at -e line 1, <> chunk 1.

  • Comment on Re^4: Find svn log revisions with log message matching a given string
  • Download Code

Replies are listed 'Best First'.
Re^5: Find svn log revisions with log message matching a given string
by choroba (Cardinal) on May 21, 2014 at 08:53 UTC
    Not sitting at a MSWin machine, but I'd try
    perl -ne "BEGIN{ $/ = '-' x 72; $re = shift } print qq($r\n) if (($r) += split) && /$re/" 2.5996485
    whatever it does.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Wow. Thanks. This works. Do you know if you can explain how the statement works.
        First, it runs the BEGIN block. It sets the input record separator to 72 dashes and reads the argument (2.59...) to $re.
        Then, it reads the svn log entry by entry, and if it matches $re, it prints the first word ($r) from it.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ