svn-all-fast-export / svn2git

:octopus: A fast-import based converter for an svn repo to git repos
GNU General Public License v3.0
262 stars 100 forks source link

svn: E160043: Expected FS format between '1' and '6'; found format '8' - but my format is 5 #119

Closed akomakom closed 3 years ago

akomakom commented 3 years ago

This sounds simple, but my db is in format 5...

Here is where it gets (even more) weird:

If I run the container interactively, I see that the format is correct:

root@fcfb17aeaec8:/workdir# cat /tmp/svn/format 
5

but:

root@fcfb17aeaec8:/workdir# /usr/local/svn2git/svn-all-fast-export --identity-map /tmp/conf/identity-map.txt --rules /tmp/conf/rules.txt --add-metadata --svn-branches --debug-rules --svn-ignore --empty-dirs /tmp/svn/
Invoked as:' /usr/local/svn2git/svn-all-fast-export --identity-map /tmp/conf/identity-map.txt --rules /tmp/conf/rules.txt --add-metadata --svn-branches --debug-rules --svn-ignore --empty-dirs /tmp/svn/'
Loading rules from: "/tmp/conf/rules.txt" 
Loading rules from "/tmp/conf/rules.txt" 
marksfile  "4.x/xxx/marks-4.x_xxx" 
svn: E160043: Expected FS format between '1' and '6'; found format '8'
Failed to open repository 

Same with strace -y:

(apt update ; apt -y install strace)

read(7</tmp/conf/rules.txt>, 0x7ffe877b4a37, 15977) = 0                                                                                                                                                   [17/9590]
read(7</tmp/conf/rules.txt>, 0x7ffe877b48a0, 16384) = 0                                                  
close(7</tmp/conf/rules.txt>)           = 0
open(0x198f558, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 7</workdir/gitlog-4.x_xxx>                   
fcntl(7</workdir/gitlog-4.x_xxx>, F_SETFD, FD_CLOEXEC) = 0                                               
stat(0x1992738, {...})                  = 0
lstat(0x19878a8, {...})                 = 0
open(0x19878a8, O_RDWR|O_CREAT|O_CLOEXEC, 0666) = 8</workdir/log-4.x_xxx>                                
fcntl(8</workdir/log-4.x_xxx>, F_SETFD, FD_CLOEXEC) = 0                                                  
open(0x1981ed8, O_RDONLY|O_CLOEXEC)     = 9</workdir/4.x/xxx/marks-4.x_xxx>                              
fcntl(9</workdir/4.x/xxx/marks-4.x_xxx>, F_SETFD, FD_CLOEXEC) = 0                                        
fstat(9</workdir/4.x/xxx/marks-4.x_xxx>, {...}) = 0
write(2</dev/pts/0>, 0x7ffe877b6840, 36marksfile  "4.x/xxx/marks-4.x_xxx"                                
) = 36                                     
fstat(9</workdir/4.x/xxx/marks-4.x_xxx>, {...}) = 0
fstat(9</workdir/4.x/xxx/marks-4.x_xxx>, {...}) = 0
close(9</workdir/4.x/xxx/marks-4.x_xxx>) = 0
fstat(8</workdir/log-4.x_xxx>, {...})   = 0
fstat(8</workdir/log-4.x_xxx>, {...})   = 0
close(8</workdir/log-4.x_xxx>)          = 0
lstat(0x19770c8, 0x7ffe877b9020)        = -1 ENOENT (No such file or directory)
lstat(0x19770c8, 0x7ffe877b9020)        = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470f1000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470ef000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470ed000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470eb000
open(0x7f92470ed310, O_RDONLY|O_CLOEXEC) = 8</tmp/svn/format>
fcntl(8</tmp/svn/format>, F_GETFD)      = 0x1 (flags FD_CLOEXEC)
read(8</tmp/svn/format>, 0x7ffe877b9050, 80) = 2
close(8</tmp/svn/format>)               = 0
open(0x7f92470ed548, O_RDONLY|O_CLOEXEC) = 8</tmp/svn/db/fs-type>
read(8</tmp/svn/db/fs-type>, 0x7f92470ed600, 4096) = 5
read(8</tmp/svn/db/fs-type>, 0x7f92470ed600, 4096) = 0
read(8</tmp/svn/db/fs-type>, 0x7f92470ed600, 4096) = 0
close(8</tmp/svn/db/fs-type>)           = 0
open(0x7f92470ee660, O_RDONLY|O_CLOEXEC) = 8</tmp/svn/db/fs-type>
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470e9000
read(8</tmp/svn/db/fs-type>, 0x7f92470e9028, 4096) = 5
read(8</tmp/svn/db/fs-type>, 0x7f92470e9028, 4096) = 0
read(8</tmp/svn/db/fs-type>, 0x7f92470e9028, 4096) = 0
close(8</tmp/svn/db/fs-type>)           = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470e7000
open(0x7f92470ea1e8, O_RDONLY|O_CLOEXEC) = 8</tmp/svn/db/format>
mmap(NULL, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470e2000
stat(0x7f92470ea1b0, {...})             = 0
read(8</tmp/svn/db/format>, 0x7f92470e2028, 16384) = 41
read(8</tmp/svn/db/format>, 0x7f92470e2028, 16384) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470e0000
close(8</tmp/svn/db/format>)            = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92470de000
write(2</dev/pts/0>, 0x7f92470e0238, 71svn: E160043: Expected FS format between '1' and '6'; found format '8'
akomakom commented 3 years ago

Never mind, rsync -avuz didn't update [REPO]/db/format (not to be confused with [REPO]/format), so origin was right, but my local copy was not.