|
Advanced Software Perspectives
|
Ruby doesn’t like files with ^M at the end of each line. Go figure.
Here is what I did. Hopefully it’ll work for you too.
In my Subversion installation directory, ON MY WINDOWS BOX (don’t you go wasting several hours on this, too, I wasted enough for the whole kit-and-kaboodle of us on this one) I added a conf subdirectory.
in there I added a file called config. The contents of this file is at the end of this blog post. You can see examples of this file all over the net.
Then, in my batch files I created to do the import and checkin and add I add, in my case:
–config-dir C:\runtime\svn-win32-1.4.6\conf
Of course, in your case, you would replace ‘C:runtime\ svn-win32-1.4.6′ with the path to YOUR subversion installation.
For example my checkin.bat looks like:
svn commit -m “Checking In” –config-dir C:\runtime\svn-win32-1.4.6\conf –username me –password my_password
(actually, I have another line in this file that calls a script to automatically add all new files that have been created since the last checkin. Subversion can’t do this itself, for some reason. They don’t call it source code management SCuM without a good reason).
OK, here is the file. What this says is to set end-of-line properties to linefeed for files with extensions that are likely to be text files.
The key lines are to enable the property feature.
enable-auto-props = yes
and the lines at the end of the file that specify what to do about files with various extensions. Specifically, in our case:
*.rb = svn:eol-style=LF
——————————————————————————————————————————–
###
### The commented-out examples below are intended to demonstrate
### how to use this file.
### Section for authentication and authorization customizations.
[auth]
### Set store-passwords to ‘no’ to avoid storing passwords in the
### auth/ area of your config directory. It defaults to ‘yes’.
### Note that this option only prevents saving of *new* passwords;
### it doesn’t invalidate existing passwords. (To do that, remove
### the cache files by hand as described in the Subversion book.)
# store-passwords = no
### Set store-auth-creds to ‘no’ to avoid storing any subversion
### credentials in the auth/ area of your config directory.
### It defaults to ‘yes’. Note that this option only prevents
### saving of *new* credentials; it doesn’t invalidate existing
### caches. (To do that, remove the cache files by hand.)
# store-auth-creds = no
### Section for configuring external helper applications.
[helpers]
### Set editor to the command used to invoke your text editor.
### This will override the environment variables that Subversion
### examines by default to find this information ($EDITOR,
### et al).
# editor-cmd = editor (vi, emacs, notepad, etc.)
### Set diff-cmd to the absolute path of your ‘diff’ program.
### This will override the compile-time default, which is to use
### Subversion’s internal diff implementation.
# diff-cmd = diff_program (diff, gdiff, etc.)
### Set diff3-cmd to the absolute path of your ‘diff3′ program.
### This will override the compile-time default, which is to use
### Subversion’s internal diff3 implementation.
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
### Set diff3-has-program-arg to ‘true’ or ‘yes’ if your ‘diff3′
### program accepts the ‘–diff-program’ option.
# diff3-has-program-arg = [true | false]
### Section for configuring tunnel agents.
[tunnels]
### Configure svn protocol tunnel schemes here. By default, only
### the ’ssh’ scheme is defined. You can define other schemes to
### be used with ’svn+scheme://hostname/path’ URLs. A scheme
### definition is simply a command, optionally prefixed by an
### environment variable name which can override the command if it
### is defined. The command (or environment variable) may contain
### arguments, using standard shell quoting for arguments with
### spaces. The command will be invoked as:
### svnserve -t
### (If the URL includes a username, then the hostname will be
### passed to the tunnel agent as @.) If the
### built-in ssh scheme were not predefined, it could be defined
### as:
# ssh = $SVN_SSH ssh
### If you wanted to define a new ‘rsh’ scheme, to be used with
### ’svn+rsh:’ URLs, you could do so as follows:
# rsh = rsh
### Or, if you wanted to specify a full path and arguments:
# rsh = /path/to/rsh -l myusername
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator. A single backslash will be treated as an
### escape for the following character.
### Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its ’status’ output, and
### while importing or adding files and directories.
# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
### Set log-encoding to the default encoding for log messages
# log-encoding = latin1
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
# use-commit-times = yes
### Set no-unlock to prevent ’svn commit’ from automatically
### releasing locks on files.
# no-unlock = yes
### Set enable-auto-props to ‘yes’ to enable automatic properties
### for ’svn add’ and ’svn import’, it defaults to ‘no’.
### Automatic properties are defined in the section ‘auto-props’.
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=LF
*.cpp = svn:eol-style=LF
*.h = svn:eol-style=LF
*.dsp = svn:eol-style=CRLF
*.dsw = svn:eol-style=CRLF
*.sh = svn:eol-style=LF;svn:executable
*.txt = svn:eol-style=LF
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.gif = svn:mime-type=image/gif
Makefile = svn:eol-style=LF
*.rhtml = svn:eol-style=LF
*.fcgi = svn:eol-style=LF
*.cgi = svn:eol-style=LF
*.rb = svn:eol-style=LF
*.txt = svn:eol-style=LF
*.yml = svn:eol-style=LF
*.html = svn:eol-style=LF
Discussion
Comments are disallowed for this post.
Comments are closed.