git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn and svn properties on upstream

From
PTPaul Talacko <gnuruandstuff@yahoo.co.uk>
Date
Jul 12, 2008, 19:58 UTC
Message-ID
<608871.39190.qm@web27807.mail.ukl.yahoo.com>
Hello,
I know other people have asked how they can set svn properties on files that they are dcommit-ing to an upstream svn repository.
I had just this problem yesterday on a project that is hosted on sourceforge.  I had added some files,  but sourceforge refused the commit because I hadn't added the svn:mime-type and svn:eol-style properties.
I spent some time going through the git-svn source code and I hacked a fix in  &SVN::Git::Editor::A.  It's pretty simple and sorted my problem out quickly.  However, it's a general solution. 
Since then I've been thinking about what could be a general solution. One thing I can think of is this:
* amend SVN::Git::Editor::generate_diffs to add another hash key to amend properties.
* look for ~/.subversion/config or /etc/subversion/config to see whether auto-props are set
* if set, set the properties accordingly in the @mods array of hashes.
* SVN::Git::Editor::A then sets the properties according to the contents of the $mods hash ref, using set_file_prop().
That seems reasonably simple, however, I can already think of some use cases that miss. Notably, if autoprops are unsuitable for the project and properties have to be set for each individual file.  A command line option would seem appropriate, but then we could get very long command lines!
Another way would be to have another git svn command, propset for example, that a user could use at any time. The disadvantage is that this meta-data would have to be stored somewhere; it would be a db of file/path or object keys and svn property values. The A() and M() subroutines would access it when dcommit-ing.  I guess it could be stored under .git/ somewhere.
The projects I'm working on have a svn upstream, so I'd be willing to have a look at some of the options and write some code.
What do people think?  Which of the above ideas would be most appropriate/useful?
Thanks
Paul
      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
Next: Avery Pennarun
Message 1 of 3 in “git-svn and svn properties on upstream”
  1. Paul TalackoJul 12, 2008
  2. Avery PennarunJul 12, 2008
  3. Peter HarrisJul 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.