path not found: 404 when using doGetFileContents

View: New views
6 Messages — Rating Filter:   Alert me  

path not found: 404 when using doGetFileContents

by aravinda777 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am trying to get the file contents in a revision using the doGetFileContents(...) method in SVNWCClient.

Here are the parameters I am passing:
wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true, oStream);

Here, svnUrl is a valid URL corresponding to a file in the repo. oStream is a fileOutputStream.

My problem is, it gives 'path not found: 404 Not Found ' exception although in the given revision (rev) it is existing.

The path it is trying to checkout from starts like ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the revision number it is trying to checkout. However, 1341 is the head revision, and the revision I am passing is something around 1282 which is created by passing a Date to the SVNRevision.create(...) method.

Is it a problem with the peg revision I am setting? I tried setting various peg revisions. But, still it is the same.

What might be the problem?


Thanks!
Rgds,
-A

Re: path not found: 404 when using doGetFileContents

by Alexander Sinyushkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Peg revision must be a revision in which your file exists. When you pass
SVNRevision.UNDEFINED as a peg revision,
it defaults to SVNRevision.HEAD, and most likely your file does not
exist in HEAD already. Try setting
a peg revision where the file definitely exists.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!



aravinda777 wrote:

> Hi,
>
> I am trying to get the file contents in a revision using the
> doGetFileContents(...) method in SVNWCClient.
>
> Here are the parameters I am passing:
> wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true,
> oStream);
>
> Here, svnUrl is a valid URL corresponding to a file in the repo. oStream is
> a fileOutputStream.
>
> My problem is, it gives 'path not found: 404 Not Found ' exception although
> in the given revision (rev) it is existing.
>
> The path it is trying to checkout from starts like
> ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the
> revision number it is trying to checkout. However, 1341 is the head
> revision, and the revision I am passing is something around 1282 which is
> created by passing a Date to the SVNRevision.create(...) method.
>
> Is it a problem with the peg revision I am setting? I tried setting various
> peg revisions. But, still it is the same.
>
> What might be the problem?
>
>
> Thanks!
> Rgds,
> -A

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: path not found: 404 when using doGetFileContents

by aravinda777 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

would I be correct in using the same SVNRevision object for the peg and operative revisions since I am sure that the fie exists in the operative revision I am using.

Rgds,
-A


Alexander Sinyushkin wrote:
Hello,

Peg revision must be a revision in which your file exists. When you pass
SVNRevision.UNDEFINED as a peg revision,
it defaults to SVNRevision.HEAD, and most likely your file does not
exist in HEAD already. Try setting
a peg revision where the file definitely exists.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!



aravinda777 wrote:
> Hi,
>
> I am trying to get the file contents in a revision using the
> doGetFileContents(...) method in SVNWCClient.
>
> Here are the parameters I am passing:
> wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true,
> oStream);
>
> Here, svnUrl is a valid URL corresponding to a file in the repo. oStream is
> a fileOutputStream.
>
> My problem is, it gives 'path not found: 404 Not Found ' exception although
> in the given revision (rev) it is existing.
>
> The path it is trying to checkout from starts like
> ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the
> revision number it is trying to checkout. However, 1341 is the head
> revision, and the revision I am passing is something around 1282 which is
> created by passing a Date to the SVNRevision.create(...) method.
>
> Is it a problem with the peg revision I am setting? I tried setting various
> peg revisions. But, still it is the same.
>
> What might be the problem?
>
>
> Thanks!
> Rgds,
> -A

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
For additional commands, e-mail: svnkit-users-help@svnkit.com

Re: path not found: 404 when using doGetFileContents

by Alexander Sinyushkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, sure.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!



aravinda777 wrote:

