Merge lp:~jelmer/bzr-xmloutput/no-revision-history into lp:bzr-xmloutput

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 161
Merged at revision: 162
Proposed branch: lp:~jelmer/bzr-xmloutput/no-revision-history
Merge into: lp:bzr-xmloutput
Diff against target: 30 lines (+3/-3)
1 file modified
tests/test_info_xml.py (+3/-3)
To merge this branch: bzr merge lp:~jelmer/bzr-xmloutput/no-revision-history
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Review via email: mp+93955@code.launchpad.net

Description of the change

Avoid deprecated Branch.revision_history().

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_info_xml.py'
2--- tests/test_info_xml.py 2011-10-16 23:56:35 +0000
3+++ tests/test_info_xml.py 2012-02-21 10:37:25 +0000
4@@ -135,7 +135,7 @@
5 self.assertEqualDiff(expected_xml, out)
6 self.assertEqual('', err)
7 tree1.commit('commit one')
8- rev = branch1.repository.get_revision(branch1.revision_history()[0])
9+ rev = branch1.repository.get_revision(branch1.last_revision())
10 datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
11
12 # Branch standalone with push location
13@@ -670,7 +670,7 @@
14 self.build_tree(['tree/lightcheckout/a'])
15 tree2.add('a')
16 tree2.commit('commit one')
17- rev = repo.get_revision(branch2.revision_history()[0])
18+ rev = repo.get_revision(branch2.last_revision())
19 datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
20 out, err = self.run_bzr('xmlinfo tree/lightcheckout --verbose')
21 expected_xml = '''<?xml version="1.0"?>
22@@ -1010,7 +1010,7 @@
23 tree1 = branch1.bzrdir.open_workingtree()
24 tree1.add('a')
25 tree1.commit('commit one')
26- rev = repo.get_revision(branch1.revision_history()[0])
27+ rev = repo.get_revision(branch1.last_revision())
28 datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
29 out, err = self.run_bzr('xmlinfo -v repo/branch1')
30 expected_xml = '''<?xml version="1.0"?>

Subscribers

People subscribed via source and target branches

to all changes: