~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 01:31:32 UTC
  • mto: (1185.50.4 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1519.
  • Revision ID: john@arbash-meinel.com-20051201013132-76797e2be4758e1c
Adding tests for remote sftp branches without working trees, plus a bugfix to allow push to still work with a warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
848
848
        old_revision = self.last_revision()
849
849
        new_revision = rev_history[-1]
850
850
        self.put_controlfile('revision-history', '\n'.join(rev_history))
851
 
        self.working_tree().set_last_revision(new_revision, old_revision)
 
851
        try:
 
852
            self.working_tree().set_last_revision(new_revision, old_revision)
 
853
        except NoWorkingTree:
 
854
            mutter('Unable to set_last_revision without a working tree.')
852
855
 
853
856
    def has_revision(self, revision_id):
854
857
        """See Branch.has_revision."""
1002
1005
            xml = self.working_tree().read_basis_inventory(revision_id)
1003
1006
            inv = bzrlib.xml5.serializer_v5.read_inventory_from_string(xml)
1004
1007
            return RevisionTree(self.weave_store, inv, revision_id)
1005
 
        except (IndexError, NoSuchFile), e:
 
1008
        except (IndexError, NoSuchFile, NoWorkingTree), e:
1006
1009
            return self.revision_tree(self.last_revision())
1007
1010
 
1008
1011
    def working_tree(self):