Rev 2952: Repository.gather_stats() validly can get None for the revid. in http://bzr.arbash-meinel.com/branches/bzr/0.92-dev/repository_fetch_self_158333
John Arbash Meinel
john at arbash-meinel.com
Fri Nov 16 03:56:29 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.92-dev/repository_fetch_self_158333
------------------------------------------------------------
revno: 2952
revision-id:john at arbash-meinel.com-20071116035541-nwajn3jyy8hq0op7
parent: john at arbash-meinel.com-20071116014617-blf76y9sa8b605t6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: repository_fetch_self_158333
timestamp: Thu 2007-11-15 21:55:41 -0600
message:
Repository.gather_stats() validly can get None for the revid.
But is_null() causes a warning in that case.
so check explicitly for None or is_null()
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
-------------- next part --------------
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2007-11-16 01:39:55 +0000
+++ b/bzrlib/remote.py 2007-11-16 03:55:41 +0000
@@ -357,7 +357,8 @@
def gather_stats(self, revid=None, committers=None):
"""See Repository.gather_stats()."""
path = self.bzrdir._path_for_remote_call(self._client)
- if revision.is_null(revid):
+ # revid can be None to indicate no revisions, not just NULL_REVISION
+ if revid is None or revision.is_null(revid):
fmt_revid = ''
else:
fmt_revid = revid
More information about the bazaar-commits
mailing list