Subversion E160004 X's root node's predecessor is Y but should be Z

2.4k views Asked by At

I've inherited a large Subversion Repository (74010 Revisions) and I am trying to perform a dump/load to upgrade the repository to the 1.8 version to take advantage of the space saving features.

Before attempting this process I ran svnadmin verify over the repository in question to ensure that the repository was in good shape. Unfortunately I received the following error message:

svnadmin: E160004: r1516's root node's predecessor is r1514 but should be r1515

I've done a lot of googling to try and find the meaning of this error, but have been unable to find information for this specific error outside of a bug that apparently only occurred for new repositories. Unfortunately it also appears that this error number is used for several classes of errors.

I can verify that this particular revision is missing when I perform a 'Show Log' in TortoiseSVN, I attempted to do a dump to see if we might be able to get a dump, but unsurprisingly it failed.

This does not appear (on the surface) to have affected daily usage of this repository, however the inability to dump the repository is not a good thing.

My questions are:

  1. Is there something I can do to try and recover what history I can from this repository and start fresh?
  2. Is there a way to have svnadmin verify show all errors instead of just failing on the first error?
2

There are 2 answers

2
Haoming On BEST ANSWER

I met the same E160004 error, and I found the following two links helpful:

http://mail-archives.apache.org/mod_mbox/subversion-users/201401.mbox/%[email protected]%3E

https://subversion.apache.org/docs/release-notes/1.8.html#verify-issue4129

So as for your Question 1, which I think you meant that you want to know how to fix this issue, "perform a dump/load cycle", as suggested in the second link above.

Question 2, it seems impossible, as I read the help of svnadmin and tried to do that.

0
Ben Laan On
  1. you can follow the instructions here
$ svnadmin verify myrepository
$ svnadmin dump myrepository > dumpfile

# when it errors, you can run incremental from the listed (revision + 2). e.g. 6 in the example
$ svnadmin dump --incremental -r 6:HEAD myrepository >> dumpfile

# repeat the last step for each error, incrementing the range argument each time. this will ultimately create a dumpfile that can be loaded into a new repo
$ svnadmin create recoveredrep
$ cat dumpfile | svnadmin load recoveredrepo

  1. There is a way to keep going after an error - use the --keep-going switch:
svnadmin verify --keep-going /path/to/repo