Document changes made since last edit of CHANGES.
[cvs2svn.git] / cvs2svn_lib / changeset_graph_node.py
blobcbbebd731325b9779da6ee70818c300f123fff78
1 # (Be in -*- python -*- mode.)
3 # ====================================================================
4 # Copyright (c) 2006-2008 CollabNet. All rights reserved.
6 # This software is licensed as described in the file COPYING, which
7 # you should have received as part of this distribution. The terms
8 # are also available at http://subversion.tigris.org/license-1.html.
9 # If newer versions of this license are posted there, you may use a
10 # newer version instead, at your option.
12 # This software consists of voluntary contributions made by many
13 # individuals. For exact contribution history, see the revision
14 # history and logs, available at http://cvs2svn.tigris.org/.
15 # ====================================================================
17 """A node in the changeset dependency graph."""
20 class ChangesetGraphNode(object):
21 """A node in the changeset dependency graph."""
23 __slots__ = ['id', 'time_range', 'pred_ids', 'succ_ids']
25 def __init__(self, changeset, time_range, pred_ids, succ_ids):
26 # The id of the ChangesetGraphNode is the same as the id of the
27 # changeset.
28 self.id = changeset.id
30 # The range of times of CVSItems within this Changeset.
31 self.time_range = time_range
33 # The set of changeset ids of changesets that are direct
34 # predecessors of this one.
35 self.pred_ids = pred_ids
37 # The set of changeset ids of changesets that are direct
38 # successors of this one.
39 self.succ_ids = succ_ids
41 def __repr__(self):
42 """For convenience only. The format is subject to change at any time."""
44 return '%x; pred=[%s]; succ=[%s]' % (
45 self.id,
46 ','.join(['%x' % id for id in self.pred_ids]),
47 ','.join(['%x' % id for id in self.succ_ids]),