Subversion 301 errors
Is this happening to you?
jah$ svn co http://mydomaininc.com/svn/myrepos/ Authentication realm: <http://mydomaininc.com:80> mydomaininc.com Username: jason Password for 'jason': A myrepos/trunk A myrepos/trunk/sql A myrepos/trunk/sql/f_import.sql A myrepos/trunk/sql/r_import_large.sql A myrepos/trunk/sql/util.sql A myrepos/trunk/sql/indexes.sql Checked out revision 393.
Jason-Hoffmans-Computer:[mydomain/trunk/]:jah$ svn diff -r 384:HEAD svn: GET of '/svn/myrepos/!svn/bc/384/trunk/sql/f_import.sql': 301 Moved Permanently (http://mydomaininc.com)
301 errors happen in two situations:
- You've changed your DocumentRoot to be the same as your SVNPath or SVNParentPath (Subversion Book FAQs)
- You have a .svn (dot svn) directory in public_html or public
textdrive-server# ls -l /home/youruser/public_html/.svn total 18 r--r--r-- 1 youruser youruser 118 May 7 20:19 README.txt r--r--r-- 1 youruser youruser 75 May 7 20:19 dir-wcprops r--r--r-- 1 youruser youruser 0 May 7 20:19 empty-file r--r--r-- 1 youruser youruser 1040 May 17 16:34 entries r--r--r-- 1 youruser youruser 2 May 7 20:19 format drwxr-xr-x 2 youruser youruser 512 May 7 20:19 prop-base drwxr-xr-x 2 youruser youruser 512 May 7 20:19 props drwxr-xr-x 2 youruser youruser 512 May 17 16:34 text-base drwxr-xr-x 6 youruser youruser 512 May 17 16:34 tmp drwxr-xr-x 2 youruser youruser 512 May 17 16:34 wcprops
textdrive-server# mv /home/youruser/public_html/.svn /home/youruser/public_html/usedtobedotsvnbutjasonmovedit
Jason-Hoffmans-Computer:jah$ svn diff -r 384:HEAD Index: FileThatIsUnderSVN.txt ===================================== --- FileThatIsUnderSVN.txt (revision 384) +++ FileThatIsUnderSVN.txt (revision 393)
Moral of the story?
- DocumentRoot and SVNParentPaths can't be the same and
- A dot.svn folder in your DocumentRoot will prevent diff, merges etc.