When working with SVN repository migrations using svndumpfilter
, merge operations often become problematic points. The error message suggesting a missing revision (19098) while the actual missing reference points to a different revision (19100) is particularly confusing.
Here's what's happening in your case:
Node-copyfrom-rev: 19100
Node-copyfrom-path: trunk/src/client/js/Enums.js
Text-copy-source-md5: 2db7f8d9c0ba4750d88ce0722731aad6
Node-path: branches/features/DynamicSource/src/client/js/Enums.js
The system reports "No such revision 19098" because SVN internally:
- First checks if the source revision (19100) exists
- Then verifies the merge history between 19100 and current revision
- Finds that revision 19098 is missing from this chain
Here are three methods to resolve this:
Method 1: Reconstruct Missing History
Use this Python script to verify dump file consistency:
import subprocess
def check_revision_chain(dumpfile):
cmd = f"svndumpfilter include /your/path < {dumpfile} | grep 'Revision-number'"
revisions = subprocess.check_output(cmd, shell=True).decode().split()
return [int(rev) for rev in revisions if rev.isdigit()]
rev_list = check_revision_chain('your_dump.dump')
missing = [r for r in range(min(rev_list), max(rev_list)) if r not in rev_list]
print(f"Missing revisions: {missing}")
Method 2: Modify the Dump File
Edit the dump file to either:
- Remove the mergeinfo property causing the reference
- Adjust the copyfrom-rev to point to an existing revision
Example sed command to modify copyfrom references:
sed -i 's/Node-copyfrom-rev: 19100/Node-copyfrom-rev: 19000/' filtered.dump
Method 3: Use Alternative Filtering Tools
Consider using svnadmin dump
with --incremental
option:
svnadmin dump repo --incremental -r19000:HEAD > partial.dump
When filtering repositories:
- Always include parent directory structures
- Maintain complete revision chains for merged branches
- Consider using
svndumpfilter2
for better merge tracking
After applying fixes, verify with:
svnadmin verify /path/to/new/repository
svn log -v /path/to/new/repository/branches/features/DynamicSource
Remember that repository filtering always carries some risk of breaking history. Always maintain backups of original dump files before applying transformations.
When working with svndumpfilter
during Subversion repository migrations, merge operations often reveal hidden dependencies that weren't apparent during the filtering process. The error message svnadmin: E160006: No such revision 19098
appears misleading at first glance because:
- The error references revision 19098 which exists in the dump
- The actual missing dependency is revision 19100 (referenced in Node-copyfrom-rev)
- The merge operation in revision 19190 requires both revisions
Here's the problematic portion of the dump file causing the failure:
Node-copyfrom-rev: 19100
Node-copyfrom-path: trunk/src/client/js/Enums.js
Text-copy-source-md5: 2db7f8d9c0ba4750d88ce0722731aad6
Node-path: branches/features/DynamicSource/src/client/js/Enums.js
Node-action: add
Text-copy-source-sha1: 8f930509f8dbc17c5e82cd40aa5a76454d3d812c
Node-kind: file
Content-length: 0
Option 1: Reconstruct Missing History
When using svndumpfilter
, always include parent revisions of any merge operations:
svndumpfilter include branches/features/DynamicSource \
--drop-empty-revs --renumber-revs \
--preserve-revprops < original.dump > filtered.dump
Then manually verify merge sources:
grep "Node-copyfrom-rev" filtered.dump | sort -n | uniq
Option 2: Modify the Dump File
For advanced users, edit the dump file to either:
- Remove the mergeinfo properties causing the dependency
- Adjust the copyfrom references to existing revisions
Example sed command to remove problematic mergeinfo:
sed -i '/^Mergeinfo:/d' filtered.dump
Option 3: Use svndumpfilter2
The enhanced version handles merge tracking better:
svndumpfilter2 --include branches/features/DynamicSource \
--drop-empty --skip-missing-merge-sources \
--quiet original.dump > filtered.dump
After successful import, verify repository integrity:
svnlook youngest /path/to/repo
svn log -v -r19190 /path/to/repo
svn diff -r19100:19190 /path/to/repo/branches/features/DynamicSource
Key checks should include:
- Verify mergeinfo properties exist where expected
- Confirm copied files show correct ancestry
- Check that all revisions form a continuous sequence