magickaito / svnx

Automatically exported from code.google.com/p/svnx
0 stars 0 forks source link

Diff Tool won't open (SvnX 1.3.1) #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download new svnX 1.3.1 (I had the pevious version before)
2. Open the dmg package and drag and drop app into Developer folder
3. Run svnX 
4. Diff on some file ....

What is the expected output? What do you see instead?
I expect the diff tool to open

Instead I get : 

/Developer/svnX.app/Contents/Resources/svndiff.sh: line 24: chmod: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 11: sed: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 29: cp: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 34: sed: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 38: sed: command not 
found

What version of the product are you using? On what operating system?
Lion with svnx 1.3.1

Please provide any additional information below.

If I open up a terminal, navigate to /Developer/svnX.app/Contents/MacOS and run 
./svnx
I can then use the Diff tool without any error message ! ? !

Original issue reported on code.google.com by oberthelot@gmail.com on 16 Nov 2011 at 4:46

GoogleCodeExporter commented 8 years ago
Well clearly something is amiss with your setup.
My guess is that you have a broken $PATH.
What does `echo "[$PATH]"; which chmod` report in Terminal?
What does svnX’s Diff command report if you add those commands after the 
first line of /Developer/svnX.app/Contents/Resources/svndiff.sh?

You should probably also review your ~/.login,  ~/.profile, ~/.bashrc, 
~/.tcshrc etc files.

Alternatively /Developer/ is an unusual location to place an app.
Have you tested it in /Applications/ or /Applications/Utilities/?

Original comment by chris...@gmail.com on 16 Nov 2011 at 5:17

GoogleCodeExporter commented 8 years ago
Yes, I've tested it in /Applications and few others...

echo "[$PATH]"; which chmod Returns the following :
[/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Developer/Tools/Qt]
/bin/chmod

Also, ~/.login,  ~/.profile, ~/.bashrc, ~/.tcshrc are all inexistant !
I have a ~/.bash_profile but it only contains few aliases

Original comment by oberthelot@gmail.com on 16 Nov 2011 at 5:30

GoogleCodeExporter commented 8 years ago
And what does svnX’s Diff command report if you add `echo "[$PATH]"; which 
chmod` after the first line of 
/Developer/svnX.app/Contents/Resources/svndiff.sh?

The file svndiff.sh is a plain shell script that svnX executes.  It needs to be 
able to find chmod, sed, cp etc.
For some reason, on your machine, it can’t.  Is there anything unusual about 
your setup?
There is no change between svnX 1.3 & 1.3.1 that should cause this problem.

Original comment by chris...@gmail.com on 16 Nov 2011 at 6:01

GoogleCodeExporter commented 8 years ago
Nothing unsual about my setup...Pretty new machine with Lion installed.
Using Qt 4.7.2 and XCode 4.2 for coding...I've installed some edit tools like 
textwrangler and mac vim, prior to updating svnX, maybe it's linked somehow ? 
I've made sure that the svnx preferences link to a valid directory and use 
Filemerge (Anyways it's working when I lauch it from terminal...)

I've added `echo "[$PATH]"; which chmod` in the svndiff.sh as you proposed and 
it gives pretty much the same error, now it can't find the 'which' command 
either...here's the full error message :

/Developer/svnX.app/Contents/Resources/svndiff.sh: line 3: which: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 26: chmod: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 13: sed: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 31: cp: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 36: sed: command not 
found
/Developer/svnX.app/Contents/Resources/svndiff.sh: line 40: sed: command not 
found

I've tried navigating into the package with Finder and double clicking on the 
svnX and it still doesn't work.... :/

Original comment by oberthelot@gmail.com on 16 Nov 2011 at 6:27

GoogleCodeExporter commented 8 years ago
> Nothing unsual about my setup...

Well svndiff.sh is a normal shell script that has hardly changed since svnX 
1.0.  (∴ it’s not caused by svndiff.sh.)
You said it works if you launch svnX from Terminal.  (∴ it’s environmental.)
You said svnX 1.3 worked.  (Does it still work?  I doubt it.)
No one else has reported any similar problem.  (∴ there’s something unusual 
about your setup ;-).)

As the script can’t find chmod, sed & cp then something must be modifying 
$PATH.
SvnX does NOT modify $PATH.
Your $PATH in your shell in Terminal has been modified (appended 
/Developer/Tools/Qt), but looks OK.
Where is that mod coming from?
[But because $PATH is OK in Terminal it is OK when you launch svnX from 
Terminal so it is OK in svndiff.sh.]

