~maxb/bzr-svn/fetch-svn-rev-info-progress-bar

« back to all changes in this revision

Viewing changes to keywords.py

  • Committer: Jelmer Vernooij
  • Date: 2010-06-29 22:09:23 UTC
  • Revision ID: jelmer@samba.org-20100629220923-bs4sj3oxo3wu0ub1
Cope with committer and date not being available.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    """last changed date"""
48
48
    if revmeta is not None:
49
49
        return revmeta.get_revprops().get(properties.PROP_REVISION_DATE, "")
50
 
    return properties.time_to_cstring(1000000*rev.timestamp)
 
50
    if rev is not None:
 
51
        return properties.time_to_cstring(1000000*rev.timestamp)
 
52
    return None
51
53
 
52
54
 
53
55
def keyword_rev(revid, rev, relpath, revmeta):
77
79
    """author of the last commit."""
78
80
    if revmeta is not None:
79
81
        return revmeta.get_revprops().get(properties.PROP_REVISION_AUTHOR, "")
80
 
    return rev.committer.encode("utf-8")
 
82
    if rev is not None:
 
83
        return rev.committer.encode("utf-8")
 
84
    return None
81
85
 
82
86
 
83
87
def keyword_id(*args):