Thanks Christian,
See the attached file for the debug output. There is nothing special about
the repo setup: I don't have any branches. Everything up to changeset
100:79c09fdfad23 is pushed into the main repo. I changed a file with
changeset: 101:1170d2410ead and then did a "rbt post". To say it a
different way: when I type hg out, I only get changeset 101:1170d2410ead.
-Ali
On Tuesday, June 10, 2014 5:41:10 PM UTC-6, Christian Hammond wrote:
>
> Hi Ali,
>
> Can you run the ‘rbt post’ with —debug and show me the result?
>
> Also, what does your branch structure look like? It’ll be helpful for me
> to know what the commit ID is for the change you’re trying to post, as well
> as the nearest upstream branch.
>
> Christian
>
> --
> Christian Hammond - [email protected] <javascript:>
> Review Board - http://www.reviewboard.org
> Beanbag, Inc. - http://www.beanbaginc.com
>
> On June 10, 2014 at 9:33:59 AM, Ali Ghorashi ([email protected]
> <javascript:>) wrote:
>
> Ok. I must be missing something. Here is what I'm trying on a fresh
> reviewboard install
> 1) Configure a repo with a full path: ssh://
> source.xxx.com//path_to_project
> 2) Enter user name and password
> 3) Push all changes to the Mercurial Repo
> 4) Change a file
> 5) Commit the file (no push)
> 6) Run "rbt post"
> 7) Get an error saying "Got API Error 207 (HTTP code 400): The file was
> not found in the repository"
>
> What am I doing wrong?
>
> -Ali
>
> On Monday, June 9, 2014 2:36:09 PM UTC-6, Ali Ghorashi wrote:
>>
>> Update: The "rbt post 101" command does not work either.
>> I should mention that I'm using mercurial via ssh. In other words, my
>> server URL is ssh://xxx.xxx.com
>>
>> On Monday, June 9, 2014 12:45:48 PM UTC-6, Ali Ghorashi wrote:
>>>
>>> Thanks for the reply Christian.
>>> I posted the wrong error message. The error is:
>>> ERROR: Error uploading diff
>>> The file was not found in the repository. (HTTP 400, API Error 207)
>>> Your review request still exists, but the diff is not attached.
>>>
>>> Successive attempts with the -u options (i.e. rbt post -u) generate the
>>> same error and no diff is attached.
>>> I tried to run the post command with the debug option and got the
>>> following error:
>>>
>>> >>> Making HTTP POST request to
>>> http://reviews.cei.com/reviews/api/review-requests/23/diffs/
>>> >>> Got API Error 207 (HTTP code 400): The file was not found in the
>>> repository.
>>> >>> Error data: {u'stat': u'fail', u'file': u'.cproject', u'err':
>>> {u'msg': u'The file was not found in the repository.', u'code': 207},
>>> u'revision': u'1b3944112e43'}
>>> Traceback (most recent call last):
>>> File "/usr/bin/rbt", line 9, in <module>
>>> load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()
>>> File
>>> "/usr/lib/python2.6/site-packages/RBTools-0.6-py2.6.egg/rbtools/commands/main.py",
>>>
>>> line 134, in main
>>> command.run_from_argv([RB_MAIN, command_name] + args)
>>> File
>>> "/usr/lib/python2.6/site-packages/RBTools-0.6-py2.6.egg/rbtools/commands/__init__.py",
>>>
>>> line 422, in run_from_argv
>>> exit_code = self.main(*args) or 0
>>> File
>>> "/usr/lib/python2.6/site-packages/RBTools-0.6-py2.6.egg/rbtools/commands/post.py",
>>>
>>> line 769, in main
>>> submit_as=self.options.submit_as)
>>> File
>>> "/usr/lib/python2.6/site-packages/RBTools-0.6-py2.6.egg/rbtools/commands/post.py",
>>>
>>> line 545, in post_request
>>> raise CommandError('\n'.join(error_msg))
>>> rbtools.commands.CommandError: Error uploading diff
>>>
>>> If I do a "rbt post 101" instead of the first "rb post" the operation is
>>> successful.
>>>
>>> -Ali
>>>
>>>
>>> On Wednesday, June 4, 2014 2:49:41 PM UTC-6, Christian Hammond wrote:
>>>>
>>>> They don’t need to specify a version number. It is using the tip.
>>>>
>>>> What’s happening with that error is that you’ve already posted a
>>>> review request representing the commit that you’ve posted for review.
>>>> Review Board tries to keep a 1-to-1 mapping of commit ID and review
>>>> request, and so it’s noticing that that particular commit is already in
>>>> the
>>>> database.
>>>>
>>>> If you want to update it, you’d pass -u to rbt post.
>>>>
>>>> Christian
>>>>
>>>> --
>>>> Christian Hammond - [email protected]
>>>> Review Board - http://www.reviewboard.org
>>>> Beanbag, Inc. - http://www.beanbaginc.com
>>>>
>>>> On June 4, 2014 at 11:29:25 AM, Ali Ghorashi ([email protected]) wrote:
>>>>
>>>> Hello All,
>>>> I'm evaluating Review Board. I'm running RB version 2.0.1 on Centos 6.5
>>>> with Mercurial v 2.8.3.
>>>> My question is regarding the "rbt post" command: After I do a commit
>>>> and run "rbt post", I get the following error:
>>>>
>>>>> ERROR: Error creating review request: Review request with this commit
>>>>> ID already exists in the repository. (HTTP 409, API Error 227)
>>>>>
>>>>
>>>> But if I look up the version id (id=100 let's say) and do "rbt post
>>>> 100". The command seems to work. After reading the documentation, it seems
>>>> like the "rbt post" should always use the tip when no version is specified.
>>>>
>>>> Is this the expected behavior? Does the user need to specify the
>>>> version number every time a new post is created?
>>>>
>>>> Thanks
>>>>
>>>> -Ali
>>>>
>>>> --
>>>> Get the Review Board Power Pack at
>>>> http://www.reviewboard.org/powerpack/
>>>> ---
>>>> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
>>>> ---
>>>> Happy user? Let us know at http://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 [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://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 [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
--
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://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 [email protected].
For more options, visit https://groups.google.com/d/optout.
[ali@dariush core]$ rbt post -u --debug
>>> RBTools 0.6.1
>>> Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
>>> Running on Linux-2.6.32-431.11.2.el6.x86_64-x86_64-with-centos-6.5-Final
>>> Home = /home/ali
>>> Current directory = /tmp/sipsa/core
>>> Checking for a Mercurial repository...
>>> Running: hg root
>>> Running: hg showconfig
>>> Running: hg svn info
>>> Command exited with rc 255: ['hg', 'svn', 'info']
hg: unknown command 'svn'
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate, blame
show changeset information by line for each file
clone make a copy of an existing repository
commit, ci commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log, history show revision history of entire repository or files
merge merge working directory with another revision
pull pull changes from the specified source
push push changes to the specified destination
remove, rm remove the specified files on the next commit
serve start stand-alone webserver
status, st show changed files in the working directory
summary, sum summarize working directory state
update, up, checkout, co
update working directory (or switch revisions)
view start interactive history viewer
global options:
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice for
all prompts
-q --quiet suppress output
-v --verbose enable additional output
--config CONFIG [+] set/override config option (use 'section.name=value')
--debug enable debugging output
--debugger start debugger
--encoding ENCODE set the charset encoding (default: UTF-8)
--encodingmode MODE set the charset encoding mode (default: strict)
--traceback always print a traceback on exception
--time time how long the command takes
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
--hidden consider hidden changesets
--color TYPE when to colorize (boolean, always, auto, or never)
(default: auto)
[+] marked option can be specified multiple times
use "hg help" for the full list of commands
---
>>> Using candidate path 'default':
>>> 'ssh://[email protected]//home/hg/projects/sipsa/core'
>>> repository info: Path:
>>> ssh://[email protected]//home/hg/projects/sipsa/core, Base path: ,
>>> Supports changesets: False
>>> Making HTTP GET request to http://reviews.cei.com/api/
>>> Running: hg branch
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default
>>> -r .
>>> Found outgoing changeset 101:1170d2410ead
>>> Running: hg log -r 101 --template {parents}
>>> Running: hg parents --hidden -r 0
>>> Running: hg identify -i --hidden -r 100 --config
>>> extensions.rbtoolsnormalize=/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/helpers/hgext.py
>>> Running: hg identify -i --hidden -r 101 --config
>>> extensions.rbtoolsnormalize=/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/helpers/hgext.py
>>> Running: hg -q outgoing --template {rev}\t{node|short}\t{branch}\n default
>>> -r 79c09fdfad23
>>> Command exited with rc 1: ['hg', '-q', 'outgoing', '--template',
>>> '{rev}\\t{node|short}\\t{branch}\\n', 'default', '-r', '79c09fdfad23']
---
>>> 0 outgoing changesets between remote and base.
>>> Running: hg diff --hidden -r 79c09fdfad23 -r 1170d2410ead --config
>>> extensions.rbtoolsnormalize=/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/helpers/hgext.py
>>> Making HTTP GET request to http://reviews.cei.com/api/session/
>>> Making HTTP GET request to http://reviews.cei.com/api/users/ali/
>>> Making HTTP GET request to http://reviews.cei.com/api/repositories/
>>> Making HTTP GET request to
>>> http://reviews.cei.com/api/review-requests/?status=pending&expand=draft&repository=1&from-user=ali
>>> Running: hg log --hidden -r 79c09fdfad23::1170d2410ead --template
>>> {desc}20d2f88c-f17e-11e3-a9e8-a41f72682346 --config
>>> extensions.rbtoolsnormalize=/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/helpers/hgext.py
Update Review Request #1: ''? [Yes/No]: Yes
>>> Making HTTP GET request to http://reviews.cei.com/api/review-requests/1/
>>> Making HTTP GET request to
>>> http://reviews.cei.com/api/review-requests/1/diffs/
>>> Making HTTP POST request to
>>> http://reviews.cei.com/api/review-requests/1/diffs/
>>> Got API Error 207 (HTTP code 400): The file was not found in the repository.
>>> Error data: {u'stat': u'fail', u'file': u'src/Message.h', u'err': {u'msg':
>>> u'The file was not found in the repository.', u'code': 207}, u'revision':
>>> u'79c09fdfad23'}
Traceback (most recent call last):
File "/usr/bin/rbt", line 9, in <module>
load_entry_point('RBTools==0.6.1', 'console_scripts', 'rbt')()
File
"/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/commands/main.py",
line 134, in main
command.run_from_argv([RB_MAIN, command_name] + args)
File
"/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/commands/__init__.py",
line 416, in run_from_argv
exit_code = self.main(*args) or 0
File
"/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/commands/post.py",
line 784, in main
submit_as=self.options.submit_as)
File
"/usr/lib/python2.6/site-packages/RBTools-0.6.1-py2.6.egg/rbtools/commands/post.py",
line 543, in post_request
error_msg.append(e.decode('utf-8') + u'\n')
AttributeError: 'BadRequestError' object has no attribute 'decode'