all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: bzr: just give me a context diff, will you?
Date: Tue, 20 Apr 2010 18:00:03 +0000	[thread overview]
Message-ID: <20100420180003.GA2785@muc.de> (raw)

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	other threads:[~2010-04-20 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 18:00 Alan Mackenzie [this message]
2010-04-20 18:43 ` bzr: just give me a context diff, will you? Stefan Monnier
2010-04-20 18:45 ` Eli Zaretskii
2010-04-20 20:02   ` Andreas Schwab
2010-04-22  9:50   ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100420180003.GA2785@muc.de \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.