~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Martin Pool
  • Date: 2007-10-08 05:07:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2895.
  • Revision ID: mbp@sourcefrog.net-20071008050725-3173pzumaffwqzcc
Restore deprecated behaviour of accepting None for WorkingTree.set_root_id  (thanks igc)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1952
1952
    @needs_tree_write_lock
1953
1953
    def set_root_id(self, file_id):
1954
1954
        """Set the root id for this tree."""
 
1955
        # for compatability 
 
1956
        if file_id is None:
 
1957
            symbol_versioning.warn(symbol_versioning.zero_twelve
 
1958
                % 'WorkingTree.set_root_id with fileid=None',
 
1959
                DeprecationWarning,
 
1960
                stacklevel=3)
 
1961
            file_id = ROOT_ID
 
1962
        else:
 
1963
            file_id = osutils.safe_file_id(file_id)
1955
1964
        self._set_root_id(file_id)
1956
1965
 
1957
1966
    def _set_root_id(self, file_id):