[PATCH 1 of 7] mq: treat all files as text in Git mode
Alexander Fomin
afomin at fb.com
Tue Mar 21 17:08:34 UTC 2017
# HG changeset patch
# User Alexander Fomin <afomin at fb.com>
# Date 1490051288 25200
# Mon Mar 20 16:08:08 2017 -0700
# Node ID 3c43572fec91b9caa83dc3402532046013b84e07
# Parent 65969cd351b73228642d1e491e8c78b20d85405a
mq: treat all files as text in Git mode
This patch makes mq treat all files as text when in Git mode.
It has no immediate effect, but rather allows to change hg behaviour with
regarding to binary diffs generation in Git mode (issue5510).
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1180,6 +1180,8 @@ class queue(object):
if date:
date = util.parsedate(date)
diffopts = self.diffopts({'git': opts.get('git')})
+ if diffopts.git:
+ diffopts.text = True
if opts.get('checkname', True):
self.checkpatchname(patchfn)
inclsubs = checksubstate(repo)
@@ -2609,6 +2611,8 @@ def new(ui, repo, patch, *args, **opts):
msg = cmdutil.logmessage(ui, opts)
q = repo.mq
opts['msg'] = msg
+ if opts['git']:
+ opts['text'] = True
setupheaderopts(ui, opts)
q.new(repo, patch, *args, **opts)
q.savedirty()
More information about the Mercurial-devel
mailing list