Add Server Repository: Button "Test in Terminal" did not work

Create issue
Issue #283 resolved
Stefan Ames created an issue

After adding a server repository and then pressing the button "Test in Terminal" I get the following error in my german version of OSX Lion:

Stefans-iMac:~ amesste$ cd /tmp Stefans-iMac:tmp amesste$ alias mhg='/Applications/Meine Programme/' Stefans-iMac:tmp amesste$ alias chg='HGPLAIN=1 HGENCODING=UTF-8 HGRCPATH="/Users/amesste/.hgrc:/Users/amesste/Library/Application Support/MacHg/hgrc" /Applications/Meine Programme/' Stefans-iMac:tmp amesste$ chg identify --cwd /tmp --insecure --noninteractive --rev 0 -bash: /Applications/Meine: No such file or directory

Seems that the Directory "Meine Programme" where McHG resides will be truncated to "Meine" during the test. The handling of spaces in directory files seems to be incorrect...

Comments (3)

  1. Stefan Ames reporter

    Maybe something like the following could help

    NSString* executableLocationHG()
        NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
        resourcePath = [resourcePath stringByReplacingOccurrencesOfString:@" " withString:@"\\ "];
    	return fstr(@"%@/%@",resourcePath, @"localhg");
  2. Jason Harris repo owner

    Thanks for the report, and the suggestion! Internally I think we need to keep the path free from the quoted spaces when we pass it say as an environment variable, etc. (I have not tested this though...) In any case this is fixed now.

    Thanks for pointing this out. (I am surprised this bug has been here as long as it has, and it's a bit embarrassing.) Good catch!

    Cheers, Jas

  3. Log in to comment