~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-25 04:20:12 UTC
  • mfrom: (3468.3.4 controlfiles)
  • Revision ID: pqm@pqm.ubuntu.com-20090325042012-23a6pm0mraw7g2kg
(mbp) better CountedLock handling of tokens,
        and bzrdir takes more responsibility for default file modes

Show diffs side-by-side

added added

removed removed

Lines of Context:
766
766
    def _set_merges_from_parent_ids(self, parent_ids):
767
767
        merges = parent_ids[1:]
768
768
        self._transport.put_bytes('pending-merges', '\n'.join(merges),
769
 
            mode=self._control_files._file_mode)
 
769
            mode=self.bzrdir._get_file_mode())
770
770
 
771
771
    def _filter_parent_ids_by_ancestry(self, revision_ids):
772
772
        """Check that all merged revisions are proper 'heads'.
872
872
        self._must_be_locked()
873
873
        my_file = rio_file(stanzas, header)
874
874
        self._transport.put_file(filename, my_file,
875
 
            mode=self._control_files._file_mode)
 
875
            mode=self.bzrdir._get_file_mode())
876
876
 
877
877
    @needs_write_lock # because merge pulls data into the branch.
878
878
    def merge_from_branch(self, branch, to_revision=None, from_revision=None,
1104
1104
        self._serialize(self._inventory, sio)
1105
1105
        sio.seek(0)
1106
1106
        self._transport.put_file('inventory', sio,
1107
 
            mode=self._control_files._file_mode)
 
1107
            mode=self.bzrdir._get_file_mode())
1108
1108
        self._inventory_is_modified = False
1109
1109
 
1110
1110
    def _kind(self, relpath):
1827
1827
        path = self._basis_inventory_name()
1828
1828
        sio = StringIO(xml)
1829
1829
        self._transport.put_file(path, sio,
1830
 
            mode=self._control_files._file_mode)
 
1830
            mode=self.bzrdir._get_file_mode())
1831
1831
 
1832
1832
    def _create_basis_xml_from_inventory(self, revision_id, inventory):
1833
1833
        """Create the text that will be saved in basis-inventory"""
2623
2623
            return False
2624
2624
        else:
2625
2625
            self._transport.put_bytes('last-revision', revision_id,
2626
 
                mode=self._control_files._file_mode)
 
2626
                mode=self.bzrdir._get_file_mode())
2627
2627
            return True
2628
2628
 
2629
2629
    @needs_tree_write_lock
2904
2904
        control_files.create_lock()
2905
2905
        control_files.lock_write()
2906
2906
        transport.put_bytes('format', self.get_format_string(),
2907
 
            mode=control_files._file_mode)
 
2907
            mode=a_bzrdir._get_file_mode())
2908
2908
        if from_branch is not None:
2909
2909
            branch = from_branch
2910
2910
        else: