We have some server with VisualSVN free service. Because we want to make some space on it, I determined to merge some old projects' revisions. They are not used anymore (the old revs.).
To test this I created a local visualsvn server on Win7 machine. I created a repository project named "test", and some python tool that call the svnadmin as needed.
I commited a text file with 5 of revisions.
Dump, I save this project:
E:\Repository_Saver>dump.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe dump e:\Repositories\te
st -r 5 >E:\Repository_Saver\test.dump
* Dumped revision 5.
Restore to this project (without delete it). I got error:
E:\Repository_Saver>restore.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe load e:\Repositories\te
st --ignore-uuid
<<< Started new transaction, based on original revision 5
* adding path : trunk ...svnadmin: File already exists: filesystem 'e:\Repo
sitories\test\db', transaction '5-6', path 'trunk'
I created a new project dir with VisualSVN, and I tried to restore the dump:
E:\Repository_Saver>restore.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe load e:\Repositories\te
st2vs --ignore-uuid
<<< Started new transaction, based on original revision 5
* adding path : trunk ...svnadmin: File already exists: filesystem 'e:\Repo
sitories\test2vs\db', transaction '1-1', path 'trunk'
I tried to restore into a nonexistent project dir:
E:\Repository_Saver>restore.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe load e:\Repositories\te
st2notexists --ignore-uuid
svnadmin: Can't open file 'e:\Repositories\test2notexists\format': A rendszer ne
m találja a megadott elérési utat.
(The system not found the path)
I created a test2 project with svnadmin only. Try to restore here:
E:\Repository_Saver>restore.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe load --ignore-uuid e:\R
epositories\test2
<<< Started new transaction, based on original revision 5
* adding path : trunk ... done.
* adding path : trunk/akarmi.txt ...svnadmin: Checksum mismatch, file '/tru
nk/akarmi.txt':
expected: c8f86f8733e4cb120d475cfd118bd93a
actual: 94bed0edc96af1cc6f87cb19ec81ef9e
With forcing:
E:\Repository_Saver>restore.py
c:\Program Files (x86)\VisualSVN Server\bin\svnadmin.exe load --force-uuid e:\Re
positories\test2
<<< Started new transaction, based on original revision 5
* adding path : trunk ... done.
* adding path : trunk/akarmi.txt ...svnadmin: Checksum mismatch, file '/tru
nk/akarmi.txt':
expected: c8f86f8733e4cb120d475cfd118bd93a
actual: 94bed0edc96af1cc6f87cb19ec81ef9e
So that is the list of my tryings. I cannot restore the dump to anywhere. But this needed to I can merge revisions.
What I do wrong? What I need to do?
This local machine is Win7/x64, with VisualSVN Free. But I tried with these operations also in Win2k3, and I also got these errors.
THanks for every idea, help, link, trying...
dd
I think I found a solution. I simplified the code of the create/dump/load to this:
-- create --
"c:\Program Files\VisualSVN Server\bin\svnadmin.exe" create %1
-- dump --
"c:\Program Files\VisualSVN Server\bin\svnadmin.exe" dump -r%2 %1 >%1.dump
-- load --
"c:\Program Files\VisualSVN Server\bin\svnadmin.exe" load %1 <%2.dump
usage:
The new, merged repos.
create project_merged
Dump with last rev. what is 39
dump project_original 39
Load the dump file into new repos.
load project_merged project_original
Important: the dumped file must be unopened before load! I everytime made this mistake that I opened it (to see the content).
The GUI repository "creating" is not working with load. VisualSVN is make some plus files... :-(
Thanks: dd