Rev 3213: (robetc) Creating a new branch no longer tries to read the entire in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Feb 5 07:14:39 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3213
revision-id:pqm at pqm.ubuntu.com-20080205071430-7b9vl83ebnsd6i0g
parent: pqm at pqm.ubuntu.com-20080205040018-f8a9czbkg30yhfh0
parent: robertc at robertcollins.net-20080204022410-ohno7arxpmm9wibb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-02-05 07:14:30 +0000
message:
(robetc) Creating a new branch no longer tries to read the entire
revision-history unnecessarily over smart server operations.
(Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3211.2.1
revision-id:robertc at robertcollins.net-20080204022410-ohno7arxpmm9wibb
parent: pqm at pqm.ubuntu.com-20080201053934-q32y2nk5vvo13c6v
committer: Robert Collins <robertc at robertcollins.net>
branch nick: branch.last_revision
timestamp: Mon 2008-02-04 13:24:10 +1100
message:
* Creating a new branch no longer tries to read the entire revision-history
unnecessarily over smart server operations. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
=== modified file 'NEWS'
--- a/NEWS 2008-02-05 02:28:04 +0000
+++ b/NEWS 2008-02-05 07:14:30 +0000
@@ -46,6 +46,9 @@
IMPROVEMENTS:
+ * Creating a new branch no longer tries to read the entire revision-history
+ unnecessarily over smart server operations. (Robert Collins)
+
* Fetching between different repository formats with compatible models now
takes advantage of the smart method to stream revisions. (Andrew Bennetts)
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-01-28 21:46:16 +0000
+++ b/bzrlib/branch.py 2008-02-04 02:24:10 +0000
@@ -436,12 +436,8 @@
raise errors.UpgradeRequired(self.base)
def last_revision(self):
- """Return last revision id, or None"""
- ph = self.revision_history()
- if ph:
- return ph[-1]
- else:
- return _mod_revision.NULL_REVISION
+ """Return last revision id, or NULL_REVISION."""
+ return self.last_revision_info()[1]
def last_revision_info(self):
"""Return information about the last revision.
@@ -1948,11 +1944,6 @@
revno = int(revno)
return revno, revision_id
- def last_revision(self):
- """Return last revision id, or None"""
- revision_id = self.last_revision_info()[1]
- return revision_id
-
def _write_last_revision_info(self, revno, revision_id):
"""Simply write out the revision id, with no checks.
More information about the bazaar-commits
mailing list