Merge lp:~jelmer/qbrz/trunk into lp:qbrz

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 1641
Proposed branch: lp:~jelmer/qbrz/trunk
Merge into: lp:qbrz
Diff against target: 107 lines (+12/-13)
4 files modified
lib/diffwindow.py (+0/-4)
lib/tests/test_annotate.py (+7/-4)
lib/tests/test_treewidget.py (+0/-1)
lib/treewidget.py (+5/-4)
To merge this branch: bzr merge lp:~jelmer/qbrz/trunk
Reviewer Review Type Date Requested Status
Robert Ladyman Approve
Review via email: mp+403345@code.launchpad.net

Description of the change

Some compatibility fixes for Breezy 3.2.

This reduces the number of test failures, but there are still some remaining.

Breezy 3.2 has updated the APIs to discourage use of file ids
(which don't exist for non-bzr formats). qbrz should probably be updated
to use paths rather than file ids as well.

To post a comment you must log in.
Revision history for this message
Robert Ladyman (saccadic-masking) wrote :

Please go ahead and merge.

qbrz will need extensive changes I think - file ids are used throughout. ChangeDesc also has a different definition.

review: Approve
lp:~jelmer/qbrz/trunk updated
1641. By Jelmer Vernooij

Improve Breezy 3.2 compatibility.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/diffwindow.py'
--- lib/diffwindow.py 2021-01-06 09:29:35 +0000
+++ lib/diffwindow.py 2021-05-26 19:12:34 +0000
@@ -32,7 +32,6 @@
32# from patiencediff import PatienceSequenceMatcher as SequenceMatcher32# from patiencediff import PatienceSequenceMatcher as SequenceMatcher
33from patiencediff import PatienceSequenceMatcher as SequenceMatcher33from patiencediff import PatienceSequenceMatcher as SequenceMatcher
34from breezy.revisiontree import RevisionTree34from breezy.revisiontree import RevisionTree
35from breezy.transform import _PreviewTree
36from breezy.workingtree import WorkingTree35from breezy.workingtree import WorkingTree
37from breezy.bzr.workingtree_4 import DirStateRevisionTree36from breezy.bzr.workingtree_4 import DirStateRevisionTree
38from breezy import trace37from breezy import trace
@@ -111,9 +110,6 @@
111 else:110 else:
112 return gettext("Revid: %s") % revid111 return gettext("Revid: %s") % revid
113112
114 elif isinstance(tree, _PreviewTree):
115 return gettext('Merge Preview')
116
117 # XXX I don't know what other cases we need to handle113 # XXX I don't know what other cases we need to handle
118 return 'Unknown tree'114 return 'Unknown tree'
119115
120116
=== modified file 'lib/tests/test_annotate.py'
--- lib/tests/test_annotate.py 2021-01-05 16:26:04 +0000
+++ lib/tests/test_annotate.py 2021-05-26 19:12:34 +0000
@@ -25,7 +25,7 @@
2525
26from breezy.tests import TestCase, TestCaseWithTransport26from breezy.tests import TestCase, TestCaseWithTransport
27from PyQt5 import QtCore27from PyQt5 import QtCore
28from breezy import conflicts28from breezy.conflicts import ConflictList
29from breezy.plugins.qbrz.lib import tests as qtests29from breezy.plugins.qbrz.lib import tests as qtests
30from breezy.plugins.qbrz.lib.annotate import AnnotateWindow30from breezy.plugins.qbrz.lib.annotate import AnnotateWindow
3131
@@ -58,11 +58,14 @@
58 self.build_tree_contents([('tree2/a', b'first\nthird\n')])58 self.build_tree_contents([('tree2/a', b'first\nthird\n')])
59 tree2.commit('c', rev_id=b'rev-1_1_1', committer="barry@foo5.com", timestamp=1166046002.00, timezone=0)59 tree2.commit('c', rev_id=b'rev-1_1_1', committer="barry@foo5.com", timestamp=1166046002.00, timezone=0)
6060
61 num_conflicts = tree1.merge_from_branch(tree2.branch)61 conflicts = tree1.merge_from_branch(tree2.branch)
62 self.assertEqual(1, num_conflicts)62 if isinstance(conflicts, int): # brz < 3.2
63 self.assertEqual(1, conflicts)
64 else:
65 self.assertEqual(1, len(conflicts))
6366
64 self.build_tree_contents([('tree1/a', b'first\nsecond\nthird\n')])67 self.build_tree_contents([('tree1/a', b'first\nsecond\nthird\n')])
65 tree1.set_conflicts(conflicts.ConflictList())68 tree1.set_conflicts(ConflictList())
66 tree1.commit('merge 2', rev_id=b'rev-3', committer='sal@foo5.com', timestamp=1166046003.00, timezone=0)69 tree1.commit('merge 2', rev_id=b'rev-3', committer='sal@foo5.com', timestamp=1166046003.00, timezone=0)
67 return tree1, tree270 return tree1, tree2
6871
6972
=== modified file 'lib/tests/test_treewidget.py'
--- lib/tests/test_treewidget.py 2021-01-06 11:13:35 +0000
+++ lib/tests/test_treewidget.py 2021-05-26 19:12:34 +0000
@@ -23,7 +23,6 @@
23from breezy.workingtree import WorkingTree23from breezy.workingtree import WorkingTree
24from breezy.branch import Branch24from breezy.branch import Branch
25from breezy.controldir import ControlDir25from breezy.controldir import ControlDir
26from breezy.conflicts import TextConflict, ConflictList
27from breezy import ignores26from breezy import ignores
2827
29from PyQt5 import QtCore28from PyQt5 import QtCore
3029
=== modified file 'lib/treewidget.py'
--- lib/treewidget.py 2021-01-08 16:50:52 +0000
+++ lib/treewidget.py 2021-05-26 19:12:34 +0000
@@ -20,6 +20,10 @@
20import os, sys20import os, sys
21from PyQt5 import QtCore, QtGui, QtWidgets21from PyQt5 import QtCore, QtGui, QtWidgets
2222
23from breezy import errors
24from breezy.lazy_import import lazy_import
25from breezy.osutils import file_kind, minimum_path_selection
26
23from breezy.plugins.qbrz.lib.i18n import gettext27from breezy.plugins.qbrz.lib.i18n import gettext
2428
25from breezy.plugins.qbrz.lib.revtreeview import (29from breezy.plugins.qbrz.lib.revtreeview import (
@@ -27,7 +31,6 @@
27 RevNoItemDelegate,31 RevNoItemDelegate,
28 )32 )
29from breezy.plugins.qbrz.lib.uifactory import ui_current_widget33from breezy.plugins.qbrz.lib.uifactory import ui_current_widget
30from breezy.lazy_import import lazy_import
31from breezy.plugins.qbrz.lib.lazycachedrevloader import cached_revisions34from breezy.plugins.qbrz.lib.lazycachedrevloader import cached_revisions
32from breezy.plugins.qbrz.lib.trace import report_exception, SUB_LOAD_METHOD35from breezy.plugins.qbrz.lib.trace import report_exception, SUB_LOAD_METHOD
3336
@@ -35,10 +38,8 @@
35import posixpath # to use '/' path sep in path.join().38import posixpath # to use '/' path sep in path.join().
36from time import (strftime, localtime)39from time import (strftime, localtime)
3740
38from breezy import errors
39from breezy.workingtree import WorkingTree41from breezy.workingtree import WorkingTree
40from breezy.revisiontree import RevisionTree42from breezy.revisiontree import RevisionTree
41from breezy.osutils import file_kind, minimum_path_selection
42from breezy.conflicts import TextConflict, resolve43from breezy.conflicts import TextConflict, resolve
43from breezy.tree import TreeChange44from breezy.tree import TreeChange
4445
@@ -674,7 +675,7 @@
674 (kind, executable, stat_value) = self.tree._comparison_data(None, path)675 (kind, executable, stat_value) = self.tree._comparison_data(None, path)
675 child = InternalItem(name, kind, None)676 child = InternalItem(name, kind, None)
676 is_ignored = self.tree.is_ignored(path)677 is_ignored = self.tree.is_ignored(path)
677 t = TreeChange(None,(None, path), False, (False, False), (None, None), (None, name), (None, kind), (None, executable))678 t = TreeChange((None, path), False, (False, False), (None, None), (None, name), (None, kind), (None, executable))
678 change = ChangeDesc(t, is_ignored)679 change = ChangeDesc(t, is_ignored)
679680
680 # change = ChangeDesc((None,(None, path), False, (False, False), (None, None), (None, name), (None, kind),681 # change = ChangeDesc((None,(None, path), False, (False, False), (None, None), (None, name), (None, kind),

Subscribers

People subscribed via source and target branches