> would I be correct in using the same SVNRevision object for the peg and
> operative revisions since I am sure that the fie exists in the operative
> revision I am using.
>
> Rgds,
> -A
>
>
>
> Alexander Sinyushkin wrote:
>  
>> Hello,
>>
>> Peg revision must be a revision in which your file exists. When you pass
>> SVNRevision.UNDEFINED as a peg revision,
>> it defaults to SVNRevision.HEAD, and most likely your file does not
>> exist in HEAD already. Try setting
>> a peg revision where the file definitely exists.
>>
>> ----
>> Alexander Sinyushkin,
>> TMate Software,
>> http://svnkit.com/ - Java [Sub]Versioning Library!
>>
>>
>>
>> aravinda777 wrote:
>>    
>>> Hi,
>>>
>>> I am trying to get the file contents in a revision using the
>>> doGetFileContents(...) method in SVNWCClient.
>>>
>>> Here are the parameters I am passing:
>>> wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true,
>>> oStream);
>>>
>>> Here, svnUrl is a valid URL corresponding to a file in the repo. oStream
>>> is
>>> a fileOutputStream.
>>>
>>> My problem is, it gives 'path not found: 404 Not Found ' exception
>>> although
>>> in the given revision (rev) it is existing.
>>>
>>> The path it is trying to checkout from starts like
>>> ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the
>>> revision number it is trying to checkout. However, 1341 is the head
>>> revision, and the revision I am passing is something around 1282 which is
>>> created by passing a Date to the SVNRevision.create(...) method.
>>>
>>> Is it a problem with the peg revision I am setting? I tried setting
>>> various
>>> peg revisions. But, still it is the same.
>>>
>>> What might be the problem?
>>>
>>>
>>> Thanks!
>>> Rgds,
>>> -A
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
>> For additional commands, e-mail: svnkit-users-help@...
>>
>>
>>
>>    
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: path not found: 404 when using doGetFileContents

by aravinda777 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sadly, it still gives the same error and considers the HEAD as the peg revision. :(

Any ideas?

I am using parameters as follows:

wcClient.doGetFileContents(svnUrl, rev, rev, false, oStream);



Alexander Sinyushkin wrote:
Yes, sure.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!



aravinda777 wrote:
> would I be correct in using the same SVNRevision object for the peg and
> operative revisions since I am sure that the fie exists in the operative
> revision I am using.
>
> Rgds,
> -A
>
>
>
> Alexander Sinyushkin wrote:
>  
>> Hello,
>>
>> Peg revision must be a revision in which your file exists. When you pass
>> SVNRevision.UNDEFINED as a peg revision,
>> it defaults to SVNRevision.HEAD, and most likely your file does not
>> exist in HEAD already. Try setting
>> a peg revision where the file definitely exists.
>>
>> ----
>> Alexander Sinyushkin,
>> TMate Software,
>> http://svnkit.com/ - Java [Sub]Versioning Library!
>>
>>
>>
>> aravinda777 wrote:
>>    
>>> Hi,
>>>
>>> I am trying to get the file contents in a revision using the
>>> doGetFileContents(...) method in SVNWCClient.
>>>
>>> Here are the parameters I am passing:
>>> wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true,
>>> oStream);
>>>
>>> Here, svnUrl is a valid URL corresponding to a file in the repo. oStream
>>> is
>>> a fileOutputStream.
>>>
>>> My problem is, it gives 'path not found: 404 Not Found ' exception
>>> although
>>> in the given revision (rev) it is existing.
>>>
>>> The path it is trying to checkout from starts like
>>> ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the
>>> revision number it is trying to checkout. However, 1341 is the head
>>> revision, and the revision I am passing is something around 1282 which is
>>> created by passing a Date to the SVNRevision.create(...) method.
>>>
>>> Is it a problem with the peg revision I am setting? I tried setting
>>> various
>>> peg revisions. But, still it is the same.
>>>
>>> What might be the problem?
>>>
>>>
>>> Thanks!
>>> Rgds,
>>> -A
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
>> For additional commands, e-mail: svnkit-users-help@svnkit.com
>>
>>
>>
>>    
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
For additional commands, e-mail: svnkit-users-help@svnkit.com

