Response code: 207 -- The file was not found in the repository

3,522 views
Skip to first unread message

CoderTR

unread,
Apr 20, 2012, 4:01:52 AM4/20/12
to reviewboard
Hi,

I have been trying Reviewboard and got selenium4junit (google code
project) setup in ReviewBoard with repository url as --
http://selenium4junit.googlecode.com/svn

I am using below post-review command and got 207 response code from
review board. Could someone help me with this ? thank you !

post-review command:
--------------------------------
post-review --repository-url="http://selenium4junit.googlecode.com/
svn" --server="http://localhost/reviews/" --username="rbposter" --
password="password" --submit-as="reviewuser" --revision-range="54:55"
--summary="selenium 4 junit revision 55 to 54" --branch="" --bugs-
closed="" --target-groups="" --target-people="" --description="" --
testing-done=""

When I did network sniffing I found that "basedir" is being send as
"/" (without quote) -- below is the POST data of upload diff request.
Could you please let me what's amiss here ? thank you !

https://gist.github.com/2427007

Christian Hammond

unread,
Apr 20, 2012, 4:14:47 AM4/20/12
to revie...@googlegroups.com
Can you provide the output using --debug?

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



--
Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to reviewboard...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

CoderTR

unread,
Apr 20, 2012, 4:37:21 AM4/20/12
to revie...@googlegroups.com
Here is the --debug output

https://gist.github.com/356cc0b7d25b7748e9bb

I didn't see my previous reply, so had to post it again. Sorry if this is getting posted twice.

Christian Hammond

unread,
Apr 20, 2012, 4:50:06 AM4/20/12
to revie...@googlegroups.com
How is your repository configured in Review Board? Is the path set to the root of the Subversion repository, or a subdirectory within it? It'll need to be the very root of the repository.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


--

CoderTR

unread,
Apr 20, 2012, 4:55:16 AM4/20/12
to revie...@googlegroups.com
Yes, its the root of the repository,

there is the API output from reviewboard for that repo setup..

 <item>
    <path>http://selenium4junit.googlecode.com/svn</path>
    <tool>Subversion</tool>
    <id>3</id>

    <links>
     <info>
      <href>http://localhost/reviews/api/repositories/3/info/</href>
      <method>GET</method>
     </info>
     <self>
      <href>http://localhost/reviews/api/repositories/3/</href>
      <method>GET</method>
     </self>
     <update>
      <href>http://localhost/reviews/api/repositories/3/</href>
      <method>PUT</method>
     </update>
     <delete>
      <href>http://localhost/reviews/api/repositories/3/</href>
      <method>DELETE</method>
     </delete>
    </links>
    <name>selenium4junit</name>
   </item>

CoderTR

unread,
Apr 20, 2012, 5:01:25 AM4/20/12
to revie...@googlegroups.com
There is a leading slash in path of the file in diff output, as the reviewboard also complains with this repsonse --

>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'//trunk/src/main/java/com/anasoft/os/s4j/SeleniumInstanceFactory.java', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'54'}
Your review request still exists, but the diff is not attached.

Do you think this could be a reason for the failure ?

Christian Hammond

unread,
Apr 20, 2012, 5:04:25 AM4/20/12
to revie...@googlegroups.com
Yeah, I'm just not sure where that's coming from. Can you also show me what 'svn info' shows?


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


--

CoderTR

unread,
Apr 20, 2012, 5:10:00 AM4/20/12
to revie...@googlegroups.com
Ok. Also, I am *not* running post-review command from my svn working directory.

Here is the svn info output

C:\Workspace\workspace\selenium4junit-read-only>svn info
Path: .
Working Copy Root Path: C:\Workspace\workspace\selenium4junit-read-only
URL: http://selenium4junit.googlecode.com/svn/trunk
Repository Root: http://selenium4junit.googlecode.com/svn
Repository UUID: 733c2150-6652-11de-9c70-efa4e9705d34
Revision: 72
Node Kind: directory
Schedule: normal
Last Changed Author: vojtech.szocs
Last Changed Rev: 72
Last Changed Date: 2010-08-26 07:45:21 -0700 (Thu, 26 Aug 2010)

Christian Hammond

unread,
Apr 20, 2012, 5:12:06 AM4/20/12
to revie...@googlegroups.com
Oh, where are you running it from?

What happens when you run 'svn info' from that location?

post-review expects to be run from within the source tree.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


CoderTR

unread,
Apr 20, 2012, 5:19:29 AM4/20/12
to revie...@googlegroups.com

