You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anthony Williams <an...@warwickcontrol.com> on 2006/03/20 16:23:08 UTC
Append Copyright Text
What is the best way to prepend text to a file with information about the
revision without causing issues?
For example to add a copyright blurb and last updated, blame information to
the top of a file whenever it is committed to the repository. I guess it
would be possible using a pre-commit hook, however then surely it would
result in inconsistencies between the copy in the repository and the working
copy owned by the client.
Does anyone use a system like this and how have you implemented it? I've
tried searching the mailing list archives but didn't manage to turn up any
answers.
Regards,
Anthony Williams
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: Append Copyright Text
Posted by Anthony Williams <an...@warwickcontrol.com>.
Hehe, yeah I guess that'd do it! Was hoping for something a little more
automated, ah well.
Cheers,
Anthony
-----Original Message-----
From: users-return-46760-anthony=warwickcontrol.com@subversion.tigris.org
[mailto:users-return-46760-anthony=warwickcontrol.com@subversion.tigris.org]
On Behalf Of Ryan Schmidt
Sent: 20 March 2006 04:56 PM
To: Anthony Williams
Cc: users@subversion.tigris.org
Subject: Re: Append Copyright Text
On Mar 20, 2006, at 17:23, Anthony Williams wrote:
> What is the best way to prepend text to a file with information about
> the revision without causing issues?
> For example to add a copyright blurb and last updated, blame
> information to the top of a file whenever it is committed to the
> repository. I guess it would be possible using a pre-commit hook,
> however then surely it would result in inconsistencies between the
> copy in the repository and the working copy owned by the client.
>
> Does anyone use a system like this and how have you implemented it?
> I've
> tried searching the mailing list archives but didn't manage to turn up
> any answers.
Require your users to insert this text themselves before committing.
If this is too much work for them, write a script they can use to do it on
the client side. Write a pre-commit hook which rejects files which do not
have this text, with an explanation for the user of how to add it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Append Copyright Text
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 20, 2006, at 17:23, Anthony Williams wrote:
> What is the best way to prepend text to a file with information
> about the
> revision without causing issues?
> For example to add a copyright blurb and last updated, blame
> information to
> the top of a file whenever it is committed to the repository. I
> guess it
> would be possible using a pre-commit hook, however then surely it
> would
> result in inconsistencies between the copy in the repository and
> the working
> copy owned by the client.
>
> Does anyone use a system like this and how have you implemented it?
> I've
> tried searching the mailing list archives but didn't manage to turn
> up any
> answers.
Require your users to insert this text themselves before committing.
If this is too much work for them, write a script they can use to do
it on the client side. Write a pre-commit hook which rejects files
which do not have this text, with an explanation for the user of how
to add it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Append Copyright Text
Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Mon, 20 Mar 2006 16:23:08 -0000, "Anthony Williams"
<an...@warwickcontrol.com> wrote:
>Does anyone use a system like this and how have you implemented it? I've
>tried searching the mailing list archives but didn't manage to turn up any
>answers.
I think the easiest solution is to have a pre-commit hook that rejects
commits without the required text.
However, if you really must automatically edit the code in the
repository, you'll need either a post-commit hook (to update
just-committed files) or a nightly cron job (which would update the
whole repository).
Greg
--
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org