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

« back to all changes in this revision

Viewing changes to debian/patches/04_no_revision_history

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-02-21 11:30:46 UTC
  • Revision ID: package-import@ubuntu.com-20120221113046-n854cxkvrn6upq61
Tags: 0.8.8+bzr160-2
* Add patches to improve compatibility with newer versions of bzr:
 + 01_no_inventory: Don't rely on inventories being available
 + 02_elementtree: Use correct location of elementtree. Closes: #660728
 + 03_info_controldir: Fix support for 'bzr xmlinfo' in empty control
   directories.
 + 04_no_revision_history: Avoid using deprecated `Branch.revision_history`
   call.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Avoid deprecated Branch.revision_history().
 
2
Origin: commit, revision id: jelmer@samba.org-20120221102451-9wz5wjb01drb0am4
 
3
Author: Jelmer Vernooij <jelmer@samba.org>
 
4
Last-Update: 2012-02-21
 
5
Applied-Upstream: no
 
6
X-Bzr-Revision-Id: jelmer@samba.org-20120221102451-9wz5wjb01drb0am4
 
7
 
 
8
=== modified file 'tests/test_info_xml.py'
 
9
--- old/tests/test_info_xml.py  2011-10-16 23:56:35 +0000
 
10
+++ new/tests/test_info_xml.py  2012-02-21 10:24:51 +0000
 
11
@@ -135,7 +135,7 @@
 
12
         self.assertEqualDiff(expected_xml, out)
 
13
         self.assertEqual('', err)
 
14
         tree1.commit('commit one')
 
15
-        rev = branch1.repository.get_revision(branch1.revision_history()[0])
 
16
+        rev = branch1.repository.get_revision(branch1.last_revision())
 
17
         datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
18
 
 
19
         # Branch standalone with push location
 
20
@@ -670,7 +670,7 @@
 
21
         self.build_tree(['tree/lightcheckout/a'])
 
22
         tree2.add('a')
 
23
         tree2.commit('commit one')
 
24
-        rev = repo.get_revision(branch2.revision_history()[0])
 
25
+        rev = repo.get_revision(branch2.last_revision())
 
26
         datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
27
         out, err = self.run_bzr('xmlinfo tree/lightcheckout --verbose')
 
28
         expected_xml = '''<?xml version="1.0"?>
 
29
@@ -1010,7 +1010,7 @@
 
30
         tree1 = branch1.bzrdir.open_workingtree()
 
31
         tree1.add('a')
 
32
         tree1.commit('commit one')
 
33
-        rev = repo.get_revision(branch1.revision_history()[0])
 
34
+        rev = repo.get_revision(branch1.last_revision())
 
35
         datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
36
         out, err = self.run_bzr('xmlinfo -v repo/branch1')
 
37
         expected_xml = '''<?xml version="1.0"?>
 
38