Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 45121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:45:33+00:00 2026-05-10T15:45:33+00:00

I’m working on a .net post-commit hook to feed data into OnTime via their

  • 0

I’m working on a .net post-commit hook to feed data into OnTime via their Soap SDK. My hook works on Windows fine, but on our production RHEL4 subversion server, it won’t work when called from a shell script.

 #!/bin/sh /usr/bin/mono $1/hooks/post-commit.exe '$@' 

When I execute it with parameters from the command line, it works properly. When executed via the shell script, I get the following error: (looks like there is some problem with the process execution of SVN that I use to get the log data for the revision):

  Unhandled Exception: System.InvalidOperationException: The process must exit before getting the requested information.   at System.Diagnostics.Process.get_ExitCode () [0x0003f] in /tmp/monobuild/build/BUILD/mono-1.9.1/mcs/class/System/System.Diagnostics/Process.cs:149   at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_ExitCode ()   at SVNLib.SVN.Execute (System.String sCMD, System.String sParams, System.String sComment, System.String sUserPwd, SVNLib.SVNCallback callback) [0x00000]   at SVNLib.SVN.Log (System.String sUrl, Int32 nRevLow, Int32 nRevHigh, SVNLib.SVNCallback callback) [0x00000]   at SVNLib.SVN.LogAsString (System.String sUrl, Int32 nRevLow, Int32 nRevHigh) [0x00000]   at SVNCommit2OnTime.Program.Main (System.String[] args) [0x00000] 

I’ve tried using mkbundle and mkbundle2 to make a stand alone that could be named post-commit, but I get a different error message:

 Unhandled Exception: System.ArgumentNullException: Argument cannot be null. Parameter name: Value cannot be null.   at System.Guid.CheckNull (System.Object o) [0x00000]   at System.Guid..ctor (System.String g) [0x00000]   at SVNCommit2OnTime.Program.Main (System.String[] args) [0x00000] 

Any ideas why it might be failing from a shell script or what might be wrong with the bundled version?

Edit: @Herms, I’ve already tried it with an echo, and it looks right. As for the $1/hooks/post-commit.exe, I’ve tried the script with and without a full path to the .net assembly with the same results.

Edit: @Leon, I’ve tried both $1 $2 and '$@' with the same results. It is a subversion post commit hook, and it takes two parameters, so those need to be passed along to the .net assembly. The '$@' was what was recommended at the mono site for calling a .net assembly from a shell script. The shell script is executing the .net assembly and with the correct parameters, but it is throwing an exception that does not get thrown when run directly from the command line.

Edit: @Vinko, I don’t see any differences in the environment other than things like BASH_LINENO and BASH_SOURCE

Edit: @Luke, I tired it, but that makes no difference either. I first noticed the problem when testing from TortoiseSVN on my machine (when it runs as a sub-process of the subversion daemon), but also found that I get the same results when executing the script from the hooks directory (i.e. ./post-commit REPOS REV, where post-commit is the above sh script. Doing mono post-commit.exe REPOS REV works fine. The main problem is that to execute, I need to have something of the name post-commit so that it will be called. But it does not work from a shell script, and as noted above, the mkbundle is not working with a different problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:45:34+00:00Added an answer on May 10, 2026 at 3:45 pm

    It is normal for some processes to hang around for a while after they close their stdout (ie. you get an end-of-file reading from them). You need to call proc.WaitForExit() after reading all the data but before checking ExitCode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 96k
  • Answers 96k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If both attributes agree on their values (as they should),… May 11, 2026 at 7:13 pm
  • Editorial Team
    Editorial Team added an answer It only writes one line with number ,which is the… May 11, 2026 at 7:13 pm
  • Editorial Team
    Editorial Team added an answer Perhaps you need to try using V4L2 instead, namely the… May 11, 2026 at 7:13 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.