~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: 2006-09-09 18:02:00 UTC
  • mfrom: (1963.2.7 bzr.dev.no_has_key)
  • Revision ID: pqm@pqm.ubuntu.com-20060909180200-96e41112dff213f3
(robey) remove hasattr and == None in favor of getattr() and is None

Show diffs side-by-side

added added

removed removed

Lines of Context:
1002
1002
        if not self.has_filename(to_name):
1003
1003
            raise BzrError("destination %r not in working directory" % to_abs)
1004
1004
        to_dir_id = inv.path2id(to_name)
1005
 
        if to_dir_id == None and to_name != '':
 
1005
        if to_dir_id is None and to_name != '':
1006
1006
            raise BzrError("destination %r is not a versioned directory" % to_name)
1007
1007
        to_dir_ie = inv[to_dir_id]
1008
1008
        if to_dir_ie.kind != 'directory':
1014
1014
            if not self.has_filename(f):
1015
1015
                raise BzrError("%r does not exist in working tree" % f)
1016
1016
            f_id = inv.path2id(f)
1017
 
            if f_id == None:
 
1017
            if f_id is None:
1018
1018
                raise BzrError("%r is not versioned" % f)
1019
1019
            name_tail = splitpath(f)[-1]
1020
1020
            dest_path = pathjoin(to_name, name_tail)
1059
1059
            raise BzrError("can't rename: new working file %r already exists" % to_rel)
1060
1060
 
1061
1061
        file_id = inv.path2id(from_rel)
1062
 
        if file_id == None:
 
1062
        if file_id is None:
1063
1063
            raise BzrError("can't rename: old name %r is not versioned" % from_rel)
1064
1064
 
1065
1065
        entry = inv[file_id]
1071
1071
 
1072
1072
        to_dir, to_tail = os.path.split(to_rel)
1073
1073
        to_dir_id = inv.path2id(to_dir)
1074
 
        if to_dir_id == None and to_dir != '':
 
1074
        if to_dir_id is None and to_dir != '':
1075
1075
            raise BzrError("can't determine destination directory id for %r" % to_dir)
1076
1076
 
1077
1077
        mutter("rename_one:")
1286
1286
        """Yield list of PATH, IGNORE_PATTERN"""
1287
1287
        for subp in self.extras():
1288
1288
            pat = self.is_ignored(subp)
1289
 
            if pat != None:
 
1289
            if pat is not None:
1290
1290
                yield subp, pat
1291
1291
 
1292
1292
    def get_ignore_list(self):