------------------------------------------------------------------------------ To reply, visit https://hellosplat.com/s/beanbag/tickets/4948/ ------------------------------------------------------------------------------
New ticket #4948 by b.stoop For Beanbag, Inc. > RBTools Status: New Tags: Priority:Medium, Type:Defect ------------------------------------------------------------------------------ Error 207 when using --parent ============================================================================== # What version are you running? RBTools 2.0.1 (Python 3.9.5) # What steps will reproduce the problem? 1. Switch to the master branch. 2. Create a new branch from the master branch using `git switch -c test1`. 3. Make some changes to a file and commit those. 4. Create a new branch form the test1 branch using `git switch -c test2`. 5. Make some changes to a file and commit those too. 6. Push test1 or test2 to origin with the same branch name. 7. Use `git switch test2`, or make sure your current branch is test2. 8. Post to reviewboard with `rbt post --parent test1` # What is the expected output? What do you see instead? ``` ERROR: Error validating diff docs/manual/pipeline/README.md: The file was not found in the repository. (HTTP 400, API Error 207) ``` I get the error that the file that is changed in the `test2` branch is not found in the repository. It doesn't matter which if `test1` or `test2` is pushed to origin. # What operating system are you using? I use windows 10 as main OS. I run RBTools on a ubuntu 21.4 WSL on my windows 10. # Attach the debug out from the command. ``` $ rbt post --debug --parent test1 >>> RBTools 2.0.1 >>> Python 3.9.5 (default, May 11 2021, 08:20:37) [GCC 10.3.0] >>> Running on Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.33 >>> Home = /home/brian >>> Current directory = /home/brian/development/stellr >>> Command line: rbt post --debug --parent test1 >>> Running: tf vc help >>> Checking for a Bazaar repository... >>> Unable to execute "brz help" or "bzr help": skipping Bazaar >>> Checking for a ClearCase repository... >>> Unable to execute "cleartool help": skipping ClearCase >>> Checking for a CVS repository... >>> Unable to execute "cvs": skipping CVS >>> 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 remote.test1.url >>> Command exited with rc 1: ['git', 'config', '--get', 'remote.test1.url'] --- >>> Repository info: Path: /home/brian/development/stellr/.git, Base path: , >>> Supports changesets: False >>> Checking for a Mercurial repository... >>> Unable to execute "hg --help": skipping Mercurial >>> Checking for a Perforce repository... >>> Unable to execute "p4 help": skipping Perforce >>> Checking for a Plastic repository... >>> Unable to execute "cm version": skipping Plastic >>> Checking for a Subversion repository... >>> Unable to execute "svn help": skipping SVN >>> Checking for a Team Foundation Server repository... >>> Unable to execute "tf help": skipping TFS >>> Making HTTP GET request to https://reviews.m2mobi.com/api/ >>> Running: git rev-parse refs/heads/test2 >>> Running: git branch --remotes >>> Running: git config --get branch.test1.remote >>> Running: git rev-parse test1 >>> Running: git rev-list 12ed902642ce0cba8b2b8b9b6e24febc6cf106f2 --not >>> --remotes=origin >>> Running: git status --porcelain --untracked-files=no >>> --ignore-submodules=dirty >>> Running: git version >>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color >>> --full-index --ignore-submodules --find-renames --no-ext-diff >>> 12ed902642ce0cba8b2b8b9b6e24febc6cf106f2..53aa20b071d71d8a065279e4563b2173d3ed7f99 >>> Making HTTP GET request to https://reviews.m2mobi.com/api/validation/diffs/ >>> Cached response for HTTP GET >>> https://reviews.m2mobi.com/api/validation/diffs/ expired and was modified >>> Making HTTP POST request to https://reviews.m2mobi.com/api/validation/diffs/ >>> Got API Error 207 (HTTP code 400): The file was not found in the repository. >>> Error data: {'stat': 'fail', 'err': {'msg': 'The file was not found in the >>> repository.', 'code': 207}, 'file': 'docs/manual/pipeline/README.md', >>> 'revision': 'e3cc1558ef8cf88e6dc700ebc20b7f4421fc836d'} Traceback (most recent call last): File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/request.py", line 812, in make_request rsp = self._urlopen(Request( File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/cache.py", line 209, in make_request return self.urlopen(request) File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.9/urllib/request.py", line 523, in open response = meth(req, response) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/request.py", line 359, in http_response response = self.parent.error('http', request, response, File "/usr/lib/python3.9/urllib/request.py", line 561, in error return self._call_chain(*args) File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain result = func(*args) File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: BAD REQUEST During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/brian/.local/lib/python3.9/site-packages/rbtools/commands/post.py", line 1080, in main self._validate_squashed_diff(api_root, repository, File "/home/brian/.local/lib/python3.9/site-packages/rbtools/commands/post.py", line 1459, in _validate_squashed_diff validator.validate_diff( File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/decorators.py", line 26, in request_method return self._transport.execute_request_method(method_wrapper, File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/transport/sync.py", line 82, in execute_request_method return self._execute_request(request) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/transport/sync.py", line 91, in _execute_request rsp = self.server.make_request(request) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/request.py", line 815, in make_request self.process_error(e.code, e.read()) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/api/request.py", line 788, in process_error raise create_api_error(http_status, rsp['err']['code'], rsp, rbtools.api.errors.BadRequestError: The file was not found in the repository. (HTTP 400, API Error 207) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/brian/.local/bin/rbt", line 8, in <module> sys.exit(main()) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/commands/main.py", line 124, in main command.run_from_argv([RB_MAIN, command_name] + args) File "/home/brian/.local/lib/python3.9/site-packages/rbtools/commands/__init__.py", line 770, in run_from_argv exit_code = self.main(*args) or 0 File "/home/brian/.local/lib/python3.9/site-packages/rbtools/commands/post.py", line 1092, in main raise CommandError('Error validating diff\n\n%s%s' rbtools.commands.CommandError: Error validating diff docs/manual/pipeline/README.md: The file was not found in the repository. (HTTP 400, API Error 207) ``` # Please provide any additional information below. ------------------------------------------------------------------------------ -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard-issues/20211025083058.28003.15615%40ip-10-1-54-209.ec2.internal.