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

Re: svn:template (ignore local changes)?

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2007-08-30 23:27:34 CEST

On Aug 30, 2007, at 2:00 PM, Jay Levitt wrote:

> 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.

This is indeed a common use case.

> 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.

So, if I've got this right, you add the svn:template property after
creating the template, adding it, and committing it to the
repository. However, if you want to modify the template, you remove
the property, commit its removal (requiring a special hack to detect
this case?), make your changes + restore the prop, and commit again.

This makes the editing process awfully clunky...

> 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?

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 30 23:31:25 2007

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