You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andy Levy <an...@gmail.com> on 2009/04/17 00:36:35 UTC
Re: Commit script to check what OS and/or version the svn client
was running??
On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com> wrote:
> Is there a way in the pre-commit script to check what OS the client was
> running?
I've never seen any reference to this information being sent to the server.
>
> Also is there a way to ask for input or a question during a pre-commit and
> have the svn client side respond? (like a simple yes/no?)
Hook scripts are not interactive.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757785
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Andy Levy <an...@gmail.com>.
On Thu, Apr 16, 2009 at 20:48, Ashwin Chandra <ac...@panologic.com> wrote:
> Right, I don't want to reject them , I just want to warn them and let
> them continue with the checkin. For example, Tortoise says "You are
> about to commit without a Bug ID, do you wish to continue?".
You can't do this. A pre-commit hook can either allow the commit to
proceed, or reject it. As I stated earlier, hook scripts are not
interactive - they cannot prompt the user & then take action based on
the response.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Thursday, April 16, 2009 5:47 PM
> To: Ashwin Chandra
> Cc: users@subversion.tigris.org
> Subject: Re: Commit script to check what OS and/or version the svn
> client was running??
>
> On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
> wrote:
>> Hmm thanks Andy. The reason why I ask is because I am using bugtraq
>> properties. On windows, tortoise client will prompt and warn the user
> to
>> enter in a bug number. But on command line clients (such as on Linux)
>> there is nothing of the sort. I am trying to get a similar prompt to
> the
>> command line clients. Do you know of any way to do this?
>
> Write your pre-commit hook to check for the condition, and reject the
> commit with a message indicating they're missing.
>
>> -----Original Message-----
>> From: Andy Levy [mailto:andy.levy@gmail.com]
>> Sent: Thursday, April 16, 2009 5:37 PM
>> To: Ashwin Chandra
>> Cc: users@subversion.tigris.org
>> Subject: Re: Commit script to check what OS and/or version the svn
>> client was running??
>>
>> On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
> wrote:
>>> Is there a way in the pre-commit script to check what OS the client
>> was
>>> running?
>>
>> I've never seen any reference to this information being sent to the
>> server.
>>
>>>
>>> Also is there a way to ask for input or a question during a
> pre-commit
>> and
>>> have the svn client side respond? (like a simple yes/no?)
>>
>> Hook scripts are not interactive.
>>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1758088
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 17, 2009, at 01:28, ACHANDRA wrote:
> prakash tiwary wrote:
>
>> You can do using pre-commit hooks. You can warn or reject the
>> commit easily. This will be independent of any OS.
>
> How do I use pre-commit hooks to warn with user prompt? Even
> without interactive prompt, I noticed that you can’t warn unless
> the script dies out completely.
As has been said, you can't prompt the user for anything, and you can
only show the user a message if you print it to stderr (not stdout)
and exit from the hook with a non-zero exit code. If you do this in
the pre-commit hook it will abort the commit. However it has been
recently pointed out on the list that you *can* do this in a post-
commit hook, since there is no consequence at all for failing from
the post-commit hook. The user will see your message, and the commit
will have succeeded. So you could consider alerting the user about
their missing bugtraq properties in the post-commit hook.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1786808
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Commit script to check what OS and/or version the svn client
was running??
Posted by ACHANDRA <ac...@panologic.com>.
How do I use pre-commit hooks to warn with user prompt? Even without
interactive prompt, I noticed that you can't warn unless the script dies
out completely.
From: prakash tiwary [mailto:prakash.tiwary@gmail.com]
Sent: Thursday, April 16, 2009 10:02 PM
To: Ashwin Chandra
Cc: users@subversion.tigris.org
Subject: Re: Commit script to check what OS and/or version the svn
client was running??
You can do using pre-commit hooks. You can warn or reject the commit
easily. This will be independent of any OS.
Cheers!
Prakash
On Fri, Apr 17, 2009 at 6:18 AM, ACHANDRA <ac...@panologic.com>
wrote:
Right, I don't want to reject them , I just want to warn them and let
them continue with the checkin. For example, Tortoise says "You are
about to commit without a Bug ID, do you wish to continue?".
-----Original Message-----
From: Andy Levy [mailto:andy.levy@gmail.com]
Sent: Thursday, April 16, 2009 5:47 PM
To: Ashwin Chandra
Cc: users@subversion.tigris.org
Subject: Re: Commit script to check what OS and/or version the svn
client was running??
On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
wrote:
> Hmm thanks Andy. The reason why I ask is because I am using bugtraq
> properties. On windows, tortoise client will prompt and warn the user
to
> enter in a bug number. But on command line clients (such as on Linux)
> there is nothing of the sort. I am trying to get a similar prompt to
the
> command line clients. Do you know of any way to do this?
Write your pre-commit hook to check for the condition, and reject the
commit with a message indicating they're missing.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Thursday, April 16, 2009 5:37 PM
> To: Ashwin Chandra
> Cc: users@subversion.tigris.org
> Subject: Re: Commit script to check what OS and/or version the svn
> client was running??
>
> On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
wrote:
>> Is there a way in the pre-commit script to check what OS the client
> was
>> running?
>
> I've never seen any reference to this information being sent to the
> server.
>
>>
>> Also is there a way to ask for input or a question during a
pre-commit
> and
>> have the svn client side respond? (like a simple yes/no?)
>
> Hook scripts are not interactive.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageI
d=1757901
To unsubscribe from this discussion, e-mail:
[users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1762370
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Dextrous <de...@gmail.com>.
Hook scripts can either succeed or fail there is no intermediate state.
On Fri, Apr 17, 2009 at 3:57 PM, Andy Levy <an...@gmail.com> wrote:
> On Fri, Apr 17, 2009 at 01:02, Prakash Tiwary <pr...@gmail.com>
> wrote:
> > You can do using pre-commit hooks. You can warn or reject the commit
> easily.
> > This will be independent of any OS.
>
> But you can't warn and ask "do you wish to continue?" which is what
> the OP ultimately wants.
>
> >
> > On Fri, Apr 17, 2009 at 6:18 AM, ACHANDRA <ac...@panologic.com>
> wrote:
> >>
> >> Right, I don't want to reject them , I just want to warn them and let
> >> them continue with the checkin. For example, Tortoise says "You are
> >> about to commit without a Bug ID, do you wish to continue?".
> >>
> >>
> >>
> >> -----Original Message-----
> >> From: Andy Levy [mailto:andy.levy@gmail.com]
> >> Sent: Thursday, April 16, 2009 5:47 PM
> >> To: Ashwin Chandra
> >> Cc: users@subversion.tigris.org
> >> Subject: Re: Commit script to check what OS and/or version the svn
> >> client was running??
> >>
> >> On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
> >> wrote:
> >> > Hmm thanks Andy. The reason why I ask is because I am using bugtraq
> >> > properties. On windows, tortoise client will prompt and warn the user
> >> to
> >> > enter in a bug number. But on command line clients (such as on Linux)
> >> > there is nothing of the sort. I am trying to get a similar prompt to
> >> the
> >> > command line clients. Do you know of any way to do this?
> >>
> >> Write your pre-commit hook to check for the condition, and reject the
> >> commit with a message indicating they're missing.
> >>
> >> > -----Original Message-----
> >> > From: Andy Levy [mailto:andy.levy@gmail.com]
> >> > Sent: Thursday, April 16, 2009 5:37 PM
> >> > To: Ashwin Chandra
> >> > Cc: users@subversion.tigris.org
> >> > Subject: Re: Commit script to check what OS and/or version the svn
> >> > client was running??
> >> >
> >> > On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
> >> wrote:
> >> >> Is there a way in the pre-commit script to check what OS the client
> >> > was
> >> >> running?
> >> >
> >> > I've never seen any reference to this information being sent to the
> >> > server.
> >> >
> >> >>
> >> >> Also is there a way to ask for input or a question during a
> >> pre-commit
> >> > and
> >> >> have the svn client side respond? (like a simple yes/no?)
> >> >
> >> > Hook scripts are not interactive.
> >> >
> >>
> >> ------------------------------------------------------
> >>
> >>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757901
> >>
> >> To unsubscribe from this discussion, e-mail:
> >> [users-unsubscribe@subversion.tigris.org].
> >
> >
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1765237
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>
--
Cheers,
Vishwajeet
http://www.singhvishwajeet.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1765268
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Andy Levy <an...@gmail.com>.
On Fri, Apr 17, 2009 at 01:02, Prakash Tiwary <pr...@gmail.com> wrote:
> You can do using pre-commit hooks. You can warn or reject the commit easily.
> This will be independent of any OS.
But you can't warn and ask "do you wish to continue?" which is what
the OP ultimately wants.
>
> On Fri, Apr 17, 2009 at 6:18 AM, ACHANDRA <ac...@panologic.com> wrote:
>>
>> Right, I don't want to reject them , I just want to warn them and let
>> them continue with the checkin. For example, Tortoise says "You are
>> about to commit without a Bug ID, do you wish to continue?".
>>
>>
>>
>> -----Original Message-----
>> From: Andy Levy [mailto:andy.levy@gmail.com]
>> Sent: Thursday, April 16, 2009 5:47 PM
>> To: Ashwin Chandra
>> Cc: users@subversion.tigris.org
>> Subject: Re: Commit script to check what OS and/or version the svn
>> client was running??
>>
>> On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
>> wrote:
>> > Hmm thanks Andy. The reason why I ask is because I am using bugtraq
>> > properties. On windows, tortoise client will prompt and warn the user
>> to
>> > enter in a bug number. But on command line clients (such as on Linux)
>> > there is nothing of the sort. I am trying to get a similar prompt to
>> the
>> > command line clients. Do you know of any way to do this?
>>
>> Write your pre-commit hook to check for the condition, and reject the
>> commit with a message indicating they're missing.
>>
>> > -----Original Message-----
>> > From: Andy Levy [mailto:andy.levy@gmail.com]
>> > Sent: Thursday, April 16, 2009 5:37 PM
>> > To: Ashwin Chandra
>> > Cc: users@subversion.tigris.org
>> > Subject: Re: Commit script to check what OS and/or version the svn
>> > client was running??
>> >
>> > On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
>> wrote:
>> >> Is there a way in the pre-commit script to check what OS the client
>> > was
>> >> running?
>> >
>> > I've never seen any reference to this information being sent to the
>> > server.
>> >
>> >>
>> >> Also is there a way to ask for input or a question during a
>> pre-commit
>> > and
>> >> have the svn client side respond? (like a simple yes/no?)
>> >
>> > Hook scripts are not interactive.
>> >
>>
>> ------------------------------------------------------
>>
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757901
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe@subversion.tigris.org].
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1765237
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Prakash Tiwary <pr...@gmail.com>.
You can do using pre-commit hooks. You can warn or reject the commit easily.
This will be independent of any OS.
Cheers!
Prakash
On Fri, Apr 17, 2009 at 6:18 AM, ACHANDRA <ac...@panologic.com> wrote:
> Right, I don't want to reject them , I just want to warn them and let
> them continue with the checkin. For example, Tortoise says "You are
> about to commit without a Bug ID, do you wish to continue?".
>
>
>
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Thursday, April 16, 2009 5:47 PM
> To: Ashwin Chandra
> Cc: users@subversion.tigris.org
> Subject: Re: Commit script to check what OS and/or version the svn
> client was running??
>
> On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
> wrote:
> > Hmm thanks Andy. The reason why I ask is because I am using bugtraq
> > properties. On windows, tortoise client will prompt and warn the user
> to
> > enter in a bug number. But on command line clients (such as on Linux)
> > there is nothing of the sort. I am trying to get a similar prompt to
> the
> > command line clients. Do you know of any way to do this?
>
> Write your pre-commit hook to check for the condition, and reject the
> commit with a message indicating they're missing.
>
> > -----Original Message-----
> > From: Andy Levy [mailto:andy.levy@gmail.com]
> > Sent: Thursday, April 16, 2009 5:37 PM
> > To: Ashwin Chandra
> > Cc: users@subversion.tigris.org
> > Subject: Re: Commit script to check what OS and/or version the svn
> > client was running??
> >
> > On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
> wrote:
> >> Is there a way in the pre-commit script to check what OS the client
> > was
> >> running?
> >
> > I've never seen any reference to this information being sent to the
> > server.
> >
> >>
> >> Also is there a way to ask for input or a question during a
> pre-commit
> > and
> >> have the svn client side respond? (like a simple yes/no?)
> >
> > Hook scripts are not interactive.
> >
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757901
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1761049
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Commit script to check what OS and/or version the svn client
was running??
Posted by ACHANDRA <ac...@panologic.com>.
Right, I don't want to reject them , I just want to warn them and let
them continue with the checkin. For example, Tortoise says "You are
about to commit without a Bug ID, do you wish to continue?".
-----Original Message-----
From: Andy Levy [mailto:andy.levy@gmail.com]
Sent: Thursday, April 16, 2009 5:47 PM
To: Ashwin Chandra
Cc: users@subversion.tigris.org
Subject: Re: Commit script to check what OS and/or version the svn
client was running??
On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com>
wrote:
> Hmm thanks Andy. The reason why I ask is because I am using bugtraq
> properties. On windows, tortoise client will prompt and warn the user
to
> enter in a bug number. But on command line clients (such as on Linux)
> there is nothing of the sort. I am trying to get a similar prompt to
the
> command line clients. Do you know of any way to do this?
Write your pre-commit hook to check for the condition, and reject the
commit with a message indicating they're missing.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Thursday, April 16, 2009 5:37 PM
> To: Ashwin Chandra
> Cc: users@subversion.tigris.org
> Subject: Re: Commit script to check what OS and/or version the svn
> client was running??
>
> On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com>
wrote:
>> Is there a way in the pre-commit script to check what OS the client
> was
>> running?
>
> I've never seen any reference to this information being sent to the
> server.
>
>>
>> Also is there a way to ask for input or a question during a
pre-commit
> and
>> have the svn client side respond? (like a simple yes/no?)
>
> Hook scripts are not interactive.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757901
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Commit script to check what OS and/or version the svn client
was running??
Posted by Andy Levy <an...@gmail.com>.
On Thu, Apr 16, 2009 at 20:41, Ashwin Chandra <ac...@panologic.com> wrote:
> Hmm thanks Andy. The reason why I ask is because I am using bugtraq
> properties. On windows, tortoise client will prompt and warn the user to
> enter in a bug number. But on command line clients (such as on Linux)
> there is nothing of the sort. I am trying to get a similar prompt to the
> command line clients. Do you know of any way to do this?
Write your pre-commit hook to check for the condition, and reject the
commit with a message indicating they're missing.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: Thursday, April 16, 2009 5:37 PM
> To: Ashwin Chandra
> Cc: users@subversion.tigris.org
> Subject: Re: Commit script to check what OS and/or version the svn
> client was running??
>
> On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com> wrote:
>> Is there a way in the pre-commit script to check what OS the client
> was
>> running?
>
> I've never seen any reference to this information being sent to the
> server.
>
>>
>> Also is there a way to ask for input or a question during a pre-commit
> and
>> have the svn client side respond? (like a simple yes/no?)
>
> Hook scripts are not interactive.
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757892
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Commit script to check what OS and/or version the svn client
was running??
Posted by ACHANDRA <ac...@panologic.com>.
Hmm thanks Andy. The reason why I ask is because I am using bugtraq
properties. On windows, tortoise client will prompt and warn the user to
enter in a bug number. But on command line clients (such as on Linux)
there is nothing of the sort. I am trying to get a similar prompt to the
command line clients. Do you know of any way to do this?
-----Original Message-----
From: Andy Levy [mailto:andy.levy@gmail.com]
Sent: Thursday, April 16, 2009 5:37 PM
To: Ashwin Chandra
Cc: users@subversion.tigris.org
Subject: Re: Commit script to check what OS and/or version the svn
client was running??
On Thu, Apr 16, 2009 at 19:14, ACHANDRA <ac...@panologic.com> wrote:
> Is there a way in the pre-commit script to check what OS the client
was
> running?
I've never seen any reference to this information being sent to the
server.
>
> Also is there a way to ask for input or a question during a pre-commit
and
> have the svn client side respond? (like a simple yes/no?)
Hook scripts are not interactive.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1757838
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].