Automatic SVN property adding in TortoiseSVN

12 views
Skip to first unread message

Alexander Obuhovich

unread,
Feb 28, 2011, 10:32:21 AM2/28/11
to In-Portal Development
I've found a way to automatically add "svn:keywords" property to an "*.php" files being added (we are forgetting to do this most of the time):

How about we use "tsvn:autoprops" property to do it for us.

Dmitry A.

unread,
Feb 28, 2011, 11:34:44 AM2/28/11
to in-por...@googlegroups.com
Very nice discovery, Alex!

No more PHP files without properties. We can do this on the folder levels!


DA

Alexander Obuhovich

unread,
Feb 28, 2011, 12:37:01 PM2/28/11
to in-por...@googlegroups.com
Actually only 1 property must be set at top folder and TortoiseSVN will look for it by himself.

I guess setting that on "in-portal" folder and all profile folders (in-portal.community, in-portal.full) will suffice.

Dmitry A.

unread,
Feb 28, 2011, 12:48:37 PM2/28/11
to in-por...@googlegroups.com
Okay, let's do it!

DA

Dmitry A.

unread,
Mar 10, 2011, 12:03:58 PM3/10/11
to in-por...@googlegroups.com
I guess we need a task for this?


DA

Alexander Obuhovich

unread,
Mar 10, 2011, 2:05:48 PM3/10/11
to in-por...@googlegroups.com
Yes.


On Thu, Mar 10, 2011 at 7:03 PM, Dmitry A. <dand...@gmail.com> wrote:
I guess we need a task for this?


DA



Alexander Obuhovich

unread,
Mar 13, 2011, 12:42:11 PM3/13/11
to in-por...@googlegroups.com

Alexander Obuhovich

unread,
Mar 14, 2011, 4:03:53 AM3/14/11
to in-por...@googlegroups.com
I've noticed, that in pre-svn time In-Portal releases (zip files) were having LF ("\n") line ending all the time. That's good, but since moved to SVN new zip release files have CRLF ("\r\n") in them. To normalize line ending I propose also adding this to "tsvn:autoprops" property:
  • *.php = svn:eol-style=LF
  • *.tpl = svn:eol-style=LF
  • *.sql = svn:eol-style=LF
  • *.lang = svn:eol-style=LF
  • *.sh = svn:eol-style=LF;svn:executable
  • *.txt = svn:eol-style=LF
  • *.htaccess = svn:eol-style=LF
  • *.html = svn:eol-style=LF
  • *.htm = svn:eol-style=LF
  • *.css = svn:eol-style=LF
  • *.js = svn:eol-style=LF
  • *.xml = svn:eol-style=LF
  • COPYRIGHT = svn:eol-style=LF
  • CREDITS = svn:eol-style=LF
  • INSTALL = svn:eol-style=LF
  • LICENSE = svn:eol-style=LF
  • LICENSES = svn:eol-style=LF
  • README = svn:eol-style=LF

Of course we need to write a script, that will set that "svn:eol-style" to all files, that are already in repository. I think, that doing that only dev branches, like "5.1.x", "5.2.x", "1.1.x" of each module will ensure that all future releases have normal line endings. I don't think, that recreating every zip file made since 5.0.0 release would do us any good at the moment.

Dmitry A.

unread,
Mar 14, 2011, 2:55:44 PM3/14/11
to in-por...@googlegroups.com
Yes, I agree and think we can also do this for:

.smsignore = svn:eol-style=LF

which are used in the themes.


DA

Alexander Obuhovich

unread,
Mar 16, 2011, 5:58:24 PM3/16/11
to in-por...@googlegroups.com
Done.

Dmitry A.

unread,
Mar 21, 2011, 2:17:32 PM3/21/11
to in-por...@googlegroups.com
Nice work - thank you.
Reply all
Reply to author
Forward
0 new messages