Mercurial > hg
view tests/svn/svndump-empty.sh @ 40663:c53f0ead5781
http: allow 'auth.prefix' to have a username consistent with the URI
It may be a little weird to put a username in the prefix, but the documentation
doesn't disallow it, and silently disallowing it has caused confusion[1]. The
username must match what is passed in (which seems to be from the URI via a
circuitous route), as well as 'auth.username' if it was specified. I thought
about printing a warning for a mismatch, but we already don't print a warning if
the 'auth.username' and URI username don't match.
This change allows the first and second last new test cases to work as expected.
It looks like this would have been a problem since at least 0593e8f81c71.
[1] https://www.mercurial-scm.org/pipermail/mercurial/2018-November/051069.html
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 16 Nov 2018 17:56:36 -0500 |
parents | c53a49c345e1 |
children |
line wrap: on
line source
#!/bin/sh # # Use this script to generate empty.svndump # mkdir temp cd temp mkdir project-orig cd project-orig mkdir trunk mkdir branches mkdir tags cd .. svnadmin create svn-repo svnurl=file://`pwd`/svn-repo svn import project-orig $svnurl -m "init projA" svn co $svnurl project cd project mkdir trunk/dir echo a > trunk/dir/a svn add trunk/dir svn ci -m adddir echo b > trunk/b svn add trunk/b svn ci -m addb echo c > c svn add c svn ci -m addc cd .. # svnsync repo/trunk/dir only so the last two revisions are empty svnadmin create svn-empty cat > svn-empty/hooks/pre-revprop-change <<EOF #!/bin/sh exit 0 EOF chmod +x svn-empty/hooks/pre-revprop-change svnsync init --username svnsync file://`pwd`/svn-empty file://`pwd`/svn-repo/trunk/dir svnsync sync file://`pwd`/svn-empty svn log -v file://`pwd`/svn-empty svnadmin dump svn-empty > ../empty.svndump