~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-14 17:00:01 UTC
  • mfrom: (4894.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091214170001-i0n06gmfsiv2tw00
(nmb) update displays the branch it works with

Show diffs side-by-side

added added

removed removed

Lines of Context:
1400
1400
            possible_transports=possible_transports)
1401
1401
        if master is not None:
1402
1402
            tree.lock_write()
 
1403
            branch_location = master.base
1403
1404
        else:
1404
1405
            tree.lock_tree_write()
 
1406
            branch_location = tree.branch.base
 
1407
        # get rid of the final '/' and be ready for display
 
1408
        branch_location = urlutils.unescape_for_display(branch_location[:-1],
 
1409
                                                        self.outf.encoding)
1405
1410
        try:
1406
1411
            existing_pending_merges = tree.get_parent_ids()[1:]
1407
1412
            last_rev = _mod_revision.ensure_null(tree.last_revision())
1411
1416
                if master is None or last_rev == _mod_revision.ensure_null(
1412
1417
                    master.last_revision()):
1413
1418
                    revno = tree.branch.revision_id_to_revno(last_rev)
1414
 
                    note("Tree is up to date at revision %d." % (revno,))
 
1419
                    note('Tree is up to date at revision %d of branch %s'
 
1420
                         % (revno, branch_location))
1415
1421
                    return 0
1416
1422
            view_info = _get_view_info_for_change_reporter(tree)
1417
1423
            conflicts = tree.update(
1419
1425
                view_info=view_info), possible_transports=possible_transports)
1420
1426
            revno = tree.branch.revision_id_to_revno(
1421
1427
                _mod_revision.ensure_null(tree.last_revision()))
1422
 
            note('Updated to revision %d.' % (revno,))
 
1428
            note('Updated to revision %d of branch %s' %
 
1429
                 (revno, branch_location))
1423
1430
            if tree.get_parent_ids()[1:] != existing_pending_merges:
1424
1431
                note('Your local commits will now show as pending merges with '
1425
1432
                     "'bzr status', and can be committed with 'bzr commit'.")