Oh, where are you running it from?

I am running it from c:\ (whereas the project working directory is  C:\Workspace\workspace\
selenium4junit-read-only)
 
What happens when you run 'svn info' from that location?

C:\>svn info
svn: E155007: 'C:\' is not a working copy


post-review expects to be run from within the source tree.

I remember reading somewhere that its not mandatory to run it within the working directory. Also, I just ran the command from my working directory and got the same result (207 failure).

Christian Hammond

unread,
Apr 20, 2012, 5:32:24 AM4/20/12
to revie...@googlegroups.com
Oh, I was missing the --repository-url= parameter.

So, to compute the base path, we take the "Repository Root" value from "svn info" and the "URL" value and get the part in "URL" that is after "Repository Root". Normally, this will be something like "/trunk"

If this value is empty, it hard-codes "/".

Somewhere, this is conflicting with how it's generating the diff.

So try your post-review command from the checkout, but don't pass --repository-url, and see if that gets any further.


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


--

CoderTR

unread,
Apr 20, 2012, 5:58:57 AM4/20/12
to revie...@googlegroups.com
Christian, Thanks for all the help.

I tried without --repository-url and ran it within working directory, I get the same problem, I checked out /trunk/ and for some reason, the file path still have //trunk.
So, I checked out the entire repository (including trunk, branches and tags), and ran the command within working directory, now that the file is posted with correct relative path in diff. But reviewboard still won't accept the request --

>>> Got API Error 207 (HTTP code 400): The file was not found in the repository
>>> Error data: {u'stat': u'fail', u'file': u'/trunk/src/main/java/com/anasoft/o

s/s4j/SeleniumInstanceFactory.java', u'err': {u'msg': u'The file was not found i
n the repository', u'code': 207}, u'revision': u'54'}

Error uploading diff


Your review request still exists, but the diff is not attached.

C:\Workspace\workspace\selenium4junit-all-read-only>svn info
Path: .
Working Copy Root Path: C:\Workspace\workspace\selenium4junit-all-read-only

URL: http://selenium4junit.googlecode.com/svn

Repository Root: http://selenium4junit.googlecode.com/svn
Repository UUID: 733c2150-6652-11de-9c70-efa4e9705d34
Revision: 72
Node Kind: directory
Schedule: normal
Last Changed Author: vojtech.szocs
Last Changed Rev: 72
Last Changed Date: 2010-08-26 07:45:21 -0700 (Thu, 26 Aug 2010)

However, closer look at the error message, seems like reviewboard complaining that the file is not there in revision 54 ( the file was added in revision 55) which makes sense. But, I don't know why RB would complain abt this ---


Index: src/main/java/com/anasoft/os/s4j/SeleniumInstanceFactory.java
===================================================================
--- src/main/java/com/anasoft/os/s4j/SeleniumInstanceFactory.java    (revision 0)
+++ src/main/java/com/anasoft/os/s4j/SeleniumInstanceFactory.java    (revision 55)
@@ -0,0 +1,24 @@
+package com.anasoft.os.s4j;
+
+import com.anasoft.os.s4j.annotation.SeleniumSession;
+import com.thoughtworks.selenium.Selenium;
+
+/**
+ * Factory for creating {@link Selenium} session instances.
+ *
+ * @see SeleniumRunnerLogic
+ *
+ * @author vojtech.szocs
+ */
+public interface SeleniumInstanceFactory {
+
+    /**
+     * Creates new {@link Selenium} instance for the given session
+     * configuration.
+     *
+     * @param sessionConfig {@link Selenium} session configuration.
+     * @return New {@link Selenium} session instance.
+     */
+    Selenium createSelenium(SeleniumSession sessionConfig);
+
+}



CoderTR

unread,
Apr 20, 2012, 6:28:01 AM4/20/12
to revie...@googlegroups.com
There is something special about this revision range -- 54:55
I tried with diff between 69:70 and the changes have been posted successfully, got a review request created. Yayy!!

Does it mean that post-review/reviewboard can't handle the case where the file was added new ??

I will continue to do some research tomorrow. Thanks again for your help.

Christian Hammond

unread,
Apr 20, 2012, 8:09:05 PM4/20/12
to revie...@googlegroups.com
It shouldn't have a problem with new files. I'm not sure why it is in your case. Perhaps it's something that changed in how your version of Subversion represents new files in diffs?


Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


--
Reply all
Reply to author
Forward
0 new messages