~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-07-11 19:44:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: abentley@panoramicfeedback.com-20070711194451-3jqhye1nnd02a9uv
Restore original Branch.last_revision behavior, fix bits that care

Show diffs side-by-side

added added

removed removed

Lines of Context:
1011
1011
            tree.lock_tree_write()
1012
1012
        try:
1013
1013
            existing_pending_merges = tree.get_parent_ids()[1:]
1014
 
            last_rev = tree.last_revision()
1015
 
            if last_rev is None:
1016
 
                last_rev = _mod_revision.NULL_REVISION
1017
 
            if last_rev == tree.branch.last_revision():
 
1014
            last_rev = _mod_revision.ensure_null(tree.last_revision())
 
1015
            if last_rev == _mod_revision.ensure_null(
 
1016
                tree.branch.last_revision()):
1018
1017
                # may be up to date, check master too.
1019
1018
                master = tree.branch.get_master_branch()
1020
 
                if master is None or last_rev == master.last_revision():
 
1019
                if master is None or last_rev == _mod_revision.ensure_null(
 
1020
                    master.last_revision()):
1021
1021
                    revno = tree.branch.revision_id_to_revno(last_rev)
1022
1022
                    note("Tree is up to date at revision %d." % (revno,))
1023
1023
                    return 0
1024
1024
            conflicts = tree.update(delta._ChangeReporter(
1025
1025
                                        unversioned_filter=tree.is_ignored))
1026
 
            revno = tree.branch.revision_id_to_revno(tree.last_revision())
 
1026
            revno = tree.branch.revision_id_to_revno(
 
1027
                _mod_revision.ensure_null(tree.last_revision()))
1027
1028
            note('Updated to revision %d.' % (revno,))
1028
1029
            if tree.get_parent_ids()[1:] != existing_pending_merges:
1029
1030
                note('Your local commits will now show as pending merges with '