~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Lalo Martins
  • Date: 2005-09-07 15:28:14 UTC
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050907152813-da20c1411bc3be7f
moving the 'revision spec' stuff out of the Branch class and into a new
module (obeying a XXX comment).

This is the last XXX in branch.py, except for the ones I added :-)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.trace import mutter, note, log_error, warning
24
24
from bzrlib.errors import BzrError, BzrCheckError, BzrCommandError
25
25
from bzrlib.branch import find_branch
 
26
from bzrlib.revisionspec import get_revision_info
26
27
from bzrlib import BZRDIR
27
28
from bzrlib.commands import Command
28
29
 
124
125
        b = find_branch('.')
125
126
 
126
127
        for rev in revs:
127
 
            print '%4d %s' % b.get_revision_info(rev)
 
128
            print '%4d %s' % get_revision_info(b, rev)
128
129
 
129
130
    
130
131
class cmd_add(Command):
684
685
            rev1 = None
685
686
            rev2 = None
686
687
        elif len(revision) == 1:
687
 
            rev1 = rev2 = b.get_revision_info(revision[0])[0]
 
688
            rev1 = rev2 = get_revision_info(b, revision[0])[0]
688
689
        elif len(revision) == 2:
689
 
            rev1 = b.get_revision_info(revision[0])[0]
690
 
            rev2 = b.get_revision_info(revision[1])[0]
 
690
            rev1 = get_revision_info(b, revision[0])[0]
 
691
            rev2 = get_revision_info(b, revision[1])[0]
691
692
        else:
692
693
            raise BzrCommandError('bzr log --revision takes one or two values.')
693
694
 
885
886
        else:
886
887
            if len(revision) != 1:
887
888
                raise BzrError('bzr export --revision takes exactly 1 argument')
888
 
            revno, rev_id = b.get_revision_info(revision[0])
 
889
            revno, rev_id = get_revision_info(b, revision[0])
889
890
        t = b.revision_tree(rev_id)
890
891
        root, ext = os.path.splitext(dest)
891
892
        if not format: