Project

General

Profile

Feature #1869

Allow alternative SVN client implementations for SVNCR

Added by Udo Offermann almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
30.12.2014
Due date:
% Done:

100%

Estimated time:
origin:

Description

Today com.zfabrik.boot.svnaccess uses SVNKit as SVN-client implementation. SVNKit's free of charge open-source license is not allowed for commercial use. Therefore we need an alternative SVN client implementation for business scenarios.

The idea is to use SvnClientAdapter as high-level SVN-client API (Apache Licenece Version 2) which can be used with different implementations such as SVNKit, JavaHL and SVN command line client. The different implementations will be covered by variations of com.zfabrik.boot.svnaccess like com.zfabrik.boot.svnaccess.svnkit, com.zfabrik.boot.svnaccess.javahl and com.zfabrik.boot.svnaccess.cmdline.

This issue contains the following steps:

  1. com.zfabrik.boot.svncr uses SvnClientAdapter as SVN client API
  2. All com.zfabrik.boot.svnaccess.xyz gets a private reference to com.zfabrik.boot.svncr and provide their specific implementation including all necessary libraries
  3. Furthermore all com.zfabrik.boot.svnaccess.xyz modules provide an any-component which establishes the access to the implementation. The component can be found by a specific property com.zfabrik.extension=com.zfabrik.svnaccess. The corresponding Resource-class returns the SvnClientAdapter interface when calling its as() method.
  4. com.zfabrik.boot.svncr queries for com.zfabrik.extension=com.zfabrik.svnaccess in order to retrive the SvnClientAdapter interface.

Related issues

Related to z2-Environment - Bug #1903: com.zfabrik.boot.svnaccess computes wrong base-line revision for branchesResolved17.06.2015Udo Offermann

Actions
#1

Updated by Udo Offermann almost 10 years ago

  • Description updated (diff)
#3

Updated by Udo Offermann almost 10 years ago

  • Status changed from New to In Progress
#4

Updated by Udo Offermann almost 10 years ago

  • % Done changed from 0 to 30
#5

Updated by Udo Offermann almost 10 years ago

How to SVN using WebDAV?

get latest revision, UUID and SVN repository root

Request

