Hi,

I've tried with Mercurial 6.1.1, RBTools 3.1.1 and Review Board versions 
4.0.10 and 5 beta2 with no luck.

Steps to reproduce:
1. Setup a new Mercurial repo on a server with an initial commit (or use an 
existing one)
2. Clone that repo on a local machine and configure rbt
3. Create two local commits that modify different files: e.g. one changes 
FILE1, but has no changes to FILE2, while second has changes in FILE2.
4. Then try to send both commits for review via "rbt post" without 
squashing history and you will get the following error: 

Validating commits... ████████████████████████████████████████████████████ 
[2/2]
Uploading commits...  ██████████████████████████                           
[1/2]
ERROR: Error uploading diff

The file was not found in the repository. (API Error 207: Repository File 
Not Found)
Your review request still exists, but the diff is not attached.
https://rb/r/2/

See the attachment for output with debug flag enabled.

It's a common workflow for us, we are doing reviews before committing 
changes.

Could you help please with this issue? Are we doing something wrong, or 
there is a problem with our RB setup?

Thanks.

-- 
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 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/5ead7360-a496-439f-9ec1-921066b34c21n%40googlegroups.com.
>>> RBTools 3.1.1
>>> Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
>>> Running on Linux-5.15.0-48-generic-x86_64-with-glibc2.35
>>> Home = /home/vbartsafe
>>> Current directory = /home/vbart/vbart-test
>>> Making HTTP GET request to https://rb/api/
>>> Unable to execute "cleartool help": skipping ClearCase
>>> Running: tf vc help
>>> Checking for a Mercurial repository...
>>> Running: hg showconfig
>>> Using candidate path 'default': 'https://hg/vbart-test'
>>> Repository info: Path: https://hg/vbart-test, Base path: 
>>> Making HTTP GET request to 
>>> https://rb/api/repositories/?name=test&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info&tool=Mercurial%2CSubversion
>>> HTTP GET request to 
>>> https://rb/api/repositories/?name=test&only-fields=id%2Cname%2Cmirror_path%2Cpath&only-links=info&tool=Mercurial%2CSubversion
>>>  cannot be cached
>>> Making HTTP GET request to https://rb/api/repositories/2/info/
>>> Got API Error 209 (HTTP code 501): The specified repository is not able to 
>>> perform this action.
>>> Error data: {'err': {'code': 209, 'msg': 'The specified repository is not 
>>> able to perform this action.'}, 'stat': 'fail'}
>>> Command line: rbt post -d -r 2
>>> Running: hg branch --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default 
>>> -r . --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Found outgoing changeset 1:7d4d4395b8be
>>> Found outgoing changeset 2:ce3ab944a00f
>>> Running: hg log -r 2 --template {parents} --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg log -r 1 --template {parents} --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg parents --hidden -r 0
>>> Running: hg identify -i --hidden -r 0 --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg identify -i --hidden -r 2 --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg status --modified --added --removed --deleted --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default 
>>> -r 83999b95456a --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Command exited with rc 1: ['hg', '-q', 'outgoing', '--template', 
>>> '{rev}\\t{node|short}\\t{branch}\\n', 'default', '-r', '83999b95456a', 
>>> '--config', 
>>> 'extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py']
---
>>> 0 outgoing changesets between remote and base.
>>> Making HTTP GET request to 
>>> https://rb/api/review-requests/2/?only-fields=absolute_url%2Cbugs_closed%2Cid%2Cstatus%2Cpublic%2Ccreated_with_history&only-links=diffs%2Cdraft
>>> HTTP GET request to 
>>> https://rb/api/review-requests/2/?only-fields=absolute_url%2Cbugs_closed%2Cid%2Cstatus%2Cpublic%2Ccreated_with_history&only-links=diffs%2Cdraft
>>>  cannot be cached
>>> Running: hg log --template 
>>> {node}\x1f{p1node}\x1f{author|person}\x1f{author|email}\x1f{date|rfc3339date}\x1f{p2node}\x1f{desc}\x1e
>>>  -r "83999b95456a::ce3ab944a00f and not 83999b95456a" --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg diff --hidden --nodates -g -r 83999b95456a -r ce3ab944a00f 
>>> --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg diff --hidden --nodates -g -r 
>>> 83999b95456a2f3db1cbca23257ff97036b84250 -r 
>>> 7d4d4395b8be15813eb62a90a04c836494e08839 --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Running: hg diff --hidden --nodates -g -r 
>>> 7d4d4395b8be15813eb62a90a04c836494e08839 -r 
>>> ce3ab944a00f130cd78bef5b5705d61399200a48 --config 
>>> extensions.rbtoolsnormalize=/home/vbart/venv/lib/python3.10/site-packages/rbtools/helpers/hgext.py
>>> Making HTTP GET request to https://rb/api/validation/commits/
>>> HTTP GET request to https://rb/api/validation/commits/ cannot be cached
Validating commits...                                                      
[0/2]>>> Making HTTP POST request to https://rb/api/validation/commits/
>>> Making HTTP POST request to https://rb/api/validation/commits/
Validating commits... ████████████████████████████████████████████████████ [2/2]
>>> Making HTTP POST request to https://rb/api/review-requests/2/draft/
>>> Making HTTP GET request to 
>>> https://rb/api/review-requests/2/draft/diffs/?only-fields=&only-links=
>>> HTTP GET request to 
>>> https://rb/api/review-requests/2/draft/diffs/?only-fields=&only-links= 
>>> cannot be cached
>>> Making HTTP POST request to 
>>> https://rb/api/review-requests/2/draft/diffs/?only-fields=&only-links=self%2Cdraft_commits
>>> Making HTTP GET request to 
>>> https://rb/api/review-requests/2/draft/diffs/1/draft-commits/
>>> HTTP GET request to 
>>> https://rb/api/review-requests/2/draft/diffs/1/draft-commits/ cannot be 
>>> cached
Uploading commits...                                                       
[0/2]>>> Making HTTP POST request to 
https://rb/api/review-requests/2/draft/diffs/1/draft-commits/
Uploading commits...  ██████████████████████████                           
[1/2]>>> Making HTTP POST request to 
https://rb/api/review-requests/2/draft/diffs/1/draft-commits/
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository.
>>> Error data: {'err': {'code': 207, 'msg': 'The file was not found in the 
>>> repository.'}, 'file': 'FILE2', 'revision': 
>>> '7d4d4395b8be15813eb62a90a04c836494e08839', 'stat': 'fail'}
Uploading commits...  ██████████████████████████                           [1/2]
Traceback (most recent call last):
  File "/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/request.py", 
line 826, in make_request
    rsp = self._urlopen(Request(
  File "/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/cache.py", 
line 209, in make_request
    return self.urlopen(request)
  File "/usr/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/request.py", 
line 368, in http_response
    response = self.parent.error('http', request, response,
  File "/usr/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 643, 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/vbart/venv/lib/python3.10/site-packages/rbtools/commands/post.py", line 
659, in post_request
    self._post_diff_history(review_request, diff_history)
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/commands/post.py", line 
1514, in _post_diff_history
    commits.upload_commit(validation_info,
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/decorators.py", line 
26, in request_method
    return self._transport.execute_request_method(method_wrapper,
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/transport/sync.py", 
line 83, in execute_request_method
    return self._execute_request(request)
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/transport/sync.py", 
line 92, in _execute_request
    rsp = self.server.make_request(request)
  File "/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/request.py", 
line 829, in make_request
    self.process_error(e.code, e.read())
  File "/home/vbart/venv/lib/python3.10/site-packages/rbtools/api/request.py", 
line 802, 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. 
(API Error 207: Repository File Not Found)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vbart/venv/bin/rbt", line 8, in <module>
    sys.exit(main())
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/commands/main.py", line 
207, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/commands/__init__.py", 
line 1096, in run_from_argv
    exit_code = self.main(*args) or 0
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/commands/post.py", line 
972, in main
    review_request_id, review_request_url = self.post_request(
  File 
"/home/vbart/venv/lib/python3.10/site-packages/rbtools/commands/post.py", line 
701, in post_request
    raise CommandError('\n'.join(error_msg))
rbtools.commands.CommandError: Error uploading diff

The file was not found in the repository. (API Error 207: Repository File Not 
Found)
Your review request still exists, but the diff is not attached.
https://rb/r/2/

Reply via email to