~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-02 02:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 1834.
  • Revision ID: john@arbash-meinel.com-20060702020810-6d3ab18e40d3bde7
Print up to date even if bound, also always print out current revno.

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
        tree = WorkingTree.open_containing(dir)[0]
801
801
        tree.lock_write()
802
802
        try:
803
 
            if tree.last_revision() == tree.branch.last_revision():
 
803
            last_rev = tree.last_revision() 
 
804
            if last_rev == tree.branch.last_revision():
804
805
                # may be up to date, check master too.
805
806
                master = tree.branch.get_master_branch()
806
 
                if master is None or master.last_revision == tree.last_revision():
807
 
                    note("Tree is up to date.")
808
 
                    return
 
807
                if master is None or last_rev == master.last_revision():
 
808
                    revno = tree.branch.revision_id_to_revno(last_rev)
 
809
                    note("Tree is up to date at revision %d." % (revno,))
 
810
                    return 0
809
811
            conflicts = tree.update()
810
 
            note('Updated to revision %d.' %
811
 
                 (tree.branch.revision_id_to_revno(tree.last_revision()),))
 
812
            revno = tree.branch.revision_id_to_revno(tree.last_revision())
 
813
            note('Updated to revision %d.' % (revno,))
812
814
            if conflicts != 0:
813
815
                return 1
814
816
            else: