~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisiontree.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-18 07:00:11 UTC
  • mto: (4973.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4975.
  • Revision ID: andrew.bennetts@canonical.com-20100118070011-zu374wvd0lcgai5a
Move news_merge plugin from contrib to bzrlib/plugins, change it to be enabled via a 'news_merge_files' config option, move more code out of the __init__ to minimise overhead, and add lots of docstrings, add NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
 
21
21
from bzrlib import (
22
22
    errors,
 
23
    osutils,
23
24
    revision,
 
25
    symbol_versioning,
24
26
    tree,
25
27
    )
26
28
 
101
103
 
102
104
    def get_file_mtime(self, file_id, path=None):
103
105
        ie = self._inventory[file_id]
104
 
        try:
105
 
            revision = self._repository.get_revision(ie.revision)
106
 
        except errors.NoSuchRevision:
107
 
            raise errors.FileTimestampUnavailable(self.id2path(file_id))
 
106
        revision = self._repository.get_revision(ie.revision)
108
107
        return revision.timestamp
109
108
 
110
109
    def is_executable(self, file_id, path=None):
174
173
        return set(self._repository.get_ancestry(self._revision_id,
175
174
                                                 topo_sorted=False))
176
175
 
177
 
    def is_locked(self):
178
 
        return self._repository.is_locked()
179
 
 
180
176
    def lock_read(self):
181
177
        self._repository.lock_read()
182
 
        return self
183
178
 
184
179
    def __repr__(self):
185
180
        return '<%s instance at %x, rev_id=%r>' % (