sureshvv / reviewboard

Automatically exported from code.google.com/p/reviewboard
0 stars 0 forks source link

spaces break post-review (at least for svn) #510

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

attempt to 'post-review (path with a space)'

What is the expected output? What do you see instead?
- normal operation
- failures for svn diff and svn info

Index: post-review
===================================================================
--- post-review (revision 1385)
+++ post-review (working copy)
@@ -711,7 +711,7 @@
     def svn_info(self, path):
         """Return a dict which is the result of 'svn info' at a given path."""
         svninfo = {}
-        for info in execute("svn info " + path).splitlines():
+        for info in execute("svn info '%s'" % path).splitlines():
             parts = info.split(": ", 1)
             if len(parts) == 2:
                 key, value = parts
@@ -1527,6 +1527,7 @@
         diff = tool.diff_between_revisions(options.revision_range)
         parent_diff = None
     else:
+        args = ["'%s'" % arg for arg in args] # quote filenames
         diff, parent_diff = tool.diff(args)

     if options.output_diff_only:

Original issue reported on code.google.com by travis.c...@gmail.com on 10 Jun 2008 at 6:42

GoogleCodeExporter commented 9 years ago
Index: post-review
===================================================================
--- post-review (revision 1413)
+++ post-review (working copy)
@@ -711,7 +711,7 @@
     def svn_info(self, path):
         """Return a dict which is the result of 'svn info' at a given path."""
         svninfo = {}
-        for info in execute("env LANG=en_US.UTF-8 svn info " + 
path).splitlines():
+        for info in execute("env LANG=en_US.UTF-8 svn info '%s'" % 
path).splitlines():
             parts = info.split(": ", 1)
             if len(parts) == 2:   
                 key, value = parts
@@ -1528,6 +1528,7 @@
         diff = tool.diff_between_revisions(options.revision_range)
         parent_diff = None
     else:
+        args = ["'%s'" % arg for arg in args] # quote filenames
         diff, parent_diff = tool.diff(args)

     if options.output_diff_only:

Original comment by travis.c...@gmail.com on 25 Jul 2008 at 7:39

GoogleCodeExporter commented 9 years ago
Can you put this up on http://reviews.review-board.org/ ? It's easier for us to 
keep
track of it.

Thanks

Original comment by chip...@gmail.com on 25 Jul 2008 at 9:00

GoogleCodeExporter commented 9 years ago
up as 470

Original comment by travis.c...@gmail.com on 25 Jul 2008 at 9:15

GoogleCodeExporter commented 9 years ago
Fixed in r1415. Thanks!

Original comment by trowb...@gmail.com on 30 Jul 2008 at 8:08