Page MenuHomePhabricator

Context not available for revisions created on Windows
Open, LowPublic


Most probably this is an Arcanist bug specific to Windows which is manifested in Phabricator.

When I create a revision on Windows (Windows 7, 64-bit) using 'arc diff' on the command line, the revision is created alright, but in the browser I cannot see the full contents of the file. See 'Context not available' in the attached image.

When I submit the same revision (same subversion project and file) from a Linux machine, the browser shows the full contents.

Event Timeline

raman.rathod attached 1 file(s): Restricted File.
raman.rathod added a subscriber: raman.rathod.

The underlying VCS is SVN, right?

The problem here in general is that svn has no "show more context" flag. On non-Windows systems, we run:

svn diff --diff-cmd diff -x -U9999999

However, on Windows there is no guarantee that 'diff' exists, so we can't do this.

(The code in question lives in ArcanistSubversionAPI->buildDiffFuture().)

Two questions:

  • Are you running arc in an environment where diff does exist (maybe cygwin or similar)? If so, we could test for diff and use the better version if it's available to solve this problem.
  • If diff does not exist, can you find another way to produce a diff with context in your environment (which doesn't involve, say, clicking into context menus in TurtleSVN or whatever)? I haven't spent much time looking, but a quick googling seemed fruitless. If there's some way to do this that I just don't know about, we could use that.

Thanks @epriestley for giving a clear picture of the issue. Yes, we are using SVN. And most of our Windows systems have the GNU diff available. It comes with cygwin, but is also available as standalone win32 program.

Therefore, I think it is a good idea as you propose to look for an available diff program on windows and if so, a command similar to that on non-windows platforms can be used. You may also consider parsing the SVN config file to see if diff-cmd is already defined by the user.

In the meantime, our developers are using the following work-around:

  1. Install GNU diff (
  2. create a bat file (mydiff.bat) with the following content:
@echo off
<full path of the diff.exe installed in step 1>  -U9999999 -L %3 -L %5 %6 %7
  1. In the SVN config file, add/edit the line:
diff-cmd = <full path of mydiff.bat>

That's it. Now using 'arc diff' from the command line generates revisions with full context.

Thanks for the followup, that's very helpful. I'll modify arc to test for the existence of diff.

FWIW, I can confirm this as well. My team is having this issue too, though I'm attempting to make Ubuntu our official development platform, so hopefully I will resolve that BEFORE this is fixed.

chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 23 2015, 4:37 AM

Any update on this? Th solution proposed by raman is not working for me :(

PD: I have a problem with a configuration, I checked it, and the solution from raman is still working :)

epriestley lowered the priority of this task from High to Low.Oct 2 2018, 1:05 PM