1523: SCMTool for Subversion fail to collapse 'keyword' correctly

beach******@gmai***** (Google Code) (Is this you? Claim this profile.)
May 21, 2010
Sorry for my double post. Please remove issue #1522.

What version are you running?
 * 1.5 beta1

What's the URL of the page containing the problem?
 * intranet URL

What steps will reproduce the problem?
1. commit a file including a string '$Id:'
2. post a review with that file

reviewboard puts an error message of an error of 'patch' command.

What is the expected output? What do you see instead?

Correct diffs.

What operating system are you using? What browser?

Server: Ubuntu 8.04.01

Please provide any additional information below.

Here is a patch:
Index: reviewboard/scmtools/svn.py
--- reviewboard/scmtools/svn.py	(revision 32)
+++ reviewboard/scmtools/svn.py	(working copy)
@@ -169,7 +169,7 @@
                     for name in keyword_str.split(" ")
                     for keyword in self.keywords.get(name, [])]
-        return re.sub(r"\$(%s):(:?)([^\$]+)\$" % '|'.join(keywords),
+        return re.sub(r"\$(%s):(:?)([^\$\n\r]+)\$" % '|'.join(keywords),
                       repl, data)

The original regex matches multiple lines if subversion's keyword
substitution doesn't end with '$' by mistake.
This patch works for me because I think the keyword substitution shouldn't
extend over multiple lines, but I'm not sure other people agree with me.

Thank you
#2 chipx86
  • +Confirmed
  • +Milestone-Release1.5
#3 chipx86
Thanks. In the future, please post review requests to http://reviews.reviewboard.org/.

I've committed this to master (71e9f5c). If you'll give me your name, I'll add you to
our AUTHORS list.
  • -Confirmed
  • +chipx86
#4 beach******@gmai***** (Google Code) (Is this you? Claim this profile.)
Thank you for your kind offer! My name is Masakazu HAMAJI.