emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bzr: just give me a context diff, will you?


From: Alan Mackenzie
Subject: bzr: just give me a context diff, will you?
Date: Tue, 20 Apr 2010 18:00:03 +0000
User-agent: Mutt/1.5.9i

Hi, Emacs!

The project standard for diff output is a context diff, not a unified
diff.  By default, bzr unfortunately outputs unified.

For anybody else who finds typing "--diff-options='-c'" intolerably
long-winded, here is a quick hack in bzr to make context diffs the
default.  The file is ..../bzr-2.1.0/bzrlib/diff.py.


*** diff.py~    2010-02-16 17:00:21.000000000 +0000
--- diff.py     2010-04-20 17:42:45.059802592 +0000
***************
*** 868,873 ****
--- 868,878 ----
              extra_factories = [DiffFromTool.make_from_diff_tree(using)]
          else:
              extra_factories = []
+         
+         # Added 2010-04-20 to make context diffs the default.
+         if not external_diff_options:
+             external_diff_options = '-c'
+ 
          if external_diff_options:
              opts = external_diff_options.split()
              def diff_file(olab, olines, nlab, nlines, to_file):


-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]