~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/knitrepo.py

  • Committer: Brad Crittenden
  • Date: 2007-02-26 20:56:10 UTC
  • mfrom: (2300 +trunk)
  • mto: (2293.1.5 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 2311.
  • Revision ID: brad.crittenden@canonical.com-20070226205610-44oatbxrjjz3ajwy
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    knit,
21
21
    lockable_files,
22
22
    lockdir,
 
23
    osutils,
23
24
    transactions,
24
25
    xml5,
25
26
    xml6,
63
64
        This determines the set of revisions which are involved, and then
64
65
        finds all file ids affected by those revisions.
65
66
        """
 
67
        from_revid = osutils.safe_revision_id(from_revid)
 
68
        to_revid = osutils.safe_revision_id(to_revid)
66
69
        vf = self._get_revision_vf()
67
70
        from_set = set(vf.get_ancestry(from_revid))
68
71
        to_set = set(vf.get_ancestry(to_revid))
90
93
        """
91
94
        if revision_id is None:
92
95
            return [None]
 
96
        revision_id = osutils.safe_revision_id(revision_id)
93
97
        vf = self._get_revision_vf()
94
98
        try:
95
99
            return [None] + vf.get_ancestry(revision_id)
99
103
    @needs_read_lock
100
104
    def get_revision(self, revision_id):
101
105
        """Return the Revision object for a named revision"""
 
106
        revision_id = osutils.safe_revision_id(revision_id)
102
107
        return self.get_revision_reconcile(revision_id)
103
108
 
104
109
    @needs_read_lock
113
118
        # special case NULL_REVISION
114
119
        if revision_id == _mod_revision.NULL_REVISION:
115
120
            return {}
 
121
        revision_id = osutils.safe_revision_id(revision_id)
116
122
        a_weave = self._get_revision_vf()
117
123
        entire_graph = a_weave.get_graph()
118
124
        if revision_id is None:
145
151
            pending = set(self.all_revision_ids())
146
152
            required = set([])
147
153
        else:
148
 
            pending = set(revision_ids)
 
154
            pending = set(osutils.safe_revision_id(r) for r in revision_ids)
149
155
            # special case NULL_REVISION
150
156
            if _mod_revision.NULL_REVISION in pending:
151
157
                pending.remove(_mod_revision.NULL_REVISION)
193
199
        return reconciler
194
200
    
195
201
    def revision_parents(self, revision_id):
 
202
        revision_id = osutils.safe_revision_id(revision_id)
196
203
        return self._get_revision_vf().get_parents(revision_id)
197
204
 
198
205
 
238
245
        :param revprops: Optional dictionary of revision properties.
239
246
        :param revision_id: Optional revision id.
240
247
        """
 
248
        revision_id = osutils.safe_revision_id(revision_id)
241
249
        return RootCommitBuilder(self, parents, config, timestamp, timezone,
242
250
                                 committer, revprops, revision_id)
243
251