~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
# TODO: Some kind of command-line display of revision properties:
18
18
# perhaps show them in log -v and allow them as options to the commit command.
21
21
from bzrlib.lazy_import import lazy_import
22
22
lazy_import(globals(), """
23
23
from bzrlib import deprecated_graph
24
 
from bzrlib import bugtracker
25
24
""")
26
25
from bzrlib import (
27
26
    errors,
141
140
        else:
142
141
            return authors.split("\n")
143
142
 
144
 
    def iter_bugs(self):
145
 
        """Iterate over the bugs associated with this revision."""
146
 
        bug_property = self.properties.get('bugs', None)
147
 
        if bug_property is None:
148
 
            return
149
 
        for line in bug_property.splitlines():
150
 
            try:
151
 
                url, status = line.split(None, 2)
152
 
            except ValueError:
153
 
                raise errors.InvalidLineInBugsProperty(line)
154
 
            if status not in bugtracker.ALLOWED_BUG_STATUSES:
155
 
                raise errors.InvalidBugStatus(status)
156
 
            yield url, status
157
 
 
158
143
 
159
144
def iter_ancestors(revision_id, revision_source, only_present=False):
160
145
    ancestors = (revision_id,)
206
191
def is_reserved_id(revision_id):
207
192
    """Determine whether a revision id is reserved
208
193
 
209
 
    :return: True if the revision is reserved, False otherwise
 
194
    :return: True if the revision is is reserved, False otherwise
210
195
    """
211
196
    return isinstance(revision_id, basestring) and revision_id.endswith(':')
212
197