PROPFIND /svn/z2-environment/trunk/z2-base.base HTTP/1.1
Host: z2-environment.net
User-Agent: SVN/1.8.1 SVNKit/1.8.1 (http://svnkit.com/) r10101_v20131210_2023
Keep-Alive: 
Connection: Keep-Alive
Content-Length: 0
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8" 
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Depth: 0

Response

HTTP/1.1 207 Multi-Status
Date: Fri, 09 Jan 2015 14:48:32 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 1366
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8" 

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
  <D:response xmlns:S="http://subversion.tigris.org/xmlns/svn/" xmlns:C="http://subversion.tigris.org/xmlns/custom/" xmlns:V="http://subversion.tigris.org/xmlns/dav/" xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/">
    <D:href>/svn/z2-environment/trunk/z2-base.base/</D:href>
    <D:propstat>
      <D:prop>
        <S:ignore>.git</S:ignore>
        <lp1:resourcetype>
          <D:collection/>
        </lp1:resourcetype>
        <lp1:getcontenttype>text/html; charset=UTF-8</lp1:getcontenttype>
        <lp1:getetag>W/"133//trunk/z2-base.base"</lp1:getetag>
        <lp1:creationdate>2014-05-20T14:47:21.200217Z</lp1:creationdate>
        <lp1:getlastmodified>Tue, 20 May 2014 14:47:21 GMT</lp1:getlastmodified>
        <lp1:checked-in>
          <D:href>/svn/z2-environment/!svn/ver/133/trunk/z2-base.base</D:href>
        </lp1:checked-in>
        <lp1:version-controlled-configuration>
          <D:href>/svn/z2-environment/!svn/vcc/default</D:href>                                   <------- version controlled configuration
        </lp1:version-controlled-configuration>
        <lp1:version-name>133</lp1:version-name>                                                  <------- latest revision
        <lp1:creator-displayname>zfabrik</lp1:creator-displayname>
        <lp2:baseline-relative-path>trunk/z2-base.base</lp2:baseline-relative-path>               <------- SVN relative path
        <lp2:repository-uuid>175cccd5-0b0a-40d5-a0dc-a981affa0124</lp2:repository-uuid>           <------- UUID
        <lp2:deadprop-count>1</lp2:deadprop-count>
        <D:lockdiscovery/>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>
</D:multistatus>

SVN GET-CONTENT

Request

GET /svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment/home.properties HTTP/1.1
Host: z2-environment.net
User-Agent: SVN/1.8.1 SVNKit/1.8.1 (http://svnkit.com/) r10101_v20131210_2023
Keep-Alive: 
Connection: TE, Keep-Alive
TE: trailers
Content-Length: 0
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8" 
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops

Response

HTTP/1.1 200 OK
Date: Tue, 13 Jan 2015 11:51:21 GMT
Server: Apache/2.2.14 (Ubuntu)
Last-Modified: Wed, 26 Sep 2012 14:24:11 GMT
ETag: "17//trunk/z2-base.base/environment/home.properties" 
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Length: 84
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain

com.zfabrik.component.type=com.zfabrik.homeLayout
home.workers=environment/webWorker

SVN LIST

Request

PROPFIND /svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment HTTP/1.1
Host: z2-environment.net
User-Agent: SVN/1.8.1 SVNKit/1.8.1 (http://svnkit.com/) r10101_v20131210_2023
Keep-Alive: 
Connection: Keep-Alive
Content-Length: 319
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8" 
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Depth: 1

<?xml version="1.0" encoding="UTF-8"?>
<propfind xmlns="DAV:">
<prop><resourcetype xmlns="DAV:"/>
<getcontentlength xmlns="DAV:"/>
<deadprop-count xmlns="http://subversion.tigris.org/xmlns/dav/"/>
<version-name xmlns="DAV:"/>
<creationdate xmlns="DAV:"/>
<creator-displayname xmlns="DAV:"/>
</prop>
</propfind>

Response

HTTP/1.1 207 Multi-Status
Date: Fri, 09 Jan 2015 14:58:36 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 24200
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8" 

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:ns1="http://subversion.tigris.org/xmlns/dav/" xmlns:ns0="DAV:">
  <D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/" xmlns:g0="DAV:">
    <D:href>/svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment/</D:href>                  <------- dir entry
    <D:propstat>
      <D:prop>
        <lp1:resourcetype>
          <D:collection/>                                                                             <------- it's a directory
        </lp1:resourcetype>
        <lp2:deadprop-count>0</lp2:deadprop-count>
        <lp1:version-name>133</lp1:version-name>
        <lp1:creationdate>2014-05-20T14:47:21.200217Z</lp1:creationdate>
        <lp1:creator-displayname>zfabrik</lp1:creator-displayname>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
      <D:prop>
        <g0:getcontentlength/>
      </D:prop>
      <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
  </D:response>
  <D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/" xmlns:g0="DAV:">
    <D:href>/svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment/log4j/</D:href>
    <D:propstat>
      <D:prop>
        <lp1:resourcetype>
          <D:collection/>
        </lp1:resourcetype>
        <lp2:deadprop-count>0</lp2:deadprop-count>
        <lp1:version-name>17</lp1:version-name>
        <lp1:creationdate>2012-09-26T14:24:11.458431Z</lp1:creationdate>
        <lp1:creator-displayname>udoo</lp1:creator-displayname>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
      <D:prop>
        <g0:getcontentlength/>
      </D:prop>
      <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
  </D:response>
  <D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/" xmlns:g0="DAV:">
    <D:href>/svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment/webUsers/</D:href>
    <D:propstat>
      <D:prop>
        <lp1:resourcetype>
          <D:collection/>
        </lp1:resourcetype>
        <lp2:deadprop-count>0</lp2:deadprop-count>
        <lp1:version-name>65</lp1:version-name>
        <lp1:creationdate>2012-12-11T15:26:46.279846Z</lp1:creationdate>
        <lp1:creator-displayname>udoo</lp1:creator-displayname>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
      <D:prop>
        <g0:getcontentlength/>
      </D:prop>
      <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
  </D:response>
  <D:response xmlns:lp1="DAV:" xmlns:lp2="http://subversion.tigris.org/xmlns/dav/">
    <D:href>/svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment/.classpath</D:href>        <------- dir entry
    <D:propstat>
      <D:prop>
        <lp1:resourcetype/>                                                                           <------- it's a file
        <lp1:getcontentlength>240</lp1:getcontentlength>
        <lp2:deadprop-count>0</lp2:deadprop-count>
        <lp1:version-name>17</lp1:version-name>
        <lp1:creationdate>2012-09-26T14:24:11.458431Z</lp1:creationdate>
        <lp1:creator-displayname>udoo</lp1:creator-displayname>
      </D:prop>
      <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
  </D:response>

SVN LOG

Request

REPORT /svn/z2-environment/!svn/bc/166/trunk/z2-base.base/environment HTTP/1.1
Host: z2-environment.net
User-Agent: SVN/1.8.1 SVNKit/1.8.1 (http://svnkit.com/) r10101_v20131210_2023
Keep-Alive: 
Connection: TE, Keep-Alive
TE: trailers
Content-Length: 335
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8" 
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Accept-Encoding: svndiff1;q=0.9,svndiff;q=0.8

<?xml version="1.0" encoding="UTF-8"?>
<S:log-report xmlns:S="svn:">
  <S:start-revision>166</S:start-revision>
  <S:end-revision>0</S:end-revision>
  <S:limit>26</S:limit>
  <S:discover-changed-paths/>
  <S:revprop>svn:author</S:revprop>
  <S:revprop>svn:date</S:revprop>
  <S:revprop>svn:log</S:revprop>
  <S:path></S:path>
</S:log-report>

Response

HTTP/1.1 200 OK
Date: Fri, 09 Jan 2015 15:10:46 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8" 
Content-Length: 289951

<?xml version="1.0" encoding="utf-8"?>
<S:log-report xmlns:S="svn:" xmlns:D="DAV:">
  <S:log-item>
    <D:version-name>133</D:version-name>
    <D:comment>transport from http://git.z2-environment.net/z2-base.base#master at Tue May 20 16:47:19 CEST 2014, epoch=1400597239...</D:comment>
    <D:creator-displayname>zfabrik</D:creator-displayname>
    <S:date>2014-05-20T14:47:21.200217Z</S:date>
    <S:added-path node-kind="dir">/trunk/z2-base.base/com.zfabrik.mvncr/java/bin.impl</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/bin.impl/lib/plexus-classworlds-2.4.jar</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/bin.impl/lib/plexus-component-annotations-1.5.5.jar</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/bin.impl/lib/httpclient-4.2.6.jar</S:added-path>
    <S:deleted-path node-kind="dir">/trunk/z2-base.base/org.hibernate</S:deleted-path>
    <S:added-path node-kind="dir">/trunk/z2-base.base/com.zfabrik.mvncr/java/src.test/com/zfabrik/test/mvncr</S:added-path>
    <S:added-path node-kind="dir">/trunk/z2-base.base/com.zfabrik.components/java/src.impl/com/zfabrik/impl/components/properties</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/src.impl/com/zfabrik/impl/mvncr/util/LoggingTransferListener.java</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/src.impl/com/zfabrik/impl/mvncr/ArtifactResolver.java</S:added-path>
    <S:added-path node-kind="dir">/trunk/z2-base.base/com.zfabrik.mvncr/java/src.test/com</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/.gitignore</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/src.test/com/zfabrik/test/mvncr/DownloadArtifactFromMavenRepo.java</S:added-path>
    <S:added-path node-kind="file">/trunk/z2-base.base/com.zfabrik.mvncr/java/bin.impl/lib/httpcore-4.2.5.jar</S:added-path>
    <S:modified-path node-kind="file">/trunk/z2-base.base/environment/coreRevisionCheck.properties</S:modified-path>
    ...

SVN Export

Request

REPORT /svn/z2-environment/!svn/vcc/default HTTP/1.1
Host: z2-environment.net
User-Agent: SVN/1.8.1 SVNKit/1.8.1 (http://svnkit.com/) r10101_v20131210_2023
Keep-Alive: 
Connection: Keep-Alive
Content-Length: 350
Content-Type: text/xml; charset="ascii" 
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops

<?xml version="1.0" encoding="UTF-8"?>
<S:update-report xmlns:S="svn:" send-all="true">
  <S:src-path>http://z2-environment.net/svn/z2-environment/trunk/z2-base.base/environment</S:src-path>
  <S:target-revision>166</S:target-revision>
  <S:depth>infinity</S:depth>
  <S:entry start-empty="true" rev="166" depth="infinity"></S:entry>
</S:update-report>

Response

HTTP/1.1 200 OK
Date: Fri, 09 Jan 2015 16:16:36 GMT
Server: Apache/2.2.14 (Ubuntu)
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8" 
Content-Length: 69077

<?xml version="1.0" encoding="utf-8"?>
<S:update-report xmlns:S="svn:" xmlns:V="http://subversion.tigris.org/xmlns/dav/" xmlns:D="DAV:" send-all="true">
  <S:target-revision rev="166"/>
  <S:open-directory rev="166">
    <D:checked-in>
      <D:href>/svn/z2-environment/!svn/ver/133/trunk/z2-base.base/environment</D:href>
    </D:checked-in>
    <S:set-prop name="svn:entry:committed-rev">133</S:set-prop>
    <S:set-prop name="svn:entry:committed-date">2014-05-20T14:47:21.200217Z</S:set-prop>
    <S:set-prop name="svn:entry:last-author">zfabrik</S:set-prop>
    <S:set-prop name="svn:entry:uuid">175cccd5-0b0a-40d5-a0dc-a981affa0124</S:set-prop>
    <S:add-directory name="log4j" bc-url="/svn/z2-environment/!svn/bc/17/trunk/z2-base.base/environment/log4j">
      <D:checked-in>
        <D:href>/svn/z2-environment/!svn/ver/17/trunk/z2-base.base/environment/log4j</D:href>
      </D:checked-in>
      <S:set-prop name="svn:entry:committed-rev">17</S:set-prop>
      <S:set-prop name="svn:entry:committed-date">2012-09-26T14:24:11.458431Z</S:set-prop>
      <S:set-prop name="svn:entry:last-author">udoo</S:set-prop>
      <S:set-prop name="svn:entry:uuid">175cccd5-0b0a-40d5-a0dc-a981affa0124</S:set-prop>
      <S:add-file name="z.properties">
        <D:checked-in>
          <D:href>/svn/z2-environment/!svn/ver/17/trunk/z2-base.base/environment/log4j/z.properties</D:href>
        </D:checked-in>
        <S:set-prop name="svn:entry:committed-rev">17</S:set-prop>
        <S:set-prop name="svn:entry:committed-date">2012-09-26T14:24:11.458431Z</S:set-prop>
        <S:set-prop name="svn:entry:last-author">udoo</S:set-prop>
        <S:set-prop name="svn:entry:uuid">175cccd5-0b0a-40d5-a0dc-a981affa0124</S:set-prop>
        <S:txdelta>U1ZOAAAAgQMDgQOAgQNjb20uemZhYnJpay5jb21wb25lbnQudHlwZT1vcmcuYXBhY2hlLmxvZzRq                  <---- base-64 encoded - 
          LmNvbmZpZ3VyYXRpb24KCgpjb20uemZhYnJpay5zeXN0ZW1TdGF0ZXMucGFydGljaXBhdGlvbj1j                                 first 14 bytes are checksum if starting with 
          b20uemZhYnJpay5ib290Lm1haW4vd29ya2VyX3VwCg==</S:txdelta>                                                     53 56 4E 00 00 00
        <S:prop>
          <V:md5-checksum>ac1b7e89715d841db160e48104173ee1</V:md5-checksum>
        </S:prop>
      </S:add-file>
      <S:add-file name="log4j.properties">
        <D:checked-in>
          <D:href>/svn/z2-environment/!svn/ver/17/trunk/z2-base.base/environment/log4j/log4j.properties</D:href>
        </D:checked-in>
        <S:set-prop name="svn:entry:committed-rev">17</S:set-prop>
        <S:set-prop name="svn:entry:committed-date">2012-09-26T14:24:11.458431Z</S:set-prop>
        <S:set-prop name="svn:entry:last-author">udoo</S:set-prop>
        <S:set-prop name="svn:entry:uuid">175cccd5-0b0a-40d5-a0dc-a981affa0124</S:set-prop>
        <S:txdelta>U1ZOAAAAhCMDhCOAhCMjICoqKioqIFNldCByb290IGxvZ2dlciBsZXZlbCBhbmQgaXRzIG9ubHkg
          YXBwZW5kZXIgdG8gQS4KbG9nNGoucm9vdExvZ2dlcj1XQVJOLCBBCgojICoqKioqIEEgaXMgc2V0
          IHRvIGJlIGEgQ29uc29sZUFwcGVuZGVyLgpsb2c0ai5hcHBlbmRlci5BPW9yZy5hcGFjaGUubG9n
          NGouQ29uc29sZUFwcGVuZGVyCiMgKioqKiogQSB1c2VzIFBhdHRlcm5MYXlvdXQuCmxvZzRqLmFw
          cGVuZGVyLkEubGF5b3V0PW9yZy5hcGFjaGUubG9nNGouUGF0dGVybkxheW91dApsb2c0ai5hcHBl
          bmRlci5BLmxheW91dC5Db252ZXJzaW9uUGF0dGVybj0lLTVwICVjICV4IC0gJW0lbgoKIwojIGpl
          dHR5IGxvZ2dpbmcgY29uZmlnIChkZWZhdWx0cyB0byBhdCBsZWFzdCBzZWUgdmVyc2lvbiBhbmQg
          Y29ubmVjdG9yKQojCiMgbG9nNGoubG9nZ2VyLm9yZy5lY2xpcHNlLmpldHR5PURFQlVHCmxvZzRq
          LmxvZ2dlci5vcmcuZWNsaXBzZS5qZXR0eS5zZXJ2ZXIuU2VydmVyPUlORk8KbG9nNGoubG9nZ2Vy
          Lm9yZy5lY2xpcHNlLmpldHR5LnNlcnZlci5BYnN0cmFjdENvbm5lY3Rvcj1JTkZP</S:txdelta>
        <S:prop>
          <V:md5-checksum>536829049c7b4ce03fe8d7faea93d5bd</V:md5-checksum>
        </S:prop>
      </S:add-file>
      <S:prop></S:prop>
    </S:add-directory>
    <S:add-directory name="webUsers" bc-url="/svn/z2-environment/!svn/bc/65/trunk/z2-base.base/environment/webUsers">
...
#6

Updated by Udo Offermann almost 10 years ago

  • Status changed from In Progress to Resolved
#7

Updated by Udo Offermann almost 10 years ago

  • % Done changed from 30 to 100
#8

Updated by Udo Offermann over 9 years ago

  • Related to Bug #1903: com.zfabrik.boot.svnaccess computes wrong base-line revision for branches added
#9

Updated by Henning Blohm over 9 years ago

  • Target version set to 2.3.1

Also available in: Atom PDF