~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Martin Pool
  • Date: 2007-03-06 12:13:06 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: mbp@sourcefrog.net-20070306121306-n387xz1h5aguv1he
Prohibit dirstate from getting entries called ..

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
                basename = norm_name
354
354
            else:
355
355
                raise errors.InvalidNormalization(path)
 
356
        # you should never have files called . or ..; just add the directory
 
357
        # in the parent, or according to the special treatment for the root
 
358
        if basename == '.' or basename == '..':
 
359
            raise errors.InvalidEntryName(path)
356
360
        # now that we've normalised, we need the correct utf8 path and 
357
361
        # dirname and basename elements. This single encode and split should be
358
362
        # faster than three separate encodes.