~ubuntu-branches/ubuntu/trusty/bzr-xmloutput/trusty

« back to all changes in this revision

Viewing changes to debian/patches/02_bzr_2.4_compat

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2011-05-08 11:50:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110508115024-oa49uqhwysk7eysn
Tags: 0.8.7-3
* Re-arrange conditional in build-depends to make sbuild happy.
* Fix compatibility with bzr >= 2.4~beta3.
* Bump standards version to 3.9.2 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Use the standard interface for obtaining annotations - the other (private)
 
2
 one is likely to go away in bzr 2.4.
 
3
Origin: commit, revision id: jelmer@samba.org-20110504132433-950pr6w54y2r5tn4
 
4
Author: Jelmer Vernooij <jelmer@samba.org>
 
5
Last-Update: 2011-05-04
 
6
X-Bzr-Revision-Id: jelmer@samba.org-20110504132433-950pr6w54y2r5tn4
 
7
 
 
8
=== modified file 'annotatexml.py'
 
9
--- old/annotatexml.py  2010-12-15 18:27:12 +0000
 
10
+++ new/annotatexml.py  2011-05-04 13:24:33 +0000
 
11
@@ -34,8 +34,8 @@
 
12
 except ImportError:
 
13
     # to support bzr < 1.8
 
14
     from bzrlib.annotate import _annotate_file
 
15
+    from bzrlib.annotate import _annotations
 
16
 
 
17
-from bzrlib.annotate import _annotations
 
18
 from bzrlib import osutils
 
19
 
 
20
 from writer import _escape_cdata
 
21
@@ -58,10 +58,12 @@
 
22
                   (wt_root_path,
 
23
                   'file="%s"' % file_path)).encode(encoding, 'replace'))
 
24
 
 
25
-    annotations = _annotations(branch.repository, file_id, rev_id)
 
26
-    if _annotate_file:
 
27
+    if _annotate_file: # bzr < 1.8
 
28
+        annotations = _annotations(branch.repository, file_id, rev_id)
 
29
         annotation = list(_annotate_file(branch, rev_id, file_id))
 
30
     else:
 
31
+        tree = branch.repository.revision_tree(rev_id)
 
32
+        annotations = tree.annotate_iter(file_id)
 
33
         annotation = list(_expand_annotations(annotations, branch))
 
34
 
 
35
     for (revno_str, author, date_str, line_rev_id,
 
36