Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion freaking out on me!

Tags:

svn

I have two copies of a site, one is the production copy, and the other is the development copy. I recently added everything in the production to a subversion repository hosted on our linux backup server. I created a tag of the current version and I was done.

I then copied the development copy overtop of the production copy (on my local machine where I have everything checked out). There are only 10-20 files changed, however, when I use tortoise SVN to do a commit, it says every file has changed. The diff file generated shows subversion removing everything, and replacing it with the new version (which is the exact same).

What is going on? How do I fix it?

An example diff:

Index: C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html
===================================================================
--- C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html   (revision 5)
+++ C:/Users/jhollon/Documents/Visual Studio 2008/Projects/saloon/trunk/components/index.html   (working copy)
@@ -1,4 +1,4 @@
-<html>
-<body bgcolor="#FFFFFF">
-</body>
+<html>
+<body bgcolor="#FFFFFF">
+</body>
 </html>
\ No newline at end of file
like image 243
Malfist Avatar asked May 14 '10 18:05

Malfist


1 Answers

It's probably a line-ending mismatch. Set property svn:eol-style=native on all your files.

http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style

You can have Subversion set this property on all new files by default:

http://svnbook.red-bean.com/en/1.5/svn.advanced.props.html#svn.advanced.props.auto

Here's what's in my ~/.subversion/config:

enable-auto-props = yes

### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h = svn:eol-style=native
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=native;svn:executable=*
*.txt = svn:eol-style=native
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.jpeg = svn:mime-type=image/jpeg
Makefile = svn:eol-style=native
*.tmpl = svn:eol-style=native
*.gif = svn:mime-type=image/gif
*.t = svn:eol-style=native;svn:executable=*
*.pm = svn:eol-style=native
*.pl = svn:eol-style=native;svn:executable=*
*.cgi = svn:eol-style=native;svn:executable=*
*.js = svn:eol-style=native;svn:mime-type=application/x-javascript
*.dtd = svn:eol-style=native;svn:mime-type=application/xml-dtd
*.txt = svn:eol-style=native;svn:mime-type=text/plain
*.html = svn:eol-style=native;svn:mime-type=text/html
*.yicf = svn:eol-style=native
*.xml = svn:eol-style=native;svn:mime-type=text/xml
*.sgml = svn:eol-style=native;svn:mime-type=text/sgml
*.xul = svn:mime-type=application/vnd.mozilla.xul+xml
*.tt = svn:eol-style=native
like image 116
David M Avatar answered Nov 16 '22 11:11

David M