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

Re: implementing pre-commit-hook to prevent overwriting files under tags-dir

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 24 Sep 2009 12:20:06 -0400

Are you on Linux? Do you know the VI (VIM) editor?

Open the hook script in "vi" and then type:

*:set ff?*

as the ex command. This will tell you whether your line endings are set to
"dos" or "unix".

If it says your line endings are in "dos", then type:

*:set ff=unix

*and then save the hook. You can also try the *dos2unix* command on the hook
script.

On Thu, Sep 24, 2009 at 11:24 AM, Marc Lustig <ml_at_marclustig.com> wrote:

> thanks for the hint.
> but how do "correct line endings" look like?
>
> 2009/9/24 Andrey Repin <anrdaemon_at_freemail.ru>:
> > Greetings, Marc Lustig!
> >
> >> I found a script in the svn.collab.net repo that is supposed to prevent
> >> overwriting content under the tags-dir.
> >> Since this script is enabled, any commit fails with exit code 255, like:
> >
> >>>Some of selected resources were not committed.
> >>>A repository hook failed
> >>>svn: Commit failed (details follow):
> >>>svn: Ubertragen wird durch Aktion pre-commit behindert (Exit-Code 255)
> ohne
> >> Ausgabe.
> >
> >
> >> The strange thing is, there is no single "exit 255" command in the
> script.
> >
> >> To debug this, I simply used the following lines in the script:
> >
> >> echo "starting script" >&2
> >> exit 1
> >
> >> But still, the commit-operation fails WITHOUT the message "starting
> script"
> >> and with exit-code 255 instead of exit-code 1.
> >
> >> The script has permissions 644 and is owned by root.
> >> The installation is collabnet-rpm-package 1.5.2.
> >
> >> Any idea what is going wrong?
> >
> > This (very similar) issue has been posted just recently.
> > Check that you have correct line endings in your script.
> >
> >
> > --
> > WBR,
> > Andrey Repin (anrdaemon_at_freemail.ru) 24.09.2009, <19:07>
> >
> > Sorry for my terrible english...
> >
> >
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399334
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe_at_subversion.tigris.org].
>

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2399395
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-24 18:21:15 CEST

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