{"thread":{"id":"14348","subject":"git-svn dcommit and setting svn properties","startedAt":"2008-07-08T17:30:12Z","lastAt":"2008-07-08T17:30:12Z","messageCount":1,"participants":["Tim Prouty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"82616","messageId":"7C3A0713-1040-43AC-93DF-331F422DF922@isilon.com","threadId":"14348","inReplyTo":null,"subject":"git-svn dcommit and setting svn properties","fromName":"Tim Prouty","fromEmail":"tim.prouty@isilon.com","sentAt":"2008-07-08T17:30:12Z","receivedAt":"2008-07-08T17:30:12Z","isPatch":false,"sender":{"key":"tim.prouty@isilon.com","avatar":null},"body":"Hi,\n\nMy internal subversion repository has a pre-commit script that  \nrequires the svn:mime-type and svn:eol-style properties to be set on  \nany new file before it can be added to the repository.  If these  \nproperties aren't set, the commit fails.  When using git-svn dcommit  \nto commit a patch that adds a new file, the dcommit also fails with  \nthe error below.  I have added auto-props rules in my ~/.subversion/ \nconfig file to automatically set these properties based on file  \nextension, so an svn commit doesn't require explicitly setting them.   \nI tried adding the --config-dir=~/.subversion option to the dcommit  \ncommand, but it didn't seem to make a difference.\n\nIs there any way to set these properties or consult subversion auto- \nprops so that git-svn knows how to set them during the dcommit?  Would  \nit be difficult to add this capability if it doesn't already exist?\n\n\nExample command and subsequent error:\n\n# git-svn dcommit --verbose --config-dir=~/.subversion\nCommitting to https://svn/repo/foo ...\n         A       bar.c\nA repository hook failed: MERGE request failed on '/repo/foo': 'pre- \ncommit' hook failed with error output:\n/svnrepo/hooks/check-mime-type.pl:\n\nfoo/bar.c : svn:mime-type is not set\n\n     Every added file must have the svn:mime-type property set. In\n     addition text files must have the svn:eol-style property set.\n\n     For binary files try running\n     svn propset svn:mime-type application/octet-stream path/of/file\n\n     For text files try\n     svn propset svn:mime-type text/plain path/of/file\n     svn propset svn:eol-style native path/of/file\n\n     You may want to consider uncommenting the auto-props section\n     in your ~/.subversion/config file. Read the Subversion book\n     (http://svnbook.red-bean.com/), Chapter 7, Properties section,\n     Automatic Property Setting subsection for more help.\n  at /usr/bin/git-svn line 461\n\n\nThanks!\n\n-Tim\n"}]}