can't set a default external diff program

Bug #289268 reported by pdf23ds
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

There is no way to set a default argument of the --using command. There definitely should be. Here's a patch to do so. Note that if "--using" is passed "bzr" then the internal diff stuff is used. This way you can override the use of an external tool on the commandline if you have one set in your config file.

Tags: config diff
Revision history for this message
pdf23ds (pdf23ds) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi pdf23ds,

Thanks for the patch! The normal way to submit changes to bzr is via the mailing list, in an attachment to an email with a subject starting with '[MERGE]' (e.g. "[MERGE][Bug #289263] Allow setting of default external diff program"). You can use a patch, as you have here, or you can use 'bzr send'.

One thing that is required of any code going into bzrlib is testing. For this change, I suggest you look in bzrlib/tests/test_config.py and bzrlib/tests/blackbox/test_diff.py to see what is done there.

Dan

Changed in bzr:
assignee: nobody → pdf23ds
status: New → In Progress
Revision history for this message
Aaron Bentley (abentley) wrote :

There certainly is a way of configuring a default argument of the --using option: aliases.

Aliases are the normal way of configuring Bazaar commands.

Revision history for this message
pdf23ds (pdf23ds) wrote :

Yes, I found out about aliases a couple days ago, and in light of those my patch is superfluous. It'd be nice if the "bzr help diff" made a small mention of that feature.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 289268] Re: can't set a default external diff program

On Wed, Oct 29, 2008 at 9:39 AM, pdf23ds <email address hidden> wrote:
> Yes, I found out about aliases a couple days ago, and in light of those
> my patch is superfluous. It'd be nice if the "bzr help diff" made a
> small mention of that feature.

I think it would be useful to have a separate means to configure the
diff program. Other commands like merge and commit also show diffs,
as do some guis, and it would be good to have a single place to set
it. So please do post it for review if you haven't already.

There is another bug asking for the ability to do more complex
substitutions into the diff command line and you might like to look at
that too.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
pdf23ds (pdf23ds) wrote :

> I think it would be useful to have a separate means to configure the
> diff program. Other commands like merge and commit also show diffs,
> as do some guis, and it would be good to have a single place to set
> it. So please do post it for review if you haven't already.

My patch *certainly* doesn't change the behavior of those other commands, and it'd take a lot more work, or knowledge, to do that. I won't be doing that, sorry.

Revision history for this message
Robert Collins (lifeless) wrote :

@pdf23ds thats fine, I've updated the bug status, and hopefully we'll catch up with our patch backlog sometime soon.

Changed in bzr:
assignee: pdf23ds (pdf23ds) → nobody
status: In Progress → Confirmed
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: config diff
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Jelmer Vernooij (jelmer)
no longer affects: brz
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.