We need to ascertain the value of $PATH given to svnX (& therefor svndiff.sh) 
when you launch svnX from the Finder.
Try replacing the previously added commands in svndiff.sh with:
    { echo "[$PATH]"; /usr/bin/which chmod; } >& 2; export
That should make it easier to see the relevant output from the Diff command.
The `export` command will also dump all the env vars to the Log drawer of 
svnX’s Activity window.

I use TextWrangler, but installing Qt & mac vim may well modify $PATH - somehow.
Have you also checked /etc/profile, /etc/bashrc & /etc/csh.cshrc for 
modifications.  There may be others as well.

Original comment by chris...@gmail.com on 17 Nov 2011 at 4:34

GoogleCodeExporter commented 8 years ago
No response?
Does that mean that you solved your problem?
Care to share?

Original comment by chris...@gmail.com on 29 Nov 2011 at 4:22

GoogleCodeExporter commented 8 years ago
I am sorry for the lack in feedback !
No I haven't solve the problem at all....I'm way busy at work so I'm just using 
it like that for the time being until I find the solution or more likely the 
problem in my setup ! 
I'll definitly share then.

Original comment by oberthe...@toonboom.com on 29 Nov 2011 at 4:44

GoogleCodeExporter commented 8 years ago
BTW Are you aware of this:
<http://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPRuntim
eConfig/Articles/EnvironmentVars.html#//apple_ref/doc/uid/20002093-113982>

It’s possible that a ~/.MacOSX/environment.plist is toasting your PATH 
environment but ~/.profile (or similar) is restoring it in your shell in 
Terminal.app, which is why launching svnX from there works normally.

Also I’ve been experimenting with adding
    PATH=~/bin:/usr/bin:/bin:/usr/local/bin:/Developer/usr/bin
near the top of svndiff.sh.  This appears to work fine for me, so it may well 
appear in a future release.

Original comment by chris...@gmail.com on 31 Dec 2011 at 2:41

GoogleCodeExporter commented 8 years ago
Marking as `invalid` for now.
However, I’m still interested in understanding the problem.

Original comment by chris...@gmail.com on 1 Jan 2012 at 7:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have just fixed this problem.  Complicated.  svnX calls /usr/bin/opendiff 
which calls FileMerge.app.  Even though svnX gives no error at the GUI, it does 
print to the console, so starting the console app showed me that opendiff could 
not find FileMerge.app.  FileMerge.app does not seem to be released with my 
(very) beta version of xcode4.3 which is installed in /Applications. Luckily I 
did not delete a previous version of xcode4 which lives in /Xcode4.  This one 
works (as opposed to the FileMerge.apps I have in /xcode3 and in /Developer, 
due to not supporting PowerPC anymore in Lion, presumably).  What a mess Apple! 
Microsoft would be proud of it.
Anyway, the thing is, opendiff calls '/usr/bin/xcode-select -print-path' which 
gives back /Applications/Xcode.app/Content/Developer which as I now know does 
not have FileMerge.app inside it.
So, finally, the fix.  I copied /usr/bin/xcode-select to /Users/[me]/bin and 
changed print_current_path() as follows:
print_current_path()
{
    echo "/Xcode4"
}

I then modified my PATH environment variable in /Users/[me]/.bash_profile so 
that /Users/[me]/bin was the first entry.
It now works.
I hope this helps. Sorry for the long post. I should really have spent my time 
thinking up something witty and mocking of Apple.

Original comment by iosachri...@gmail.com on 2 Feb 2012 at 10:20

GoogleCodeExporter commented 8 years ago
This is NOT at all the same problem originally reported.

If your Xcode 4.3 does not include ‘opendiff’ you could have simply tried 
adding a symbolic link from 
/Applications/Xcode.app/Content/Developer/usr/bin/opendiff to 
/Xcode4/usr/bin/opendiff.
[Presuming that there is still a ‘/usr/bin’ dir in the 4.3 ‘Developer’ 
dir.]

I don’t believe that this has anything to do with lack of PowerPC support in 
Lion.
[FileMerge.app & opendiff are Universal back to, at least, Xcode 2.5.]

Original comment by chris...@gmail.com on 3 Feb 2012 at 1:00