Re: path not found: 404 when using doGetFileContents

by Alexander Sinyushkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I suspect the problem is in the rev parameter you pass into the method.

Can you please explicitly create a revision object like this:

SVNRevision rev = SVNRevision.create(1282);//supposing the file exists
in 1282

and then pass it to the method:

wcClient.doGetFileContents(svnUrl, rev, rev, false, oStream);

What a result would be?

I've just tried this method with our repository, it works without problems:

wcClient.doGetFileContents(SVNURL.parseURIEncoded("http://svn.svnkit.com/repos/svnkit/trunk/build.xml"),
SVNRevision.HEAD, SVNRevision.HEAD, false, System.out);


----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!



aravinda777 wrote:

> Sadly, it still gives the same error and considers the HEAD as the peg
> revision. :(
>
> Any ideas?
>
> I am using parameters as follows:
>
> wcClient.doGetFileContents(svnUrl, rev, rev, false, oStream);
>
>
>
>
> Alexander Sinyushkin wrote:
>  
>> Yes, sure.
>>
>> ----
>> Alexander Sinyushkin,
>> TMate Software,
>> http://svnkit.com/ - Java [Sub]Versioning Library!
>>
>>
>>
>> aravinda777 wrote:
>>    
>>> would I be correct in using the same SVNRevision object for the peg and
>>> operative revisions since I am sure that the fie exists in the operative
>>> revision I am using.
>>>
>>> Rgds,
>>> -A
>>>
>>>
>>>
>>> Alexander Sinyushkin wrote:
>>>  
>>>      
>>>> Hello,
>>>>
>>>> Peg revision must be a revision in which your file exists. When you pass
>>>> SVNRevision.UNDEFINED as a peg revision,
>>>> it defaults to SVNRevision.HEAD, and most likely your file does not
>>>> exist in HEAD already. Try setting
>>>> a peg revision where the file definitely exists.
>>>>
>>>> ----
>>>> Alexander Sinyushkin,
>>>> TMate Software,
>>>> http://svnkit.com/ - Java [Sub]Versioning Library!
>>>>
>>>>
>>>>
>>>> aravinda777 wrote:
>>>>    
>>>>        
>>>>> Hi,
>>>>>
>>>>> I am trying to get the file contents in a revision using the
>>>>> doGetFileContents(...) method in SVNWCClient.
>>>>>
>>>>> Here are the parameters I am passing:
>>>>> wcClient.doGetFileContents(svnUrl, SVNRevision.UNDEFINED, rev, true,
>>>>> oStream);
>>>>>
>>>>> Here, svnUrl is a valid URL corresponding to a file in the repo.
>>>>> oStream
>>>>> is
>>>>> a fileOutputStream.
>>>>>
>>>>> My problem is, it gives 'path not found: 404 Not Found ' exception
>>>>> although
>>>>> in the given revision (rev) it is existing.
>>>>>
>>>>> The path it is trying to checkout from starts like
>>>>> ''/rnd/!svn/bc/1341/trunk/developmen..' I guess the number 1341 is the
>>>>> revision number it is trying to checkout. However, 1341 is the head
>>>>> revision, and the revision I am passing is something around 1282 which
>>>>> is
>>>>> created by passing a Date to the SVNRevision.create(...) method.
>>>>>
>>>>> Is it a problem with the peg revision I am setting? I tried setting
>>>>> various
>>>>> peg revisions. But, still it is the same.
>>>>>
>>>>> What might be the problem?
>>>>>
>>>>>
>>>>> Thanks!
>>>>> Rgds,
>>>>> -A
>>>>>      
>>>>>          
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
>>>> For additional commands, e-mail: svnkit-users-help@...
>>>>
>>>>
>>>>
>>>>    
>>>>        
>>>  
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
>> For additional commands, e-mail: svnkit-users-help@...
>>
>>
>>
>>    
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...