~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-03-16 14:01:20 UTC
  • mfrom: (3280.2.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080316140120-i3yq8yr1l66m11h7
Start 1.4 development

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
16
 
 
17
 
 
18
 
import re
19
 
 
20
 
from bzrlib.lazy_import import lazy_import
21
 
lazy_import(globals(), """
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
 
 
17
 
22
18
import bisect
23
19
import datetime
24
 
""")
 
20
import re
25
21
 
26
22
from bzrlib import (
27
23
    errors,
28
24
    osutils,
29
 
    registry,
30
25
    revision,
31
26
    symbol_versioning,
32
27
    trace,
 
28
    tsort,
33
29
    )
34
30
 
35
31
 
104
100
 
105
101
        Use this if you don't know or care what the revno is.
106
102
        """
107
 
        if revision_id == revision.NULL_REVISION:
108
 
            return RevisionInfo(branch, 0, revision_id)
109
103
        try:
110
104
            revno = revs.index(revision_id) + 1
111
105
        except ValueError:
115
109
 
116
110
# classes in this list should have a "prefix" attribute, against which
117
111
# string specs are matched
 
112
SPEC_TYPES = []
118
113
_revno_regex = None
119
114
 
120
115
 
138
133
    """
139
134
 
140
135
    prefix = None
141
 
    wants_revision_history = True
 
136
 
 
137
    def __new__(cls, spec, _internal=False):
 
138
        if _internal:
 
139
            return object.__new__(cls, spec, _internal=_internal)
 
140
 
 
141
        symbol_versioning.warn('Creating a RevisionSpec directly has'
 
142
                               ' been deprecated in version 0.11. Use'
 
143
                               ' RevisionSpec.from_string()'
 
144
                               ' instead.',
 
145
                               DeprecationWarning, stacklevel=2)
 
146
        return RevisionSpec.from_string(spec)
142
147
 
143
148
    @staticmethod
144
149
    def from_string(spec):
153
158
 
154
159
        if spec is None:
155
160
            return RevisionSpec(None, _internal=True)
156
 
        match = revspec_registry.get_prefix(spec)
157
 
        if match is not None:
158
 
            spectype, specsuffix = match
159
 
            trace.mutter('Returning RevisionSpec %s for %s',
160
 
                         spectype.__name__, spec)
161
 
            return spectype(spec, _internal=True)
162
 
        else:
163
 
            for spectype in SPEC_TYPES:
 
161
 
 
162
        assert isinstance(spec, basestring), \
 
163
            "You should only supply strings not %s" % (type(spec),)
 
164
 
 
165
        for spectype in SPEC_TYPES:
 
166
            if spec.startswith(spectype.prefix):
164
167
                trace.mutter('Returning RevisionSpec %s for %s',
165
168
                             spectype.__name__, spec)
166
 
                if spec.startswith(spectype.prefix):
167
 
                    return spectype(spec, _internal=True)
 
169
                return spectype(spec, _internal=True)
 
170
        else:
168
171
            # RevisionSpec_revno is special cased, because it is the only
169
172
            # one that directly handles plain integers
170
173
            # TODO: This should not be special cased rather it should be
198
201
 
199
202
    def _match_on(self, branch, revs):
200
203
        trace.mutter('Returning RevisionSpec._match_on: None')
201
 
        return RevisionInfo(branch, None, None)
 
204
        return RevisionInfo(branch, 0, None)
202
205
 
203
206
    def _match_on_and_check(self, branch, revs):
204
207
        info = self._match_on(branch, revs)
205
208
        if info:
206
209
            return info
207
 
        elif info == (None, None):
208
 
            # special case - nothing supplied
 
210
        elif info == (0, None):
 
211
            # special case - the empty tree
209
212
            return info
210
213
        elif self.prefix:
211
214
            raise errors.InvalidRevisionSpec(self.user_spec, branch)
214
217
 
215
218
    def in_history(self, branch):
216
219
        if branch:
217
 
            if self.wants_revision_history:
218
 
                revs = branch.revision_history()
219
 
            else:
220
 
                revs = None
 
220
            revs = branch.revision_history()
221
221
        else:
222
222
            # this should never trigger.
223
223
            # TODO: make it a deprecated code path. RBC 20060928
233
233
    # will do what you expect.
234
234
    in_store = in_history
235
235
    in_branch = in_store
236
 
 
237
 
    def as_revision_id(self, context_branch):
238
 
        """Return just the revision_id for this revisions spec.
239
 
 
240
 
        Some revision specs require a context_branch to be able to determine
241
 
        their value. Not all specs will make use of it.
242
 
        """
243
 
        return self._as_revision_id(context_branch)
244
 
 
245
 
    def _as_revision_id(self, context_branch):
246
 
        """Implementation of as_revision_id()
247
 
 
248
 
        Classes should override this function to provide appropriate
249
 
        functionality. The default is to just call '.in_history().rev_id'
250
 
        """
251
 
        return self.in_history(context_branch).rev_id
252
 
 
253
 
    def as_tree(self, context_branch):
254
 
        """Return the tree object for this revisions spec.
255
 
 
256
 
        Some revision specs require a context_branch to be able to determine
257
 
        the revision id and access the repository. Not all specs will make
258
 
        use of it.
259
 
        """
260
 
        return self._as_tree(context_branch)
261
 
 
262
 
    def _as_tree(self, context_branch):
263
 
        """Implementation of as_tree().
264
 
 
265
 
        Classes should override this function to provide appropriate
266
 
        functionality. The default is to just call '.as_revision_id()'
267
 
        and get the revision tree from context_branch's repository.
268
 
        """
269
 
        revision_id = self.as_revision_id(context_branch)
270
 
        return context_branch.repository.revision_tree(revision_id)
271
 
 
 
236
        
272
237
    def __repr__(self):
273
238
        # this is mostly for helping with testing
274
239
        return '<%s %s>' % (self.__class__.__name__,
275
240
                              self.user_spec)
276
 
 
 
241
    
277
242
    def needs_branch(self):
278
243
        """Whether this revision spec needs a branch.
279
244
 
283
248
 
284
249
    def get_branch(self):
285
250
        """When the revision specifier contains a branch location, return it.
286
 
 
 
251
        
287
252
        Otherwise, return None.
288
253
        """
289
254
        return None
303
268
    than the branch's history, the first revision is returned.
304
269
    Examples::
305
270
 
306
 
      revno:1                   -> return the first revision of this branch
 
271
      revno:1                   -> return the first revision
307
272
      revno:3:/path/to/branch   -> return the 3rd revision of
308
273
                                   the branch '/path/to/branch'
309
274
      revno:-1                  -> The last revision in a branch.
313
278
                                   your history is very long.
314
279
    """
315
280
    prefix = 'revno:'
316
 
    wants_revision_history = False
317
281
 
318
282
    def _match_on(self, branch, revs):
319
283
        """Lookup a revision by revision number"""
320
 
        branch, revno, revision_id = self._lookup(branch, revs)
321
 
        return RevisionInfo(branch, revno, revision_id)
322
 
 
323
 
    def _lookup(self, branch, revs_or_none):
324
284
        loc = self.spec.find(':')
325
285
        if loc == -1:
326
286
            revno_spec = self.spec
340
300
                dotted = False
341
301
            except ValueError:
342
302
                # dotted decimal. This arguably should not be here
343
 
                # but the from_string method is a little primitive
 
303
                # but the from_string method is a little primitive 
344
304
                # right now - RBC 20060928
345
305
                try:
346
306
                    match_revno = tuple((int(number) for number in revno_spec.split('.')))
355
315
            # the branch object.
356
316
            from bzrlib.branch import Branch
357
317
            branch = Branch.open(branch_spec)
358
 
            revs_or_none = None
 
318
            # Need to use a new revision history
 
319
            # because we are using a specific branch
 
320
            revs = branch.revision_history()
359
321
 
360
322
        if dotted:
 
323
            branch.lock_read()
361
324
            try:
362
 
                revision_id = branch.dotted_revno_to_revision_id(match_revno,
363
 
                    _cache_reverse=True)
364
 
            except errors.NoSuchRevision:
365
 
                raise errors.InvalidRevisionSpec(self.user_spec, branch)
 
325
                revision_id_to_revno = branch.get_revision_id_to_revno_map()
 
326
                revisions = [revision_id for revision_id, revno
 
327
                             in revision_id_to_revno.iteritems()
 
328
                             if revno == match_revno]
 
329
            finally:
 
330
                branch.unlock()
 
331
            if len(revisions) != 1:
 
332
                return RevisionInfo(branch, None, None)
366
333
            else:
367
334
                # there is no traditional 'revno' for dotted-decimal revnos.
368
335
                # so for  API compatability we return None.
369
 
                return branch, None, revision_id
 
336
                return RevisionInfo(branch, None, revisions[0])
370
337
        else:
371
 
            last_revno, last_revision_id = branch.last_revision_info()
372
338
            if revno < 0:
373
339
                # if get_rev_id supported negative revnos, there would not be a
374
340
                # need for this special case.
375
 
                if (-revno) >= last_revno:
 
341
                if (-revno) >= len(revs):
376
342
                    revno = 1
377
343
                else:
378
 
                    revno = last_revno + revno + 1
 
344
                    revno = len(revs) + revno + 1
379
345
            try:
380
 
                revision_id = branch.get_rev_id(revno, revs_or_none)
 
346
                revision_id = branch.get_rev_id(revno, revs)
381
347
            except errors.NoSuchRevision:
382
348
                raise errors.InvalidRevisionSpec(self.user_spec, branch)
383
 
        return branch, revno, revision_id
384
 
 
385
 
    def _as_revision_id(self, context_branch):
386
 
        # We would have the revno here, but we don't really care
387
 
        branch, revno, revision_id = self._lookup(context_branch, None)
388
 
        return revision_id
389
 
 
 
349
        return RevisionInfo(branch, revno, revision_id)
 
350
        
390
351
    def needs_branch(self):
391
352
        return self.spec.find(':') == -1
392
353
 
396
357
        else:
397
358
            return self.spec[self.spec.find(':')+1:]
398
359
 
399
 
# Old compatibility
 
360
# Old compatibility 
400
361
RevisionSpec_int = RevisionSpec_revno
401
362
 
 
363
SPEC_TYPES.append(RevisionSpec_revno)
402
364
 
403
365
 
404
366
class RevisionSpec_revid(RevisionSpec):
407
369
    help_txt = """Selects a revision using the revision id.
408
370
 
409
371
    Supply a specific revision id, that can be used to specify any
410
 
    revision id in the ancestry of the branch.
 
372
    revision id in the ancestry of the branch. 
411
373
    Including merges, and pending merges.
412
374
    Examples::
413
375
 
414
376
      revid:aaaa@bbbb-123456789 -> Select revision 'aaaa@bbbb-123456789'
415
 
    """
416
 
 
 
377
    """    
417
378
    prefix = 'revid:'
418
379
 
419
380
    def _match_on(self, branch, revs):
423
384
        revision_id = osutils.safe_revision_id(self.spec, warn=False)
424
385
        return RevisionInfo.from_revision_id(branch, revision_id, revs)
425
386
 
426
 
    def _as_revision_id(self, context_branch):
427
 
        return osutils.safe_revision_id(self.spec, warn=False)
428
 
 
 
387
SPEC_TYPES.append(RevisionSpec_revid)
429
388
 
430
389
 
431
390
class RevisionSpec_last(RevisionSpec):
439
398
 
440
399
      last:1        -> return the last revision
441
400
      last:3        -> return the revision 2 before the end.
442
 
    """
 
401
    """    
443
402
 
444
403
    prefix = 'last:'
445
404
 
446
405
    def _match_on(self, branch, revs):
447
 
        revno, revision_id = self._revno_and_revision_id(branch, revs)
448
 
        return RevisionInfo(branch, revno, revision_id)
449
 
 
450
 
    def _revno_and_revision_id(self, context_branch, revs_or_none):
451
 
        last_revno, last_revision_id = context_branch.last_revision_info()
452
 
 
453
406
        if self.spec == '':
454
 
            if not last_revno:
455
 
                raise errors.NoCommits(context_branch)
456
 
            return last_revno, last_revision_id
 
407
            if not revs:
 
408
                raise errors.NoCommits(branch)
 
409
            return RevisionInfo(branch, len(revs), revs[-1])
457
410
 
458
411
        try:
459
412
            offset = int(self.spec)
460
413
        except ValueError, e:
461
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch, e)
 
414
            raise errors.InvalidRevisionSpec(self.user_spec, branch, e)
462
415
 
463
416
        if offset <= 0:
464
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch,
 
417
            raise errors.InvalidRevisionSpec(self.user_spec, branch,
465
418
                                             'you must supply a positive value')
466
 
 
467
 
        revno = last_revno - offset + 1
 
419
        revno = len(revs) - offset + 1
468
420
        try:
469
 
            revision_id = context_branch.get_rev_id(revno, revs_or_none)
 
421
            revision_id = branch.get_rev_id(revno, revs)
470
422
        except errors.NoSuchRevision:
471
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch)
472
 
        return revno, revision_id
473
 
 
474
 
    def _as_revision_id(self, context_branch):
475
 
        # We compute the revno as part of the process, but we don't really care
476
 
        # about it.
477
 
        revno, revision_id = self._revno_and_revision_id(context_branch, None)
478
 
        return revision_id
479
 
 
 
423
            raise errors.InvalidRevisionSpec(self.user_spec, branch)
 
424
        return RevisionInfo(branch, revno, revision_id)
 
425
 
 
426
SPEC_TYPES.append(RevisionSpec_last)
480
427
 
481
428
 
482
429
class RevisionSpec_before(RevisionSpec):
484
431
 
485
432
    help_txt = """Selects the parent of the revision specified.
486
433
 
487
 
    Supply any revision spec to return the parent of that revision.  This is
488
 
    mostly useful when inspecting revisions that are not in the revision history
489
 
    of a branch.
490
 
 
 
434
    Supply any revision spec to return the parent of that revision.
491
435
    It is an error to request the parent of the null revision (before:0).
 
436
    This is mostly useful when inspecting revisions that are not in the
 
437
    revision history of a branch.
492
438
 
493
439
    Examples::
494
440
 
495
441
      before:1913    -> Return the parent of revno 1913 (revno 1912)
496
442
      before:revid:aaaa@bbbb-1234567890  -> return the parent of revision
497
443
                                            aaaa@bbbb-1234567890
498
 
      bzr diff -r before:1913..1913
499
 
            -> Find the changes between revision 1913 and its parent (1912).
500
 
               (What changes did revision 1913 introduce).
501
 
               This is equivalent to:  bzr diff -c 1913
 
444
      bzr diff -r before:revid:aaaa..revid:aaaa
 
445
            -> Find the changes between revision 'aaaa' and its parent.
 
446
               (what changes did 'aaaa' introduce)
502
447
    """
503
448
 
504
449
    prefix = 'before:'
505
 
 
 
450
    
506
451
    def _match_on(self, branch, revs):
507
452
        r = RevisionSpec.from_string(self.spec)._match_on(branch, revs)
508
453
        if r.revno == 0:
529
474
                                                 branch)
530
475
        return RevisionInfo(branch, revno, revision_id)
531
476
 
532
 
    def _as_revision_id(self, context_branch):
533
 
        base_revspec = RevisionSpec.from_string(self.spec)
534
 
        base_revision_id = base_revspec.as_revision_id(context_branch)
535
 
        if base_revision_id == revision.NULL_REVISION:
536
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch,
537
 
                                         'cannot go before the null: revision')
538
 
        context_repo = context_branch.repository
539
 
        context_repo.lock_read()
540
 
        try:
541
 
            parent_map = context_repo.get_parent_map([base_revision_id])
542
 
        finally:
543
 
            context_repo.unlock()
544
 
        if base_revision_id not in parent_map:
545
 
            # Ghost, or unknown revision id
546
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch,
547
 
                'cannot find the matching revision')
548
 
        parents = parent_map[base_revision_id]
549
 
        if len(parents) < 1:
550
 
            raise errors.InvalidRevisionSpec(self.user_spec, context_branch,
551
 
                'No parents for revision.')
552
 
        return parents[0]
553
 
 
 
477
SPEC_TYPES.append(RevisionSpec_before)
554
478
 
555
479
 
556
480
class RevisionSpec_tag(RevisionSpec):
569
493
            branch.tags.lookup_tag(self.spec),
570
494
            revs)
571
495
 
572
 
    def _as_revision_id(self, context_branch):
573
 
        return context_branch.tags.lookup_tag(self.spec)
574
 
 
 
496
SPEC_TYPES.append(RevisionSpec_tag)
575
497
 
576
498
 
577
499
class _RevListToTimestamps(object):
605
527
 
606
528
    One way to display all the changes since yesterday would be::
607
529
 
608
 
        bzr log -r date:yesterday..
 
530
        bzr log -r date:yesterday..-1
609
531
 
610
532
    Examples::
611
533
 
612
534
      date:yesterday            -> select the first revision since yesterday
613
535
      date:2006-08-14,17:10:14  -> select the first revision after
614
536
                                   August 14th, 2006 at 5:10pm.
615
 
    """
 
537
    """    
616
538
    prefix = 'date:'
617
539
    _date_re = re.compile(
618
540
            r'(?P<date>(?P<year>\d\d\d\d)-(?P<month>\d\d)-(?P<day>\d\d))?'
674
596
        finally:
675
597
            branch.unlock()
676
598
        if rev == len(revs):
677
 
            raise errors.InvalidRevisionSpec(self.user_spec, branch)
 
599
            return RevisionInfo(branch, None)
678
600
        else:
679
601
            return RevisionInfo(branch, rev + 1)
680
602
 
 
603
SPEC_TYPES.append(RevisionSpec_date)
681
604
 
682
605
 
683
606
class RevisionSpec_ancestor(RevisionSpec):
706
629
        trace.mutter('matching ancestor: on: %s, %s', self.spec, branch)
707
630
        return self._find_revision_info(branch, self.spec)
708
631
 
709
 
    def _as_revision_id(self, context_branch):
710
 
        return self._find_revision_id(context_branch, self.spec)
711
 
 
712
632
    @staticmethod
713
633
    def _find_revision_info(branch, other_location):
714
 
        revision_id = RevisionSpec_ancestor._find_revision_id(branch,
715
 
                                                              other_location)
716
 
        try:
717
 
            revno = branch.revision_id_to_revno(revision_id)
718
 
        except errors.NoSuchRevision:
719
 
            revno = None
720
 
        return RevisionInfo(branch, revno, revision_id)
721
 
 
722
 
    @staticmethod
723
 
    def _find_revision_id(branch, other_location):
724
634
        from bzrlib.branch import Branch
725
635
 
 
636
        other_branch = Branch.open(other_location)
 
637
        revision_a = branch.last_revision()
 
638
        revision_b = other_branch.last_revision()
 
639
        for r, b in ((revision_a, branch), (revision_b, other_branch)):
 
640
            if r in (None, revision.NULL_REVISION):
 
641
                raise errors.NoCommits(b)
726
642
        branch.lock_read()
 
643
        other_branch.lock_read()
727
644
        try:
728
 
            revision_a = revision.ensure_null(branch.last_revision())
729
 
            if revision_a == revision.NULL_REVISION:
730
 
                raise errors.NoCommits(branch)
731
 
            if other_location == '':
732
 
                other_location = branch.get_parent()
733
 
            other_branch = Branch.open(other_location)
734
 
            other_branch.lock_read()
735
 
            try:
736
 
                revision_b = revision.ensure_null(other_branch.last_revision())
737
 
                if revision_b == revision.NULL_REVISION:
738
 
                    raise errors.NoCommits(other_branch)
739
 
                graph = branch.repository.get_graph(other_branch.repository)
 
645
            graph = branch.repository.get_graph(other_branch.repository)
 
646
            revision_a = revision.ensure_null(revision_a)
 
647
            revision_b = revision.ensure_null(revision_b)
 
648
            if revision.NULL_REVISION in (revision_a, revision_b):
 
649
                rev_id = revision.NULL_REVISION
 
650
            else:
740
651
                rev_id = graph.find_unique_lca(revision_a, revision_b)
741
 
            finally:
742
 
                other_branch.unlock()
743
 
            if rev_id == revision.NULL_REVISION:
744
 
                raise errors.NoCommonAncestor(revision_a, revision_b)
745
 
            return rev_id
 
652
                if rev_id == revision.NULL_REVISION:
 
653
                    raise errors.NoCommonAncestor(revision_a, revision_b)
 
654
            try:
 
655
                revno = branch.revision_id_to_revno(rev_id)
 
656
            except errors.NoSuchRevision:
 
657
                revno = None
 
658
            return RevisionInfo(branch, revno, rev_id)
746
659
        finally:
747
660
            branch.unlock()
748
 
 
749
 
 
 
661
            other_branch.unlock()
 
662
 
 
663
 
 
664
SPEC_TYPES.append(RevisionSpec_ancestor)
750
665
 
751
666
 
752
667
class RevisionSpec_branch(RevisionSpec):
775
690
        except errors.NoSuchRevision:
776
691
            revno = None
777
692
        return RevisionInfo(branch, revno, revision_b)
778
 
 
779
 
    def _as_revision_id(self, context_branch):
780
 
        from bzrlib.branch import Branch
781
 
        other_branch = Branch.open(self.spec)
782
 
        last_revision = other_branch.last_revision()
783
 
        last_revision = revision.ensure_null(last_revision)
784
 
        context_branch.fetch(other_branch, last_revision)
785
 
        if last_revision == revision.NULL_REVISION:
786
 
            raise errors.NoCommits(other_branch)
787
 
        return last_revision
788
 
 
789
 
    def _as_tree(self, context_branch):
790
 
        from bzrlib.branch import Branch
791
 
        other_branch = Branch.open(self.spec)
792
 
        last_revision = other_branch.last_revision()
793
 
        last_revision = revision.ensure_null(last_revision)
794
 
        if last_revision == revision.NULL_REVISION:
795
 
            raise errors.NoCommits(other_branch)
796
 
        return other_branch.repository.revision_tree(last_revision)
797
 
 
 
693
        
 
694
SPEC_TYPES.append(RevisionSpec_branch)
798
695
 
799
696
 
800
697
class RevisionSpec_submit(RevisionSpec_ancestor):
804
701
 
805
702
    Diffing against this shows all the changes that were made in this branch,
806
703
    and is a good predictor of what merge will do.  The submit branch is
807
 
    used by the bundle and merge directive commands.  If no submit branch
 
704
    used by the bundle and merge directive comands.  If no submit branch
808
705
    is specified, the parent branch is used instead.
809
706
 
810
707
    The common ancestor is the last revision that existed in both
818
715
 
819
716
    prefix = 'submit:'
820
717
 
821
 
    def _get_submit_location(self, branch):
 
718
    def _match_on(self, branch, revs):
 
719
        trace.mutter('matching ancestor: on: %s, %s', self.spec, branch)
822
720
        submit_location = branch.get_submit_branch()
823
721
        location_type = 'submit branch'
824
722
        if submit_location is None:
827
725
        if submit_location is None:
828
726
            raise errors.NoSubmitBranch(branch)
829
727
        trace.note('Using %s %s', location_type, submit_location)
830
 
        return submit_location
831
 
 
832
 
    def _match_on(self, branch, revs):
833
 
        trace.mutter('matching ancestor: on: %s, %s', self.spec, branch)
834
 
        return self._find_revision_info(branch,
835
 
            self._get_submit_location(branch))
836
 
 
837
 
    def _as_revision_id(self, context_branch):
838
 
        return self._find_revision_id(context_branch,
839
 
            self._get_submit_location(context_branch))
840
 
 
841
 
 
842
 
revspec_registry = registry.Registry()
843
 
def _register_revspec(revspec):
844
 
    revspec_registry.register(revspec.prefix, revspec)
845
 
 
846
 
_register_revspec(RevisionSpec_revno)
847
 
_register_revspec(RevisionSpec_revid)
848
 
_register_revspec(RevisionSpec_last)
849
 
_register_revspec(RevisionSpec_before)
850
 
_register_revspec(RevisionSpec_tag)
851
 
_register_revspec(RevisionSpec_date)
852
 
_register_revspec(RevisionSpec_ancestor)
853
 
_register_revspec(RevisionSpec_branch)
854
 
_register_revspec(RevisionSpec_submit)
855
 
 
856
 
SPEC_TYPES = symbol_versioning.deprecated_list(
857
 
    symbol_versioning.deprecated_in((1, 12, 0)), "SPEC_TYPES", [])
 
728
        return self._find_revision_info(branch, submit_location)
 
729
 
 
730
 
 
731
SPEC_TYPES.append(RevisionSpec_submit)