8687.15.17
by Karl Fogel
Add the copyright header block to the rest of the files under lib/lp/. |
1 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
2 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
3 |
||
4983.1.1
by Curtis Hovey
Added lint exceptions to __init__.py and interface/*.py. |
4 |
# pylint: disable-msg=E0211,E0213
|
3691.426.7
by Tim Penhey
fixed test and separated branchrevision |
5 |
|
6 |
"""BranchRevision interfaces."""
|
|
7 |
||
8 |
__metaclass__ = type |
|
7675.814.10
by Tim Penhey
Remove the now useless BranchRevisionSet. |
9 |
__all__ = [ |
10 |
'IBranchRevision', |
|
11 |
]
|
|
3691.426.7
by Tim Penhey
fixed test and separated branchrevision |
12 |
|
11403.1.4
by Henning Eggers
Reformatted imports using format-imports script r32. |
13 |
from zope.interface import ( |
14 |
Attribute, |
|
15 |
Interface, |
|
16 |
)
|
|
3691.426.7
by Tim Penhey
fixed test and separated branchrevision |
17 |
from zope.schema import Int |
18 |
||
19 |
from canonical.launchpad import _ |
|
20 |
||
21 |
||
22 |
class IBranchRevision(Interface): |
|
3691.425.33
by David Allouche
update documentation and interfaces for BranchRevision semantics |
23 |
"""The association between a revision and a branch.
|
24 |
||
25 |
BranchRevision records the relation of all revisions that are part of the
|
|
26 |
ancestry of a branch. History revisions have an integer sequence, merged
|
|
27 |
revisions have sequence set to None.
|
|
28 |
"""
|
|
3691.426.7
by Tim Penhey
fixed test and separated branchrevision |
29 |
sequence = Int( |
3691.425.33
by David Allouche
update documentation and interfaces for BranchRevision semantics |
30 |
title=_("Revision number"), required=True, |
31 |
description=_("The index of the revision within the branch's history." |
|
32 |
" None for merged revisions which are not part of the history.")) |
|
33 |
branch = Attribute("The branch this revision is included in.") |
|
34 |
revision = Attribute("A revision that is included in the branch.") |