~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
        # this is mostly for helping with testing
268
268
        return '<%s %s>' % (self.__class__.__name__,
269
269
                              self.user_spec)
270
 
    
 
270
 
271
271
    def needs_branch(self):
272
272
        """Whether this revision spec needs a branch.
273
273
 
277
277
 
278
278
    def get_branch(self):
279
279
        """When the revision specifier contains a branch location, return it.
280
 
        
 
280
 
281
281
        Otherwise, return None.
282
282
        """
283
283
        return None
334
334
                dotted = False
335
335
            except ValueError:
336
336
                # dotted decimal. This arguably should not be here
337
 
                # but the from_string method is a little primitive 
 
337
                # but the from_string method is a little primitive
338
338
                # right now - RBC 20060928
339
339
                try:
340
340
                    match_revno = tuple((int(number) for number in revno_spec.split('.')))
395
395
        else:
396
396
            return self.spec[self.spec.find(':')+1:]
397
397
 
398
 
# Old compatibility 
 
398
# Old compatibility
399
399
RevisionSpec_int = RevisionSpec_revno
400
400
 
401
401
SPEC_TYPES.append(RevisionSpec_revno)
407
407
    help_txt = """Selects a revision using the revision id.
408
408
 
409
409
    Supply a specific revision id, that can be used to specify any
410
 
    revision id in the ancestry of the branch. 
 
410
    revision id in the ancestry of the branch.
411
411
    Including merges, and pending merges.
412
412
    Examples::
413
413
 
504
504
    """
505
505
 
506
506
    prefix = 'before:'
507
 
    
 
507
 
508
508
    def _match_on(self, branch, revs):
509
509
        r = RevisionSpec.from_string(self.spec)._match_on(branch, revs)
510
510
        if r.revno == 0:
616
616
      date:yesterday            -> select the first revision since yesterday
617
617
      date:2006-08-14,17:10:14  -> select the first revision after
618
618
                                   August 14th, 2006 at 5:10pm.
619
 
    """    
 
619
    """
620
620
    prefix = 'date:'
621
621
    _date_re = re.compile(
622
622
            r'(?P<date>(?P<year>\d\d\d\d)-(?P<month>\d\d)-(?P<day>\d\d))?'