Git development
 help / color / mirror / Atom feed
From: Tim Prouty <tim.prouty@isilon.com>
To: git@vger.kernel.org
Subject: git-svn dcommit and setting svn properties
Date: Tue, 8 Jul 2008 10:30:12 -0700	[thread overview]
Message-ID: <7C3A0713-1040-43AC-93DF-331F422DF922@isilon.com> (raw)

Hi,

My internal subversion repository has a pre-commit script that  
requires the svn:mime-type and svn:eol-style properties to be set on  
any new file before it can be added to the repository.  If these  
properties aren't set, the commit fails.  When using git-svn dcommit  
to commit a patch that adds a new file, the dcommit also fails with  
the error below.  I have added auto-props rules in my ~/.subversion/ 
config file to automatically set these properties based on file  
extension, so an svn commit doesn't require explicitly setting them.   
I tried adding the --config-dir=~/.subversion option to the dcommit  
command, but it didn't seem to make a difference.

Is there any way to set these properties or consult subversion auto- 
props so that git-svn knows how to set them during the dcommit?  Would  
it be difficult to add this capability if it doesn't already exist?


Example command and subsequent error:

# git-svn dcommit --verbose --config-dir=~/.subversion
Committing to https://svn/repo/foo ...
         A       bar.c
A repository hook failed: MERGE request failed on '/repo/foo': 'pre- 
commit' hook failed with error output:
/svnrepo/hooks/check-mime-type.pl:

foo/bar.c : svn:mime-type is not set

     Every added file must have the svn:mime-type property set. In
     addition text files must have the svn:eol-style property set.

     For binary files try running
     svn propset svn:mime-type application/octet-stream path/of/file

     For text files try
     svn propset svn:mime-type text/plain path/of/file
     svn propset svn:eol-style native path/of/file

     You may want to consider uncommenting the auto-props section
     in your ~/.subversion/config file. Read the Subversion book
     (http://svnbook.red-bean.com/), Chapter 7, Properties section,
     Automatic Property Setting subsection for more help.
  at /usr/bin/git-svn line 461


Thanks!

-Tim

                 reply	other threads:[~2008-07-08 17:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7C3A0713-1040-43AC-93DF-331F422DF922@isilon.com \
    --to=tim.prouty@isilon.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox