[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn:template (ignore local changes)?

From: Jay Levitt <lists-svndev_at_shopwatch.org>
Date: 2007-08-30 23:00:42 CEST

Occasionally the question pops up from people who want to make local
changes to a template-type file and don't want them to be committed.
You can't put such a file into svn:ignore, because it does (and should)
exist in the repository; it just shouldn't be recommitted once it's changed.

The FAQ states to rename the file to .tmpl or similar, and have
developers copy the file to its actual filename upon editing. That
works, but it's clunky, and requires everyone to take manual steps to
use that file, even if they don't plan to edit it. It also causes
particular issues for systems like Capistrano in Rails, which checks out
a copy of the repository and expects it to be deployable as-is.

I'm sure it can all be worked around with commit hooks and checkout
hooks (are there checkout hooks?) and scripting and such, but an
svn:template parameter SEEMS, at first blush, to be a fairly
non-controversial feature that just hasn't made it onto anyone's list.

Would a patch be likely to be accepted for such a feature? Is there
some big usage gotcha that I'm missing? I'd love to have this and it
seems like it should be relatively easy to code. It'd basically be
identical to the svn:ignore functionality, except that svn up/co/export
would have to get the file anyway (though I'm not sure they look at
svn:ignore today, since you can't have svn:ignore on an existing file),
and svn commit would have to be able to check in changes to the template
somehow (--force-changed-template or a better name). Anything else?

Jay Levitt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 30 22:58:03 2007

This is an archived mail posted to the Subversion Dev mailing list.