Re: The specified diff file could not be parsed.
Hi Liam, This sounds like you're proxy server is being used for requests to your internal Review Board, which the proxy server is failing to access properly. I'm on the road so I can't give you exact details, but there's a command line option and configuration flag for telling RBTools to skip using your proxy server. --no-proxy, I want to say. Christian On Wednesday, February 18, 2015, Liam Reimers liam.reim...@gmail.com wrote: After fiddling with this some more, I ended up discarding the repo config and creating a new config as a Gitlab repo. This seems to have worked, however, when I try to post a review: 08:03 $ rbt post -g yes --bugs-closed 19788098 -d RBTools 0.7.1 Python 2.6.9 (unknown, Sep 9 2014, 15:05:12) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] Running on Darwin-14.1.0-x86_64-i386-64bit Home = /Users/user Current directory = /Users/user/Code/repo Checking for a Subversion repository... Running: svn info --non-interactive Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: E155007: '/Users/user/Code/repo' is not a working copy --- Checking for a Git repository... Running: git rev-parse --git-dir Running: git config core.bare Running: git rev-parse --show-toplevel Running: git symbolic-ref -q HEAD Running: git config --get branch.PR19788098.merge Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.merge'] --- Running: git config --get branch.PR19788098.remote Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.remote'] --- Running: git config --get remote.origin.url repository info: Path: https://gitlab/group/repo.git, Base path: , Supports changesets: False Making HTTP GET request to http://reviewboard/api/ Running: git rev-parse refs/heads/PR19788098 Running: git merge-base 3eea08c87f4ee336ec0d25108bc0224e7bbf5213 origin/master Running: git rev-parse 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8 Running: git status --porcelain --untracked-files=no Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8..3eea08c87f4ee336ec0d25108bc0224e7bbf5213 Making HTTP GET request to http://reviewboard/api/validation/diffs/ Cached response for HTTP GET http://reviewboard/api/validation/diffs/ expired and was modified Making HTTP POST request to http://reviewboard/api/validation/diffs/ Got HTTP error: 502: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlhead title502 Proxy Error/title /headbody h1Proxy Error/h1 pThe proxy server received an invalid response from an upstream server.br / The proxy server could not handle the request ema href=/api/validation/diffs/POSTnbsp;/api/validation/diffs//a/em.p Reason: strongError reading from remote server/strong/p/p hr addressApache/2.2.15 (Oracle) Server at reviewboard Port 80/address /body/html Traceback (most recent call last): File /usr/local/bin/rbt, line 8, in module load_entry_point('RBTools==0.7.1.dev', 'console_scripts', 'rbt')() File /Library/Python/2.6/site-packages/rbtools/commands/main.py, line 133, in main command.run_from_argv([RB_MAIN, command_name] + args) File /Library/Python/2.6/site-packages/rbtools/commands/__init__.py, line 538, in run_from_argv exit_code = self.main(*args) or 0 File /Library/Python/2.6/site-packages/rbtools/commands/post.py, line 670, in main (msg_prefix, e)) rbtools.commands.CommandError: Error validating diff HTTP 502 -- -- Christian Hammond - christ...@beanbaginc.com Review Board - http://www.reviewboard.org Beanbag, Inc. - http://www.beanbaginc.com -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: The specified diff file could not be parsed.
Mounting the git repository using NFS, and accessing it directly using the Path field in setup and clearing out the Mirror Path, my issue appears to be resolved. Thanks! On Monday, February 16, 2015 at 10:53:02 AM UTC-8, Jonathan Anderson wrote: Now that I know what was wrong with my configuration, I was able to find the appropriate documentation. Not sure whether I should have seen this going through the first time and just missed it. https://www.reviewboard.org/docs/manual/1.5/admin/management/repositories/#local-clone https://www.google.com/url?q=https%3A%2F%2Fwww.reviewboard.org%2Fdocs%2Fmanual%2F1.5%2Fadmin%2Fmanagement%2Frepositories%2F%23local-clonesa=Dsntz=1usg=AFQjCNFMWnooWT7Bc412w3E3ZD814AjvCw On Monday, February 16, 2015 at 10:31:14 AM UTC-8, Jonathan Anderson wrote: It's occurring to me that right now, I have a bare repository and intend to keep it that way if I can. If I were to have the reviewboard instance accessing git directly through the file system, would it need a working directory in order to function? Is there a way I could set up a git repo on the reviewboard server, tracking our remote, and simply have it fetch when it needs to verify any files? On Monday, February 16, 2015 at 9:45:27 AM UTC-8, Jonathan Anderson wrote: It sounds like this is a documentation issue then. I don't believe that, in the process of setting up our reviewboard, there was an indication that the repository needed to be hosted locally. In fact, the repository settings in the UI suggested otherwise. I'll give this a try and update back here. On Saturday, February 14, 2015 at 12:26:28 AM UTC-8, Christian Hammond wrote: Unfortunately, that configuration can't work, unless there's also a raw file URL field that's filled out. Git's protocol has no ability to fetch the kind of information we need remotely, including individual files. For Git, it's a requirement to either host the repository on the Review Board server (or through something like an NFS mount), or to use a service like GitWeb. GitWeb is the recommended route right now (though we're working on a service to help make all this easier). If the other changes were successfully posting, my guess is that they were introducing new files, which doesn't require communication with the repository. Otherwise, there's no way that the file verification could have worked with a remote Git path. Christian -- Christian Hammond - chri...@beanbaginc.com Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com -Original Message- From: Liam Reimers liam.r...@gmail.com Reply: Liam Reimers liam.r...@gmail.com Date: February 13, 2015 at 3:40:54 PM To: revie...@googlegroups.com revie...@googlegroups.com Cc: liam.r...@gmail.com liam.r...@gmail.com, chri...@beanbaginc.com chri...@beanbaginc.com Subject: Re: The specified diff file could not be parsed. Ah, I just saw part of your error: Not a git repository: 'None.' How is your repository configured in Review Board? Name - Repository Hosting - None (custom) Type - Git Path - git@server:path/repo.git However, note that the client can post a review request using one invocation (with HEAD~) and not the other, so it would seem that the repo is configured correctly? -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
UnicodeDecodeError in web API if non-ASCII characters in summary or description
I'm having trouble posting review requests using the web API if the summary or description contains non-ASCII characters. I'm using RBTools 0.7.1, Python 2.7.8 and Ubuntu 14.10. The following script reproduces the problem: # coding: utf-8 from rbtools.api.client import RBClient # Example data RB_PATH = 'http://review.com/reviews/' USER = user PASS = password PATH = /home/user/repo def main(): import random client = RBClient(RB_PATH, username=USER, password=PASS) root = client.get_root() rbrepo = root.get_repositories(path=PATH)[0].id revreq = root.get_review_requests().create(repository=rbrepo, commit_id=str(random.random ())) # Apparently necessary to post attachment or diff to actually create the request revreq.get_file_attachments().upload_attachment( attachment, , caption=An attachment.) summary = 'ø' draft = revreq.get_draft() draft = draft.update(summary=summary) if __name__ == __main__: main() This gives the following error: Traceback (most recent call last): File testutf.py, line 24, in module main() File testutf.py, line 21, in main draft = draft.update(summary=summary) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/resource.py, line 137, in lambda meth(resource, **kwargs))) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/decorators.py, line 27, in request_method *args, **kwargs) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/transport/sync.py, line 62, in execute_request_method return self._execute_request(request) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/transport/sync.py, line 71, in _execute_request rsp = self.server.make_request(request) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/request.py, line 512, in make_request content_type, body = request.encode_multipart_formdata() File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/request.py, line 101, in encode_multipart_formdata content.write(self._fields[key].encode('utf-8') + NEWLINE) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) If I instead use a unicode string: summary = u'ø' then an error occurs in httplib.py: Traceback (most recent call last): File testutf.py, line 24, in module main() File testutf.py, line 21, in main draft = draft.update(summary=summary) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/resource.py, line 137, in lambda meth(resource, **kwargs))) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/decorators.py, line 27, in request_method *args, **kwargs) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/transport/sync.py, line 62, in execute_request_method return self._execute_request(request) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/transport/sync.py, line 71, in _execute_request rsp = self.server.make_request(request) File /usr/local/lib/python2.7/site-packages/RBTools-0.7.1-py2.7.egg/rbtools/api/request.py, line 525, in make_request rsp = self._urlopen(r) File /usr/lib64/python2.7/urllib2.py, line 127, in urlopen return _opener.open(url, data, timeout) File /usr/lib64/python2.7/urllib2.py, line 404, in open response = self._open(req, data) File /usr/lib64/python2.7/urllib2.py, line 422, in _open '_open', req) File /usr/lib64/python2.7/urllib2.py, line 382, in _call_chain result = func(*args) File /usr/lib64/python2.7/urllib2.py, line 1214, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib64/python2.7/urllib2.py, line 1181, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File /usr/lib64/python2.7/httplib.py, line 995, in request self._send_request(method, url, body, headers) File /usr/lib64/python2.7/httplib.py, line 1029, in _send_request self.endheaders(body) File /usr/lib64/python2.7/httplib.py, line 991, in endheaders self._send_output(message_body) File /usr/lib64/python2.7/httplib.py, line 842, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 90: ordinal not in range(128) Is there any way to circumvent these errors? -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email
Re: The specified diff file could not be parsed.
After fiddling with this some more, I ended up discarding the repo config and creating a new config as a Gitlab repo. This seems to have worked, however, when I try to post a review: 08:03 $ rbt post -g yes --bugs-closed 19788098 -d RBTools 0.7.1 Python 2.6.9 (unknown, Sep 9 2014, 15:05:12) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] Running on Darwin-14.1.0-x86_64-i386-64bit Home = /Users/user Current directory = /Users/user/Code/repo Checking for a Subversion repository... Running: svn info --non-interactive Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: E155007: '/Users/user/Code/repo' is not a working copy --- Checking for a Git repository... Running: git rev-parse --git-dir Running: git config core.bare Running: git rev-parse --show-toplevel Running: git symbolic-ref -q HEAD Running: git config --get branch.PR19788098.merge Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.merge'] --- Running: git config --get branch.PR19788098.remote Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.remote'] --- Running: git config --get remote.origin.url repository info: Path: https://gitlab/group/repo.git, Base path: , Supports changesets: False Making HTTP GET request to http://reviewboard-dtpe.uat-app.apple.com/api/ Running: git rev-parse refs/heads/PR19788098 Running: git merge-base 3eea08c87f4ee336ec0d25108bc0224e7bbf5213 origin/master Running: git rev-parse 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8 Running: git status --porcelain --untracked-files=no Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8..3eea08c87f4ee336ec0d25108bc0224e7bbf5213 Making HTTP GET request to http://reviewboard/api/validation/diffs/ Cached response for HTTP GET http://reviewboard/api/validation/diffs/ expired and was modified Making HTTP POST request to http://reviewboard/api/validation/diffs/ Got HTTP error: 502: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlhead title502 Proxy Error/title /headbody h1Proxy Error/h1 pThe proxy server received an invalid response from an upstream server.br / The proxy server could not handle the request ema href=/api/validation/diffs/POSTnbsp;/api/validation/diffs//a/em.p Reason: strongError reading from remote server/strong/p/p hr addressApache/2.2.15 (Oracle) Server at reviewboard Port 80/address /body/html Traceback (most recent call last): File /usr/local/bin/rbt, line 8, in module load_entry_point('RBTools==0.7.1.dev', 'console_scripts', 'rbt')() File /Library/Python/2.6/site-packages/rbtools/commands/main.py, line 133, in main command.run_from_argv([RB_MAIN, command_name] + args) File /Library/Python/2.6/site-packages/rbtools/commands/__init__.py, line 538, in run_from_argv exit_code = self.main(*args) or 0 File /Library/Python/2.6/site-packages/rbtools/commands/post.py, line 670, in main (msg_prefix, e)) rbtools.commands.CommandError: Error validating diff HTTP 502 -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: The specified diff file could not be parsed.
After fiddling with this some more, I ended up discarding the repo config and creating a new config as a Gitlab repo. This seems to have worked, however, when I try to post a review: 08:03 $ rbt post -g yes --bugs-closed 19788098 -d RBTools 0.7.1 Python 2.6.9 (unknown, Sep 9 2014, 15:05:12) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] Running on Darwin-14.1.0-x86_64-i386-64bit Home = /Users/user Current directory = /Users/user/Code/repo Checking for a Subversion repository... Running: svn info --non-interactive Command exited with rc 1: ['svn', 'info', '--non-interactive'] svn: E155007: '/Users/user/Code/repo' is not a working copy --- Checking for a Git repository... Running: git rev-parse --git-dir Running: git config core.bare Running: git rev-parse --show-toplevel Running: git symbolic-ref -q HEAD Running: git config --get branch.PR19788098.merge Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.merge'] --- Running: git config --get branch.PR19788098.remote Command exited with rc 1: ['git', 'config', '--get', u'branch.PR19788098.remote'] --- Running: git config --get remote.origin.url repository info: Path: https://gitlab/group/repo.git, Base path: , Supports changesets: False Making HTTP GET request to http://reviewboard/api/ Running: git rev-parse refs/heads/PR19788098 Running: git merge-base 3eea08c87f4ee336ec0d25108bc0224e7bbf5213 origin/master Running: git rev-parse 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8 Running: git status --porcelain --untracked-files=no Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 62ca39aa4ab94b9f0b5f55e75ce8138b63c8b1d8..3eea08c87f4ee336ec0d25108bc0224e7bbf5213 Making HTTP GET request to http://reviewboard/api/validation/diffs/ Cached response for HTTP GET http://reviewboard/api/validation/diffs/ expired and was modified Making HTTP POST request to http://reviewboard/api/validation/diffs/ Got HTTP error: 502: !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlhead title502 Proxy Error/title /headbody h1Proxy Error/h1 pThe proxy server received an invalid response from an upstream server.br / The proxy server could not handle the request ema href=/api/validation/diffs/POSTnbsp;/api/validation/diffs//a/em.p Reason: strongError reading from remote server/strong/p/p hr addressApache/2.2.15 (Oracle) Server at reviewboard Port 80/address /body/html Traceback (most recent call last): File /usr/local/bin/rbt, line 8, in module load_entry_point('RBTools==0.7.1.dev', 'console_scripts', 'rbt')() File /Library/Python/2.6/site-packages/rbtools/commands/main.py, line 133, in main command.run_from_argv([RB_MAIN, command_name] + args) File /Library/Python/2.6/site-packages/rbtools/commands/__init__.py, line 538, in run_from_argv exit_code = self.main(*args) or 0 File /Library/Python/2.6/site-packages/rbtools/commands/post.py, line 670, in main (msg_prefix, e)) rbtools.commands.CommandError: Error validating diff HTTP 502 -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups reviewboard group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Issue 3777 in reviewboard: settings bugs_closed to an array causes the array to be serialized to a string
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 3777 by vlov...@gmail.com: settings bugs_closed to an array causes the array to be serialized to a string https://code.google.com/p/reviewboard/issues/detail?id=3777 What version are you running? RBTool 0.7.1 reviewboard 2.0.13 What's the URL of the page containing the problem? N/A What steps will reproduce the problem? 1. review_draft.update(bugs_closed=['1234'], public=True) What is the expected output? What do you see instead? I expect reviewboard to properly set bugs_closed to 1234. Instead it's set to the string [u[u234]]. Similarly, if I were to set it to ['1234', '456'] I would expect '1234', '45' in the UI 1234 45 as separate defects when iterating in the API. What operating system are you using? What browser? Python 2.7 -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups reviewboard-issues group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard-issues+unsubscr...@googlegroups.com. To post to this group, send email to reviewboard-issues@googlegroups.com. Visit this group at http://groups.google.com/group/reviewboard-issues. For more options, visit https://groups.google.com/d/optout.
Re: Issue 3761 in reviewboard: Can't add https subversion reppository (certificate included in /var/www/neoflex.reviews.board/data/.subversion/)
Comment #2 on issue 3761 by e...@flexibleinformatics.com: Can't add https subversion reppository (certificate included in /var/www/neoflex.reviews.board/data/.subversion/) https://code.google.com/p/reviewboard/issues/detail?id=3761 I'm getting this too. SERVER: CentOS 5.11, Python 2.7.9, ReviewBoard 2.0.13. CLIENT: Windows 7, Chrome/Firefox [Wed Feb 18 16:37:45 2015] [error] ERROR:root:Exception thrown for user ebellinger at http://svn.flexibleinformatics.com/api/repositories/1/commits/?start=22722branch=MDDSapi_format=json [Wed Feb 18 16:37:45 2015] [error] [Wed Feb 18 16:37:45 2015] [error] error return without exception set [Wed Feb 18 16:36:46 2015] [error] Traceback (most recent call last): [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py, line 112, in get_response [Wed Feb 18 16:36:46 2015] [error] response = wrapped_callback(request, *callback_args, **callback_kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/cache.py, line 52, in _wrapped_view_func [Wed Feb 18 16:36:46 2015] [error] response = view_func(request, *args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/vary.py, line 19, in inner_func [Wed Feb 18 16:36:46 2015] [error] response = func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/resources.py, line 497, in __call__ [Wed Feb 18 16:36:46 2015] [error] request, method, view, api_format=api_format, *args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/resources.py, line 568, in call_method_view [Wed Feb 18 16:36:46 2015] [error] return view(request, *args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 117, in _call [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/ReviewBoard-2.0.13-py2.7.egg/reviewboard/webapi/decorators.py, line 110, in _check [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 117, in _call [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/ReviewBoard-2.0.13-py2.7.egg/reviewboard/webapi/decorators.py, line 31, in _check [Wed Feb 18 16:36:46 2015] [error] return webapi_login_required(view_func)(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 117, in _call [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 138, in _checklogin [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 117, in _call [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 117, in _call [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/webapi/decorators.py, line 287, in _validate [Wed Feb 18 16:36:46 2015] [error] return view_func(*args, **new_kwargs) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/ReviewBoard-2.0.13-py2.7.egg/reviewboard/webapi/resources/repository_commits.py, line 86, in get [Wed Feb 18 16:36:46 2015] [error] items = repository.get_commits(branch=branch, start=start) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/ReviewBoard-2.0.13-py2.7.egg/reviewboard/scmtools/models.py, line 417, in get_commits [Wed Feb 18 16:36:46 2015] [error] cache_period) [Wed Feb 18 16:36:46 2015] [error] File /usr/local/lib/python2.7/site-packages/Djblets-0.8.15-py2.7.egg/djblets/cache/backend.py, line 120, in cache_memoize [Wed Feb 18 16:36:46 2015] [error] data = lookup_callable() [Wed Feb 18 16:36:46 2015] [error] File
Issue 3776 in reviewboard: Problems with excluding files for diff/post with SVN
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 3776 by griffin@gmail.com: Problems with excluding files for diff/post with SVN https://code.google.com/p/reviewboard/issues/detail?id=3776 What version are you running? RBTools 0.7.1 What's the URL of the page containing the problem? n/a What steps will reproduce the problem? 1. See below 2. 3. What is the expected output? What do you see instead? What operating system are you using? What browser? CentOS 7.0, Python 2.7.5, Subversion 1.7.14 Please provide any additional information below. I've run into a couple of problems with excluding files with svn. *Issue 1* Exclude patterns and/or filename pattern matching do not appear to work correctly when the working copy does not come from the root of the repository. Consider the following: [gmyers@centos7 wc_exclude]$ svn info Path: . Working Copy Root Path: /home/gmyers/wc_exclude URL: file:///home/gmyers/svn_repo/myrepo/trunk Repository Root: file:///home/gmyers/svn_repo/myrepo Repository UUID: 72c2860e-d8ea-4a48-91a1-97be758f8aea snip So I have checked out the trunk folder, which is one level below the repo root, into the wc_exclude working copy. I have a single local file mod: [gmyers@centos7 wc_exclude]$ svn status M a.txt Running 'rbt diff' nominally and then also while attempting to exclude a.txt produce unexpectedly identical results: [gmyers@centos7 wc_exclude]$ rbt diff Index: /trunk/a.txt === --- /trunk/a.txt(revision 4) +++ /trunk/a.txt(working copy) @@ -1 +1,2 @@ This is a file. +edit [gmyers@centos7 wc_exclude]$ rbt diff -X a.txt Index: /trunk/a.txt === --- /trunk/a.txt(revision 4) +++ /trunk/a.txt(working copy) @@ -1 +1,2 @@ This is a file. +edit The problem appears to be in the call to filter_diff() and the subsequent call to filename_match_any_patterns(). The base_dir param to filter_diff() is taken from the 'Working Copy Root Path' in 'svn info' and is effectively appended with the filename from the diff to produce: /home/gmyers/wc_exclude/trunk/a.txt This is compared against the normalized exclude pattern which is: /home/gmyers/wc_exclude/a.txt No match is found here due to the extra 'trunk' in the path. Performing the same process in a working copy which is checked out from the repo root produced the expected behavior where a.txt is excluded and an empty diff results. *Issue 2* Following from issue 1, using 'Working Copy Root Path' from svn info is limiting as this information did not appear in the info output prior to SVN version 1.7 (see https://groups.google.com/forum/#!topic/reviewboard-dev/eozb9m9b7fA). I don't have 1.6 available right now to produce an example output, but here is a different example where this was problematic in some older code: https://groups.google.com/d/msg/reviewboard/WYgpNZXWn2o/ZtCJOOtAQYQJ *Issue 3* Again following from issue 1, suppose we attempt to generate a diff from outside of the working copy with the --repository-url option: [gmyers@centos7 ~]$ rbt diff --repository-url file:///home/gmyers/svn_repo/myrepo -X /trunk/a.txt 2:1 Failed to execute command: ['svn', 'info', '.'] [svn: E155007: '/home/gmyers' is not a working copy\n] This fails because when calling 'svn info' to set the base_dir param for filter_diff(), '.' (e.g. the current working directory) is used as the path -- base_dir=self.svn_info('.')['Working Copy Root Path']. But, in this case we are not in a working copy, so 'svn info' fails. I think the primary challenge currently in applying the exclusion logic is the conversion between local filesystem paths and repository paths. I wonder if a straightforward solution is just to move the exclude pattern processing logic immediately prior to the call to convert_to_absolute_paths() in order to keep all paths in terms of the local filesystem. Maybe this would only work for the working copy case and still be problematic for the --repository-url case? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups reviewboard-issues group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard-issues+unsubscr...@googlegroups.com. To post to this group, send email to reviewboard-issues@googlegroups.com. Visit this group at http://groups.google.com/group/reviewboard-issues. For more options, visit https://groups.google.com/d/optout.