Merge lp:~jelmer/bzr/rm-import-last-revision into lp:bzr

Proposed by Jelmer Vernooij
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: 6531
Proposed branch: lp:~jelmer/bzr/rm-import-last-revision
Merge into: lp:bzr
Diff against target: 74 lines (+2/-34)
3 files modified
bzrlib/branch.py (+0/-12)
bzrlib/tests/per_branch/test_last_revision_info.py (+0/-22)
doc/en/release-notes/bzr-2.6.txt (+2/-0)
To merge this branch: bzr merge lp:~jelmer/bzr/rm-import-last-revision
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+112089@code.launchpad.net

This proposal supersedes a proposal from 2012-06-26.

Commit message

Remove deprecated Branch.import_last_revision.

Description of the change

Remove Branch.import_last_revision(), which was deprecated in 2.4.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/26/2012 02:31 PM, Jelmer Vernooij wrote:
> Jelmer Vernooij has proposed merging
> lp:~jelmer/bzr/rm-import-last-revision into lp:bzr.
>
> Requested reviews: bzr-core (bzr-core)
>
> For more details, see:
> https://code.launchpad.net/~jelmer/bzr/rm-import-last-revision/+merge/112089
>
> Remove Branch.import_last_revision(), which was deprecated in
> 2.4.
>

 merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/ptPYACgkQJdeBCYSNAAPhSwCgrUFw5fd1gWQ6iN3EVOiL84WX
QdEAoIsLqlqpl8aKEQKMrJW2gKal0E+b
=jQSC
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/branch.py'
2--- bzrlib/branch.py 2012-06-26 12:58:22 +0000
3+++ bzrlib/branch.py 2012-06-26 15:42:25 +0000
4@@ -1034,18 +1034,6 @@
5 def _read_last_revision_info(self):
6 raise NotImplementedError(self._read_last_revision_info)
7
8- @deprecated_method(deprecated_in((2, 4, 0)))
9- def import_last_revision_info(self, source_repo, revno, revid):
10- """Set the last revision info, importing from another repo if necessary.
11-
12- :param source_repo: Source repository to optionally fetch from
13- :param revno: Revision number of the new tip
14- :param revid: Revision id of the new tip
15- """
16- if not self.repository.has_same_location(source_repo):
17- self.repository.fetch(source_repo, revision_id=revid)
18- self.set_last_revision_info(revno, revid)
19-
20 def import_last_revision_info_and_tags(self, source, revno, revid,
21 lossy=False):
22 """Set the last revision info, importing from another repo if necessary.
23
24=== modified file 'bzrlib/tests/per_branch/test_last_revision_info.py'
25--- bzrlib/tests/per_branch/test_last_revision_info.py 2011-04-12 00:44:43 +0000
26+++ bzrlib/tests/per_branch/test_last_revision_info.py 2012-06-26 15:42:25 +0000
27@@ -17,7 +17,6 @@
28 """Tests for branch.last_revision_info."""
29
30 from bzrlib.revision import NULL_REVISION
31-from bzrlib.symbol_versioning import deprecated_in
32 from bzrlib.tests import TestCaseWithTransport
33
34
35@@ -35,27 +34,6 @@
36 revid = tree.commit('2st post', allow_pointless=True)
37 self.assertEqual((2, revid), tree.branch.last_revision_info())
38
39- def test_import_deprecated(self):
40- # importing and setting last revision
41- tree1 = self.make_branch_and_tree('branch1')
42- tree1.commit('1st post')
43- revid = tree1.commit('2st post', allow_pointless=True)
44- branch2 = self.make_branch('branch2')
45- self.applyDeprecated(deprecated_in((2, 4, 0)),
46- branch2.import_last_revision_info, tree1.branch.repository, 2, revid)
47- self.assertEqual((2, revid), branch2.last_revision_info())
48- self.assertTrue(branch2.repository.has_revision(revid))
49-
50- def test_same_repo_deprecated(self):
51- # importing and setting last revision within the same repo
52- tree = self.make_branch_and_tree('branch1')
53- tree.commit('1st post')
54- revid = tree.commit('2st post', allow_pointless=True)
55- tree.branch.set_last_revision_info(0, NULL_REVISION)
56- self.applyDeprecated(deprecated_in((2, 4, 0)),
57- tree.branch.import_last_revision_info, tree.branch.repository, 2, revid)
58- self.assertEqual((2, revid), tree.branch.last_revision_info())
59-
60 def test_import(self):
61 # importing and setting last revision
62 tree1 = self.make_branch_and_tree('branch1')
63
64=== modified file 'doc/en/release-notes/bzr-2.6.txt'
65--- doc/en/release-notes/bzr-2.6.txt 2012-06-26 14:26:44 +0000
66+++ doc/en/release-notes/bzr-2.6.txt 2012-06-26 15:42:25 +0000
67@@ -58,6 +58,8 @@
68 .. Changes that may require updates in plugins or other code that uses
69 bzrlib.
70
71+* Remove deprecated Branch.import_last_revision(). (Jelmer Vernooij)
72+
73 * Remove deprecated Repository.iter_reverse_revision_history().
74 (Jelmer Vernooij)
75