Merge lp:~janos-gyerik/bzr-oodiff/fixes-for-bzr2.5 into lp:~ollie-petch/bzr-oodiff/trunk

Proposed by Janos Gyerik
Status: Needs review
Proposed branch: lp:~janos-gyerik/bzr-oodiff/fixes-for-bzr2.5
Merge into: lp:~ollie-petch/bzr-oodiff/trunk
Diff against target: 45 lines (+5/-7)
2 files modified
__init__.py (+1/-3)
oo_diff.py (+4/-4)
To merge this branch: bzr merge lp:~janos-gyerik/bzr-oodiff/fixes-for-bzr2.5
Reviewer Review Type Date Requested Status
ollie Pending
Review via email: mp+157959@code.launchpad.net

Description of the change

Fixed some bugs that prevented this plugin from working with Bazaar 2.5 (the current version).

I also removed the global `--wdiff` option, as it was polluting all other commands too.

To post a comment you must log in.

Unmerged revisions

8. By Janos Gyerik <janos@axiom>

removed global --wdiff option

7. By Janos Gyerik <janos@axiom>

diff_text function arguments were in the wrong order

6. By Janos Gyerik <janos@axiom>

wdiff_dir and wdiff_file should be used only after wdiff is confirmed

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 2009-04-22 15:54:05 +0000
3+++ __init__.py 2013-04-09 21:13:24 +0000
4@@ -28,11 +28,9 @@
5 from oo_diff import OODiffer
6
7
8-_standard_option('wdiff')
9-
10 class cmd_oodiff(Command):
11 takes_args = ['file_to_diff+']
12- takes_options = ['revision', 'wdiff']
13+ takes_options = ['revision']
14 def run(self, file_to_diff_list, revision=None, wdiff=None):
15 for file_to_diff in file_to_diff_list:
16 from bzrlib.workingtree import WorkingTree
17
18=== modified file 'oo_diff.py'
19--- oo_diff.py 2009-04-22 15:54:05 +0000
20+++ oo_diff.py 2013-04-09 21:13:24 +0000
21@@ -84,14 +84,14 @@
22 return list;
23
24
25- def diff_text(self, to_file = None, from_file = None):
26+ def diff_text(self, from_file = None, to_file = None):
27 """Feed's the contents of the given lists through the bazaar diff algorithm
28 :param from_text: The text from the from file
29 :param to_text: The text from the to file.
30 """
31- wdiff_dir = bzrlib.plugin.get_default_plugin_path() + "/wdiff/"
32- wdiff_file = "wdiff.py"
33 if self.wdiff == True:
34+ wdiff_dir = bzrlib.plugin.get_default_plugin_path() + "/wdiff/"
35+ wdiff_file = "wdiff.py"
36 if os.path.exists(wdiff_dir):
37 sys.path.append(wdiff_dir)
38 from wdiff import Differ
39@@ -145,4 +145,4 @@
40 def __init__(self, from_tree = None, to_tree= None, wdiff=None): pass
41
42 def diff_text(self, to_file = None, from_file = None):
43- print "Error: File Format is non ODF standard"
44\ No newline at end of file
45+ print "Error: File Format is non ODF standard"

Subscribers

People subscribed via source and target branches