0

I'm migrating a legacy SVN repository to GitHub, and to remain within the GitHub file size limits I've created a replica of the SVN repository with larger files (that shouldn't really have been in source control anyway) filtered out using svndumpfilter.

This has worked well, but I've found an additional file I've missed - when I filter out this file and load the resultant dump I get svnadmin: E200003: Delta source ended unexpectedly.

This is on Ubuntu, but I get the same error using VisualSVN on Windows, even after doing the dump / filter there as well.

The command I'm using is:

svnrdump dump https://my/svn/repo/ | svndumpfilter exclude --pattern "**/gigantic.sql" | svnadmin load repo

And the detailed output is:

<<< Started new transaction, based on original revision 19826
 * editing path : path/to/apples.sql ... done.
 * editing path : path/to/pears.sql ...svnadmin: E200003: Delta source ended unexpectedly

When I look at r19826 in the source repo, I can see that this was where gigantic.sql was deleted - but of course it's still in the intermediate history so needs to go.

I've tried adding the --drop-empty-revs and --preserve-revprops options but this hasn't helped (not that in hindsight I'd expect it to).

I've dropped lots of other parts of the history with no issue and migrated other repos, so I'm not sure why I'm stuck with this one?

Thanks.

Jakg
  • 922
  • 12
  • 39

1 Answers1

1
  1. Make sure that you use up-to-date version of SVN command-line tools.
  2. Instead of svndumpfilter, try using svnadmin dump with the --exclude option. It's available beginning with version 1.10. Current version is 1.14.
  3. If possible, don't use remote svnrdump for this particular task. Use svnadmin dump with direct local access to the repository.

PS Or keep using Subversion. It does not impose limits on file sizes.

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • do you have an example of the ``dump`` & ``exclude`` options? When I run ``svnrdump dump https://my/svn/repo/ --exclude --pattern "**/gigantic.sql`` I get ``svnrdump: invalid option: --exclude`` – Jakg Jul 01 '22 at 18:49
  • @Jakg The utility is `svnadmin` and the command is `svnadmin dump`. It has a built-in help. – bahrep Jul 01 '22 at 19:33
  • thanks, unfortunately I don't have access to the server directly, hence `svnrdump` over `svnadmin dump`. Let me try to mirror it locally and try from there. – Jakg Jul 01 '22 at 20:32
  • unfortunately I've not got `svnadmin dump` working with `exclude` either. `svnadmin dump https://my/svn/repo/ --exclude "**/gigantic.sql"` hasn't excluded the file (the dump is still very large), and `svnadmin dump https://my/svn/repo/ --exclude --pattern "**/gigantic.sql"` gives `svnadmin: E205000: Try 'svnadmin help' for more info {...} Too many arguments` – Jakg Jul 03 '22 at 08:00
  • 1) svnadmin command has to be run directly on disk e.g. `svnadmin dump /var/svn/myrepo`. 2) I think that you use `--pattern` and `--exclude` incorrectly. Check `svnadmin help dump` and try your commands with some sample repository. You can also try asking for help in the [users@ Subversion mailing list](https://subversion.apache.org/mailing-lists.html). – bahrep Jul 03 '22 at 09:48
  • apologies, I did run it locally but I'd anonymised by command incorrectly. Using the correct syntax - `svnadmin dump path/to/my/svn/repo --pattern --exclude "**/gigantic.sql"` - seems to have worked. – Jakg Jul 05 '22 at 18:27