Make SVN backend more robust

The SVN backend failed when trying to access historical information on deleted files.

There's also an initial test case for the SVN backend, testing this issue
and issue 364, which is about a similar problem for renamed files.
Reverting any of these fixes breaks the test.
This commit is contained in:
Patrick Georgi
2011-08-12 20:53:26 +02:00
parent d54c86f813
commit 57c2389aae
36 changed files with 908 additions and 25 deletions

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1,2 @@
4
layout sharded 1000

View File

@@ -0,0 +1 @@
fsfs

View File

@@ -0,0 +1,37 @@
### This file controls the configuration of the FSFS filesystem.
[memcached-servers]
### These options name memcached servers used to cache internal FSFS
### data. See http://www.danga.com/memcached/ for more information on
### memcached. To use memcached with FSFS, run one or more memcached
### servers, and specify each of them as an option like so:
# first-server = 127.0.0.1:11211
# remote-memcached = mymemcached.corp.example.com:11212
### The option name is ignored; the value is of the form HOST:PORT.
### memcached servers can be shared between multiple repositories;
### however, if you do this, you *must* ensure that repositories have
### distinct UUIDs and paths, or else cached data from one repository
### might be used by another accidentally. Note also that memcached has
### no authentication for reads or writes, so you must ensure that your
### memcached servers are only accessible by trusted users.
[caches]
### When a cache-related error occurs, normally Subversion ignores it
### and continues, logging an error if the server is appropriately
### configured (and ignoring it with file:// access). To make
### Subversion never ignore cache errors, uncomment this line.
# fail-stop = true
[rep-sharing]
### To conserve space, the filesystem can optionally avoid storing
### duplicate representations. This comes at a slight cost in performace,
### as maintaining a database of shared representations can increase
### commit times. The space savings are dependent upon the size of the
### repository, the number of objects it contains and the amount of
### duplication between them, usually a function of the branching and
### merging process.
###
### The following parameter enables rep-sharing in the repository. It can
### be switched on and off at will, but for best space-saving results
### should be enabled consistently over the life of the repository.
# enable-rep-sharing = false

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1,5 @@
K 8
svn:date
V 27
2011-08-12T17:06:15.429110Z
END

View File

@@ -0,0 +1,13 @@
K 10
svn:author
V 7
patrick
K 8
svn:date
V 27
2011-08-12T17:07:33.111035Z
K 7
svn:log
V 12
added a file
END

View File

@@ -0,0 +1,13 @@
K 10
svn:author
V 7
patrick
K 8
svn:date
V 27
2011-08-12T17:07:55.894416Z
K 7
svn:log
V 14
renamed a file
END

View File

@@ -0,0 +1,13 @@
K 10
svn:author
V 7
patrick
K 8
svn:date
V 27
2011-08-12T17:08:12.646051Z
K 7
svn:log
V 14
deleted a file
END

View File

@@ -0,0 +1,11 @@
PLAIN
END
ENDREP
id: 0.0.r0/17
type: dir
count: 0
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /
17 107

View File

@@ -0,0 +1,28 @@
DELTA
SVNENDREP
id: 0-1.0.r1/17
type: file
count: 0
text: 1 0 4 0 d41d8cd98f00b204e9800998ecf8427e da39a3ee5e6b4b0d3255bfef95601890afd80709 0-0/_2
cpath: /new-file
copyroot: 0 /
PLAIN
K 8
new-file
V 16
file 0-1.0.r1/17
END
ENDREP
id: 0.0.r1/232
type: dir
pred: 0.0.r0/17
count: 1
text: 1 180 39 39 4a0c4e617d69f8a0bf11161d1e1b09a6
cpath: /
copyroot: 0 /
_0.0.t0-0 add-file true false /new-file
232 357

View File

@@ -0,0 +1,29 @@
id: 0-1.0-2.r2/0
type: file
pred: 0-1.0.r1/17
count: 1
text: 1 0 4 0 d41d8cd98f00b204e9800998ecf8427e da39a3ee5e6b4b0d3255bfef95601890afd80709 0-0/_2
cpath: /alternate-name
copyfrom: 1 /new-file
PLAIN
K 14
alternate-name
V 17
file 0-1.0-2.r2/0
END
ENDREP
id: 0.0.r2/256
type: dir
pred: 0.0.r1/232
count: 2
text: 2 196 47 47 518568bcb7e6fe3165235a9f9993f5e1
cpath: /
copyroot: 0 /
0-1.0.r1/17 delete-file false false /new-file
0-1._0.t1-1 add-file false false /alternate-name
1 /new-file
256 382

View File

@@ -0,0 +1,15 @@
PLAIN
END
ENDREP
id: 0.0.r3/17
type: dir
pred: 0.0.r2/256
count: 3
text: 3 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /
copyroot: 0 /
0-1.0-2.r2/0 delete-file false false /alternate-name
17 138

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1 @@
5d5eaf70-0fe3-4d07-ada0-45c336a5bfad