jtilander / niftyplugins

Visual Studio productivity plugins
MIT License
40 stars 24 forks source link

Diff doesn't work if $P4DIFF is set #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Set P4DIFF=p4merge
2. Run 'p4 diff "C:\foo.c"' - observe that the diff opens in p4merge instead of 
p4's command line merge
3. Load MSCV and hit the diff button in niftyperforce

What is the expected output? What do you see instead?

np runs 'p4 diff -du "C:\foo.c"' which causes p4merge to be invoked with '-u 
"C:\foo.c"'
You get an error dialog from p4merge: "-u is not a valid option"

What version of the product are you using? On what operating system?

1.3.6 

Please provide any additional information below.

It would be great if np could check $P4DIFF and if it is set, do not pass the 
-du option.

Original issue reported on code.google.com by angusgra...@gmail.com on 22 Apr 2011 at 11:56

GoogleCodeExporter commented 9 years ago
Still occurs in 1.4

Original comment by bigsandw...@gmail.com on 15 Aug 2013 at 8:25

GoogleCodeExporter commented 9 years ago
This works fine with the registry key defined.  It only is an issue if the 
registry key isn't defined but the environment variable is.  In that case, it 
looks like nifty falls back to using the command line util "p4 diff".  "p4 
diff" then sees the environment variable and forwards its input to whatever 
diff program is being used which of course has no idea what the -du switch is 
for.

Original comment by bigsandw...@gmail.com on 15 Aug 2013 at 8:48