unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bzr: just give me a context diff, will you?
@ 2010-04-20 18:00 Alan Mackenzie
  2010-04-20 18:43 ` Stefan Monnier
  2010-04-20 18:45 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2010-04-20 18:00 UTC (permalink / raw)
  To: emacs-devel

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).




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-22  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 18:00 bzr: just give me a context diff, will you? Alan Mackenzie
2010-04-20 18:43 ` Stefan Monnier
2010-04-20 18:45 ` Eli Zaretskii
2010-04-20 20:02   ` Andreas Schwab
2010-04-22  9:50   ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).