Rev 2112: Clearer name for IncompleteMetaHistory, fix return value. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5
Jelmer Vernooij
jelmer at samba.org
Sun Nov 30 21:56:54 GMT 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2112
revision-id: jelmer at samba.org-20081130215652-pw8h6v2293cax1w2
parent: jelmer at samba.org-20081130212749-op3jap6kxqcf04gh
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Sun 2008-11-30 22:56:52 +0100
message:
Clearer name for IncompleteMetaHistory, fix return value.
modified:
revids.py revids.py-20070416220458-36vfa0730cchevp1-1
revmeta.py revmeta.py-20080901215045-n8a6arqybs9ez5hl-1
=== modified file 'revids.py'
--- a/revids.py 2008-11-29 05:14:28 +0000
+++ b/revids.py 2008-11-30 21:56:52 +0000
@@ -93,8 +93,9 @@
revids = set()
try:
revmeta = self.repos._revmeta_provider.lookup_revision(branch, revno)
- for revid, bzr_revno, mapping_name in revmeta.get_roundtrip_ancestor_revids():
- revids.add(((bzr_revno, revid), mapping_name))
+ if revmeta.consider_bzr_fileprops():
+ for revid, bzr_revno, mapping_name in revmeta.get_roundtrip_ancestor_revids():
+ revids.add(((bzr_revno, revid), mapping_name))
except subvertpy.SubversionException, (_, ERR_FS_NOT_DIRECTORY):
continue
=== modified file 'revmeta.py'
--- a/revmeta.py 2008-11-30 21:27:49 +0000
+++ b/revmeta.py 2008-11-30 21:56:52 +0000
@@ -51,7 +51,7 @@
from itertools import ifilter, imap
-class MetabranchHistoryIncomplete(Exception):
+class MetaHistoryIncomplete(Exception):
"""No revision metadata branch."""
@@ -102,7 +102,7 @@
self._consider_svk_fileprops = None
self.metabranch = metabranch
self.uuid = uuid
- self.descendants = set()
+ self.children = set()
def __eq__(self, other):
return (type(self) == type(other) and
@@ -240,7 +240,7 @@
except StopIteration:
self._direct_lhs_parent_revmeta = None
return self._direct_lhs_parent_revmeta
- except MetabranchHistoryIncomplete:
+ except MetaHistoryIncomplete:
pass
# FIXME: Don't use iter_reverse_branch_changes since it browses history
iterator = self.repository._revmeta_provider.iter_reverse_branch_changes(self.branch_path,
@@ -484,6 +484,7 @@
if self._consider_bzr_fileprops is not None:
return self._consider_bzr_fileprops
self._consider_bzr_fileprops = (self.metabranch is None or self.metabranch.consider_bzr_fileprops(self))
+ return self._consider_bzr_fileprops
def consider_svk_fileprops(self):
if self._consider_svk_fileprops is not None:
@@ -607,16 +608,16 @@
while len(self._revnums) == 0 or self._revnums[0] > revnum:
try:
self.next()
- except MetabranchHistoryIncomplete:
+ except MetaHistoryIncomplete:
return
except StopIteration:
return
def next(self):
if self._get_next is None:
- raise MetabranchHistoryIncomplete()
+ raise MetaHistoryIncomplete()
if self._history_limit and len(self._revs) >= self._history_limit:
- raise MetabranchHistoryIncomplete()
+ raise MetaHistoryIncomplete()
try:
ret = self._get_next()
except StopIteration:
@@ -705,7 +706,7 @@
try:
self.next()
except StopIteration:
- raise MetabranchHistoryIncomplete()
+ raise MetaHistoryIncomplete()
if len(metabranch._revs) > ol:
return metabranch._revs[ol]
raise StopIteration()
@@ -906,6 +907,7 @@
def convert((bp, paths, revnum, revprops)):
ret = self.get_revision(bp, revnum, paths, revprops,
metabranch=metabranch)
+ ret.children.add(metabranch._revs[-1])
metabranch.append(ret)
return ret
metabranch = RevisionMetadataBranch(self, limit)
More information about the bazaar-commits
mailing list