/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: John Arbash Meinel
  • Date: 2006-11-08 16:29:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2126.
  • Revision ID: john@arbash-meinel.com-20061108162927-edda0731a0f1e0bc
Switch revisionspec to use the help defined as help_txt rather than the doc string

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
 
34
34
class RevisionInfo(object):
35
 
    """The results of applying a revision specification to a branch.
 
35
    """The results of applying a revision specification to a branch."""
 
36
 
 
37
    help_txt = """The results of applying a revision specification to a branch.
36
38
 
37
39
    An instance has two useful attributes: revno, and rev_id.
38
40
 
99
101
 
100
102
 
101
103
class RevisionSpec(object):
102
 
    """A parsed revision specification.
 
104
    """A parsed revision specification."""
 
105
 
 
106
    help_txt = """A parsed revision specification.
103
107
 
104
108
    A revision specification can be an integer, in which case it is
105
109
    assumed to be a revno (though this will translate negative values
240
244
# private API
241
245
 
242
246
class RevisionSpec_revno(RevisionSpec):
243
 
    """Selects a revision using a number.
 
247
    """Selects a revision using a number."""
 
248
 
 
249
    help_txt = """Selects a revision using a number.
244
250
 
245
251
    Use an integer to specify a revision in the history of the branch.
246
252
    Optionally a branch can be specified. The 'revno:' prefix is optional.
346
352
 
347
353
 
348
354
class RevisionSpec_revid(RevisionSpec):
349
 
    """Selects a revision using the revision id.
 
355
    """Selects a revision using the revision id."""
 
356
 
 
357
    help_txt = """Selects a revision using the revision id.
350
358
 
351
359
    Supply a specific revision id, that can be used to specify any
352
360
    revision id in the ancestry of the branch. 
367
375
 
368
376
 
369
377
class RevisionSpec_last(RevisionSpec):
370
 
    """Selects the nth revision from the end.
 
378
    """Selects the nth revision from the end."""
 
379
 
 
380
    help_txt = """Selects the nth revision from the end.
371
381
 
372
382
    Supply a positive number to get the nth revision from the end.
373
383
    This is the same as supplying negative numbers to the 'revno:' spec.
403
413
 
404
414
 
405
415
class RevisionSpec_before(RevisionSpec):
406
 
    """Selects the parent of the revision specified.
 
416
    """Selects the parent of the revision specified."""
 
417
 
 
418
    help_txt = """Selects the parent of the revision specified.
407
419
 
408
420
    Supply any revision spec to return the parent of that revision.
409
421
    It is an error to request the parent of the null revision (before:0).
452
464
 
453
465
class RevisionSpec_tag(RevisionSpec):
454
466
    """To be implemented."""
 
467
 
 
468
    help_txt = """To be implemented."""
 
469
 
455
470
    prefix = 'tag:'
456
471
 
457
472
    def _match_on(self, branch, revs):
482
497
 
483
498
 
484
499
class RevisionSpec_date(RevisionSpec):
485
 
    """Selects a revision on the basis of a datestamp.
 
500
    """Selects a revision on the basis of a datestamp."""
 
501
 
 
502
    help_txt = """Selects a revision on the basis of a datestamp.
486
503
 
487
504
    Supply a datestamp to select the first revision that matches the date.
488
505
    Date can be 'yesterday', 'today', 'tomorrow' or a YYYY-MM-DD string.
566
583
 
567
584
 
568
585
class RevisionSpec_ancestor(RevisionSpec):
569
 
    """Selects a common ancestor with a second branch.
 
586
    """Selects a common ancestor with a second branch."""
 
587
 
 
588
    help_txt = """Selects a common ancestor with a second branch.
570
589
 
571
590
    Supply the path to a branch to select the common ancestor.
572
591
 
608
627
 
609
628
 
610
629
class RevisionSpec_branch(RevisionSpec):
611
 
    """Selects the last revision of a specified branch.
 
630
    """Selects the last revision of a specified branch."""
 
631
 
 
632
    help_txt = """Selects the last revision of a specified branch.
612
633
 
613
634
    Supply the path to a branch to select its last revision.
614
635