Merge lp:~baztian/bzr-difftools/rename-to-extdiff into lp:bzr-difftools

Proposed by Bastian
Status: Needs review
Proposed branch: lp:~baztian/bzr-difftools/rename-to-extdiff
Merge into: lp:bzr-difftools
Diff against target: 72 lines (+15/-13)
1 file modified
__init__.py (+15/-13)
To merge this branch: bzr merge lp:~baztian/bzr-difftools/rename-to-extdiff
Reviewer Review Type Date Requested Status
Stephen Ward Pending
Review via email: mp+68055@code.launchpad.net

Description of the change

Renamed command from diff to extdiff to don't interfere with diff's original --using

To post a comment you must log in.

Unmerged revisions

42. By Bastian

Renamed command from diff to extdiff to don't interfere with diff's original --using

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '__init__.py'
2--- __init__.py 2007-09-30 18:13:15 +0000
3+++ __init__.py 2011-07-15 08:36:02 +0000
4@@ -5,10 +5,11 @@
5 """
6 External diff tools plugin for Bazaar
7
8-This plugin overrides the default 'bzr diff' command to add a new option
9-'--using', which is used to specify an external diff tool to run in place
10-of the builtin implementation. Usually, this will be some form of
11-graphical diff tool.
12+This plugin overrides the default 'bzr diff' command to provide a new
13+command 'bzr extdiff' and to add a new option '--using', which is used
14+to specify an external diff tool to run in place of the builtin
15+implementation. Usually, this will be some form of graphical diff
16+tool.
17
18 If the '--using' option is not provided, the original builtin 'bzr diff'
19 behavior is used.
20@@ -27,10 +28,11 @@
21 safely. So this option can potentially be used for both external diff
22 tools and alternate internal diff algorithms.
23
24-The 'cmd_diff' class, defined here, is a minimalist command extension; most
25-of the actual work is delegated to the Controller class instead. The
26-purpose of this separation is to minimize the startup overhead, by deferring
27-most of the 'import' processing until the command is actually executed.
28+The 'cmd_extdiff' class, defined here, is a minimalist command
29+extension; most of the actual work is delegated to the Controller
30+class instead. The purpose of this separation is to minimize the
31+startup overhead, by deferring most of the 'import' processing until
32+the command is actually executed.
33
34 Note that this extension is not truly a decorator for the 'diff' command,
35 because it does not always call the builtin 'diff' command. This could
36@@ -45,7 +47,7 @@
37 option,
38 )
39
40-class cmd_diff(builtins.cmd_diff):
41+class cmd_extdiff(builtins.cmd_diff):
42 """
43 The '--using TOOL' option can be used to run an external diff tool.
44
45@@ -78,7 +80,7 @@
46 return Controller().run(*args, **kwargs)
47 else:
48 # Run the builtin diff command normally:
49- return super(cmd_diff, self).run(*args, **kwargs)
50+ return super(cmd_extdiff, self).run(*args, **kwargs)
51
52
53 def help(self):
54@@ -86,15 +88,15 @@
55 Return help message for this class, including text from superclass.
56 """
57 from inspect import getdoc
58- return getdoc(super(cmd_diff, self)) + '\n\n' + getdoc(self)
59+ return getdoc(super(cmd_extdiff, self)) + '\n\n' + getdoc(self)
60
61- # End class cmd_diff
62+ # End class cmd_extdiff
63
64
65 # Initialize the plugin:
66 version_info = (0, 91, 0, 'final', 0)
67
68 # Register the new command provided by this plugin:
69-commands.register_command(cmd_diff, decorate=False)
70+commands.register_command(cmd_extdiff, decorate=False)
71
72 # The End.

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: