|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Integration with SVN ClientsGreetings,
I am Abhishek. I am trying to extend a document management system to provide a face for SVN Client (for example Tortoise SVN). So, I have developed my own mechanism for this on server side by simply extending webDavServlet provided by apache. This document management system keeps properties and metadata related to files in database while files are stored in file system. I need to support any SVN client to maintain the working copy. To accomplish this , we need to make several changes in order to make our application accustomed to TSVN protocol. Since our application is developed in java, I found SVNKit very useful for this purpose. How can I use Svnkit to simulate a subversion server interface for any SVN Client (Tortoise SVN, SubEclipse etc). My Web Application will handle the server side events like checkout, checkin etc. I am facing many problems in developing a interface between these two. Please suggest me How can I achieve this? thanks for the help regards, Abhishek |
|
|
Re: Integration with SVN ClientsHello,
What you're about to do is to implement Subversion DAV server that is not really an easy task - Subversion extends standard DAV protocol and uses Subversion repository as a storage. There is a lot of Subversion specific things in Subversion DAV implementation. You may find more information on that in Subversion documentation (though it is somewhat limited), see http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol for example as well as other files in "notes" directory. May be it would be easier for you to keep files of your document management system in Subversion repository on the server side and let apache server with mod_dav_svn provide access for Subversion clients to it. Your document management system may access the same repository with SVNKit (either locally or by network) to get files and to modify them. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! abhishek.agarwal wrote: > Greetings, > I am Abhishek. I am trying to extend a document management system to provide > a face for SVN Client (for example Tortoise SVN). > So, I have developed my own mechanism for this on server side by simply > extending webDavServlet provided by apache. > > This document management system keeps properties and metadata related to > files in database while files are stored in file system. > > I need to support any SVN client to maintain the working copy. To accomplish > this , we need to make several changes in order to make our application > accustomed to TSVN protocol. Since our application is developed in java, I > found SVNKit very useful for this purpose. > > How can I use Svnkit to simulate a subversion server interface for any SVN > Client (Tortoise SVN, SubEclipse etc). My Web Application will handle the > server side events like checkout, checkin etc. > > I am facing many problems in developing a interface between these two. > Please suggest me How can I achieve this? > > thanks for the help > > regards, > Abhishek --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Integration with SVN ClientsDear Alexander,
Thank you for replying. Yes I agree that it is surely not a really an easy task. Currently I am using reverse-engineering-approach and trying to develop the Subversion server implementation by tracking down the communication(Basically Http Requests and Responses) . I essentially need to implement all Web-Dav Protocol methods and Delta-V methods in my servlet in the same way, the webDavServlet provided by tomcat does. I have successfully tried TortoiseSVN to list my Files on a system.Now in checkout method, I need to find Text Delta of files. I found package org.tmatesoft.svn.core.internal.delta in SVNkit which was very useful for this particular requirement. I didn't find java bindings very useful but I found this package org.tmatesoft.svn.core.internal.server.dav in at SVNKit repository browser which was not in the source code. I downloaded directly from website. Can this package be useful for what I am trying to achieve? Regards, Abhishek Agarwal
|
|
|
Re: Integration with SVN ClientsHello Abhishek,
> I didn't find java bindings very useful but I found this package > org.tmatesoft.svn.core.internal.server.dav > in at SVNKit repository browser which was not in the source code. I > downloaded directly from website. > Can this package be useful for what I am trying to achieve? This package we have in "trunk" is our Subversion DAV server implementation (it is only supports read-only operations and doesn't provide Subversion 1.5.0 specific methods). If you build SVNKit from "trunk" (with "ant deploy" command) you will get svnkit.war - web application you may deploy and use as read-only Subversion server. However, I think this is not exactly what you need as it is merely a translation of DAV requests into SVNRepository calls and back. As far as I understood you need to translate DAV requests to something different then to SVNRepository calls, as your files are not stored in repository. But you may of course use this code as a reference if you need it. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! abhishek.agarwal wrote: > Dear Alexander, > Thank you for replying. > Yes I agree that it is surely not a really an easy task. > Currently I am using reverse-engineering-approach and trying to develop the > Subversion server implementation by tracking down the > communication(Basically Http Requests and Responses) . I essentially need to > implement all Web-Dav Protocol methods and Delta-V methods in my servlet in > the same way, the webDavServlet provided by tomcat does. I have successfully > tried TortoiseSVN to list my Files on a system.Now in checkout method, I > need to find Text Delta of files. > I found package org.tmatesoft.svn.core.internal.delta in SVNkit which was > very useful for this particular requirement. > I didn't find java bindings very useful but I found this package > org.tmatesoft.svn.core.internal.server.dav > in at SVNKit repository browser which was not in the source code. I > downloaded directly from website. > Can this package be useful for what I am trying to achieve? > > Regards, > Abhishek Agarwal > > Alexander Kitaev-3 wrote: >> Hello, >> >> What you're about to do is to implement Subversion DAV server that is >> not really an easy task - Subversion extends standard DAV protocol and >> uses Subversion repository as a storage. There is a lot of Subversion >> specific things in Subversion DAV implementation. >> >> You may find more information on that in Subversion documentation >> (though it is somewhat limited), see >> http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol for example >> as well as other files in "notes" directory. >> >> May be it would be easier for you to keep files of your document >> management system in Subversion repository on the server side and let >> apache server with mod_dav_svn provide access for Subversion clients to >> it. Your document management system may access the same repository with >> SVNKit (either locally or by network) to get files and to modify them. >> >> Alexander Kitaev, >> TMate Software, >> http://svnkit.com/ - Java [Sub]Versioning Library! >> >> abhishek.agarwal wrote: >>> Greetings, >>> I am Abhishek. I am trying to extend a document management system to >>> provide >>> a face for SVN Client (for example Tortoise SVN). >>> So, I have developed my own mechanism for this on server side by simply >>> extending webDavServlet provided by apache. >>> >>> This document management system keeps properties and metadata related to >>> files in database while files are stored in file system. >>> >>> I need to support any SVN client to maintain the working copy. To >>> accomplish >>> this , we need to make several changes in order to make our application >>> accustomed to TSVN protocol. Since our application is developed in java, >>> I >>> found SVNKit very useful for this purpose. >>> >>> How can I use Svnkit to simulate a subversion server interface for any >>> SVN >>> Client (Tortoise SVN, SubEclipse etc). My Web Application will handle the >>> server side events like checkout, checkin etc. >>> >>> I am facing many problems in developing a interface between these two. >>> Please suggest me How can I achieve this? >>> >>> thanks for the help >>> >>> regards, >>> Abhishek >> --------------------------------------------------------------------- >> 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: Integration with SVN ClientsHello,
As per you suggested, I used SvnKit for check-in ,check-out operations using tortoiseSVN to my web application and it was quite successful. However , commit operation is working only for small size files.When I try to commit a new file larger than 1MB or so using tortoiseSVN , it throws an ArrayIndexOutofBounds Exception.When I tried to explore a bit more,I found out that for some COPY FROM TARGET SOURCE instructions , offset of instruction is coming to be -1. I am using SVNdeltaReader and SVNdiffwindows for this purpose.Please suggest me what mistake I might be making here. Should I use some other classes like SVNDeltaCombiner for reading multiple windows from a delta stream.. Regards Abhishek
|
|
|
Re: Integration with SVN ClientsHello,
SVNDeltaReader should be used to compose SVNDiffWindow objects from the raw input stream and feed them to the ISVNEditor or ISVNDeltaConsumer implementation. Deltas for larger files differs from those of smaller ones, because usually they are composed from several SVNDiffWindow's. Anyway what could help us to resolve the problem you experience is source code you're using and better description of what you're trying to achieve. Could you please provide part of the source code that uses SVNDeltaReader? What version of SVNKit do you use? Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! abhishek.agarwal wrote: > Hello, > As per you suggested, I used SvnKit for check-in ,check-out operations using > tortoiseSVN to my web application and it was quite successful. However , > commit operation is working only for small size files.When I try to commit a > new file larger than 1MB or so using tortoiseSVN , it throws an > ArrayIndexOutofBounds Exception.When I tried to explore a bit more,I found > out that for some COPY FROM TARGET SOURCE instructions , offset of > instruction is coming to be -1. > I am using SVNdeltaReader and SVNdiffwindows for this purpose.Please suggest > me what mistake I might be making here. Should I use some other classes like > SVNDeltaCombiner for reading multiple windows from a delta stream.. > > Regards > Abhishek > > Alexander Kitaev-3 wrote: >> Hello Abhishek, >> >> > I didn't find java bindings very useful but I found this package >> > org.tmatesoft.svn.core.internal.server.dav >> > in at SVNKit repository browser which was not in the source code. I >> > downloaded directly from website. >> > Can this package be useful for what I am trying to achieve? >> This package we have in "trunk" is our Subversion DAV server >> implementation (it is only supports read-only operations and doesn't >> provide Subversion 1.5.0 specific methods). If you build SVNKit from >> "trunk" (with "ant deploy" command) you will get svnkit.war - web >> application you may deploy and use as read-only Subversion server. >> >> However, I think this is not exactly what you need as it is merely a >> translation of DAV requests into SVNRepository calls and back. As far as >> I understood you need to translate DAV requests to something different >> then to SVNRepository calls, as your files are not stored in repository. >> But you may of course use this code as a reference if you need it. >> >> Alexander Kitaev, >> TMate Software, >> http://svnkit.com/ - Java [Sub]Versioning Library! >> >> abhishek.agarwal wrote: >>> Dear Alexander, >>> Thank you for replying. >>> Yes I agree that it is surely not a really an easy task. >>> Currently I am using reverse-engineering-approach and trying to develop >>> the >>> Subversion server implementation by tracking down the >>> communication(Basically Http Requests and Responses) . I essentially need >>> to >>> implement all Web-Dav Protocol methods and Delta-V methods in my servlet >>> in >>> the same way, the webDavServlet provided by tomcat does. I have >>> successfully >>> tried TortoiseSVN to list my Files on a system.Now in checkout method, I >>> need to find Text Delta of files. >>> I found package org.tmatesoft.svn.core.internal.delta in SVNkit which was >>> very useful for this particular requirement. >>> I didn't find java bindings very useful but I found this package >>> org.tmatesoft.svn.core.internal.server.dav >>> in at SVNKit repository browser which was not in the source code. I >>> downloaded directly from website. >>> Can this package be useful for what I am trying to achieve? >>> >>> Regards, >>> Abhishek Agarwal >>> >>> Alexander Kitaev-3 wrote: >>>> Hello, >>>> >>>> What you're about to do is to implement Subversion DAV server that is >>>> not really an easy task - Subversion extends standard DAV protocol and >>>> uses Subversion repository as a storage. There is a lot of Subversion >>>> specific things in Subversion DAV implementation. >>>> >>>> You may find more information on that in Subversion documentation >>>> (though it is somewhat limited), see >>>> http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol for example >>>> as well as other files in "notes" directory. >>>> >>>> May be it would be easier for you to keep files of your document >>>> management system in Subversion repository on the server side and let >>>> apache server with mod_dav_svn provide access for Subversion clients to >>>> it. Your document management system may access the same repository with >>>> SVNKit (either locally or by network) to get files and to modify them. >>>> >>>> Alexander Kitaev, >>>> TMate Software, >>>> http://svnkit.com/ - Java [Sub]Versioning Library! >>>> >>>> abhishek.agarwal wrote: >>>>> Greetings, >>>>> I am Abhishek. I am trying to extend a document management system to >>>>> provide >>>>> a face for SVN Client (for example Tortoise SVN). >>>>> So, I have developed my own mechanism for this on server side by simply >>>>> extending webDavServlet provided by apache. >>>>> >>>>> This document management system keeps properties and metadata related >>>>> to >>>>> files in database while files are stored in file system. >>>>> >>>>> I need to support any SVN client to maintain the working copy. To >>>>> accomplish >>>>> this , we need to make several changes in order to make our application >>>>> accustomed to TSVN protocol. Since our application is developed in >>>>> java, >>>>> I >>>>> found SVNKit very useful for this purpose. >>>>> >>>>> How can I use Svnkit to simulate a subversion server interface for any >>>>> SVN >>>>> Client (Tortoise SVN, SubEclipse etc). My Web Application will handle >>>>> the >>>>> server side events like checkout, checkin etc. >>>>> >>>>> I am facing many problems in developing a interface between these two. >>>>> Please suggest me How can I achieve this? >>>>> >>>>> thanks for the help >>>>> >>>>> regards, >>>>> Abhishek >>>> --------------------------------------------------------------------- >>>> 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@... |
|
|
Re: Integration with SVN ClientsHi,
I have alreay fixed this problem. You are right.For larger diffs, TortoiseSVN provides several diff winodws to the client instead of a single window.The problem was actually occuring in setData() function of SVNdiffwindow because of which it was not reading the instructions in proper manner. So I made a little change in it and made it something like this public void setData(ByteBuffer buffer) { myData = new byte[getDataLength()]; myDataOffset = 0; System.arraycopy(buffer.array(), buffer.position() + buffer.arrayOffset(), myData, 0, getDataLength()); } From the original one /* public void setData(ByteBuffer buffer) { myData = buffer.array(); myDataOffset = buffer.position() + buffer.arrayOffset(); }*/ I might be the only one facing this problem because I am not using ISVNEditor or ISVNDeltaConsumer but I am using window.apply () function to construct the target. Since a window should have only its data in place of complete whole data in buffer,I considered to do this change in code the right thing to do.And as a result , it is working very fine now even in case of files up to 20-25 MB. I also wanted to know that does a window needs the previous windows or the contents of target buffer constructed till last window to construct the next part of target?? Regards, Abhishek
|
|
|
Re: Integration with SVN ClientsHello,
> public void setData(ByteBuffer buffer) { > myData = new byte[getDataLength()]; > myDataOffset = 0; > System.arraycopy(buffer.array(), buffer.position() + > buffer.arrayOffset(), > myData, 0, getDataLength()); > } > > From the original one > > /* public void setData(ByteBuffer buffer) { > myData = buffer.array(); > myDataOffset = buffer.position() + buffer.arrayOffset(); > }*/ For performance reasons single SVNDiffWindow object is shared during update process. That is why new "data" is set to the window and old "data" is discarded. As a result, with the original code, you have to process SVNDiffWindow before fetching new one - you couldn't collect them and process all collect windows at the end of the operation - this will also result in high memory usage. I think you may use the code like that: while(dataAvailable) { svnDeltaReader.nextWindow(...., consumer); } svnDeltaReader.reset(..., consumer); And consumer will be implementation of ISVNDeltaConsumer that calls SVNDeltaProcessor.applyTextDelta(...) - this way you'll not need to collect SVNDiffWindow objects and will not have to change original code. > I also wanted to know that does a window needs the previous windows or the > contents of target buffer constructed till last window to construct the next > part of target?? SVNDiffWindow doesn't need previous SVNDiffWindow. It uses data included into window itself (new data), "source" data - data from the "base" version of the file and "target" data - data already generated by this window. Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! abhishek.agarwal wrote: > Hi, > I have alreay fixed this problem. You are right.For larger diffs, > TortoiseSVN provides several diff winodws to the client instead of a single > window.The problem was actually occuring in setData() function of > SVNdiffwindow because of which it was not reading the instructions in proper > manner. So I made a little change in it and made it something like this > > public void setData(ByteBuffer buffer) { > myData = new byte[getDataLength()]; > myDataOffset = 0; > System.arraycopy(buffer.array(), buffer.position() + > buffer.arrayOffset(), > myData, 0, getDataLength()); > } > > From the original one > > /* public void setData(ByteBuffer buffer) { > myData = buffer.array(); > myDataOffset = buffer.position() + buffer.arrayOffset(); > }*/ > > I might be the only one facing this problem because I am not using > ISVNEditor or ISVNDeltaConsumer but I am using window.apply () function to > construct the target. > Since a window should have only its data in place of complete whole data in > buffer,I considered to do this change in code the right thing to do.And as a > result , it is working very fine now even in case of files up to 20-25 MB. > I also wanted to know that does a window needs the previous windows or the > contents of target buffer constructed till last window to construct the next > part of target?? > > Regards, > Abhishek > > Alexander Kitaev-3 wrote: >> Hello, >> >> SVNDeltaReader should be used to compose SVNDiffWindow objects from the >> raw input stream and feed them to the ISVNEditor or ISVNDeltaConsumer >> implementation. >> >> Deltas for larger files differs from those of smaller ones, because >> usually they are composed from several SVNDiffWindow's. >> >> Anyway what could help us to resolve the problem you experience is >> source code you're using and better description of what you're trying to >> achieve. Could you please provide part of the source code that uses >> SVNDeltaReader? >> >> What version of SVNKit do you use? >> >> Alexander Kitaev, >> TMate Software, >> http://svnkit.com/ - Java [Sub]Versioning Library! >> >> abhishek.agarwal wrote: >>> Hello, >>> As per you suggested, I used SvnKit for check-in ,check-out operations >>> using >>> tortoiseSVN to my web application and it was quite successful. However , >>> commit operation is working only for small size files.When I try to >>> commit a >>> new file larger than 1MB or so using tortoiseSVN , it throws an >>> ArrayIndexOutofBounds Exception.When I tried to explore a bit more,I >>> found >>> out that for some COPY FROM TARGET SOURCE instructions , offset of >>> instruction is coming to be -1. >>> I am using SVNdeltaReader and SVNdiffwindows for this purpose.Please >>> suggest >>> me what mistake I might be making here. Should I use some other classes >>> like >>> SVNDeltaCombiner for reading multiple windows from a delta stream.. >>> >>> Regards >>> Abhishek >>> >>> Alexander Kitaev-3 wrote: >>>> Hello Abhishek, >>>> >>>> > I didn't find java bindings very useful but I found this package >>>> > org.tmatesoft.svn.core.internal.server.dav >>>> > in at SVNKit repository browser which was not in the source code. I >>>> > downloaded directly from website. >>>> > Can this package be useful for what I am trying to achieve? >>>> This package we have in "trunk" is our Subversion DAV server >>>> implementation (it is only supports read-only operations and doesn't >>>> provide Subversion 1.5.0 specific methods). If you build SVNKit from >>>> "trunk" (with "ant deploy" command) you will get svnkit.war - web >>>> application you may deploy and use as read-only Subversion server. >>>> >>>> However, I think this is not exactly what you need as it is merely a >>>> translation of DAV requests into SVNRepository calls and back. As far as >>>> I understood you need to translate DAV requests to something different >>>> then to SVNRepository calls, as your files are not stored in repository. >>>> But you may of course use this code as a reference if you need it. >>>> >>>> Alexander Kitaev, >>>> TMate Software, >>>> http://svnkit.com/ - Java [Sub]Versioning Library! >>>> >>>> abhishek.agarwal wrote: >>>>> Dear Alexander, >>>>> Thank you for replying. >>>>> Yes I agree that it is surely not a really an easy task. >>>>> Currently I am using reverse-engineering-approach and trying to develop >>>>> the >>>>> Subversion server implementation by tracking down the >>>>> communication(Basically Http Requests and Responses) . I essentially >>>>> need >>>>> to >>>>> implement all Web-Dav Protocol methods and Delta-V methods in my >>>>> servlet >>>>> in >>>>> the same way, the webDavServlet provided by tomcat does. I have >>>>> successfully >>>>> tried TortoiseSVN to list my Files on a system.Now in checkout method, >>>>> I >>>>> need to find Text Delta of files. >>>>> I found package org.tmatesoft.svn.core.internal.delta in SVNkit which >>>>> was >>>>> very useful for this particular requirement. >>>>> I didn't find java bindings very useful but I found this package >>>>> org.tmatesoft.svn.core.internal.server.dav >>>>> in at SVNKit repository browser which was not in the source code. I >>>>> downloaded directly from website. >>>>> Can this package be useful for what I am trying to achieve? >>>>> >>>>> Regards, >>>>> Abhishek Agarwal >>>>> >>>>> Alexander Kitaev-3 wrote: >>>>>> Hello, >>>>>> >>>>>> What you're about to do is to implement Subversion DAV server that is >>>>>> not really an easy task - Subversion extends standard DAV protocol and >>>>>> uses Subversion repository as a storage. There is a lot of Subversion >>>>>> specific things in Subversion DAV implementation. >>>>>> >>>>>> You may find more information on that in Subversion documentation >>>>>> (though it is somewhat limited), see >>>>>> http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol for >>>>>> example >>>>>> as well as other files in "notes" directory. >>>>>> >>>>>> May be it would be easier for you to keep files of your document >>>>>> management system in Subversion repository on the server side and let >>>>>> apache server with mod_dav_svn provide access for Subversion clients >>>>>> to >>>>>> it. Your document management system may access the same repository >>>>>> with >>>>>> SVNKit (either locally or by network) to get files and to modify them. >>>>>> >>>>>> Alexander Kitaev, >>>>>> TMate Software, >>>>>> http://svnkit.com/ - Java [Sub]Versioning Library! >>>>>> >>>>>> abhishek.agarwal wrote: >>>>>>> Greetings, >>>>>>> I am Abhishek. I am trying to extend a document management system to >>>>>>> provide >>>>>>> a face for SVN Client (for example Tortoise SVN). >>>>>>> So, I have developed my own mechanism for this on server side by >>>>>>> simply >>>>>>> extending webDavServlet provided by apache. >>>>>>> >>>>>>> This document management system keeps properties and metadata related >>>>>>> to >>>>>>> files in database while files are stored in file system. >>>>>>> >>>>>>> I need to support any SVN client to maintain the working copy. To >>>>>>> accomplish >>>>>>> this , we need to make several changes in order to make our >>>>>>> application >>>>>>> accustomed to TSVN protocol. Since our application is developed in >>>>>>> java, >>>>>>> I >>>>>>> found SVNKit very useful for this purpose. >>>>>>> >>>>>>> How can I use Svnkit to simulate a subversion server interface for >>>>>>> any >>>>>>> SVN >>>>>>> Client (Tortoise SVN, SubEclipse etc). My Web Application will handle >>>>>>> the >>>>>>> server side events like checkout, checkin etc. >>>>>>> >>>>>>> I am facing many problems in developing a interface between these >>>>>>> two. >>>>>>> Please suggest me How can I achieve this? >>>>>>> >>>>>>> thanks for the help >>>>>>> >>>>>>> regards, >>>>>>> Abhishek >>>>>> --------------------------------------------------------------------- >>>>>> 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@... >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Integration with SVN ClientsThanks..that will help me great
|
| Free Forum Powered by Nabble | Forum Help |