~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Vincent Ladeuil
  • Date: 2009-04-16 14:13:57 UTC
  • mto: (4331.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4332.
  • Revision ID: v.ladeuil+lp@free.fr-20090416141357-dowo6huqi1232fgm
Far too many modifications for a single commit, need to restart.

* bzrlib/tests/workingtree_implementations/test_parents.py:
(TestSetParents.test_unicode_symlink): Add more checks for
involved trees.

* bzrlib/tests/tree_implementations/test_get_symlink_target.py:
(TestGetSymlinkTarget.test_get_unicode_symlink_target): Bah, no
need to test unicode file-ids here.

* bzrlib/tests/test_transform.py:
(TestBuildTree.test_case_insensitive_build_tree_inventory): Fix
the test condition for good.

* bzrlib/tests/test_shelf.py:
Fix imports.
(TestPrepareShelf._test_shelve_symlink_target_change): Factored
out.
(TestPrepareShelf.test_shelve_symlink_target_change)
(TestPrepareShelf.test_shelve_unicode_symlink_target_change): Also
test unicode symlinks.

* bzrlib/tests/test_bundle.py:
(BundleTester._test_symlink_bundle): Factored out.
(BundleTester.test_symlink_bundle,
BundleTester.test_unicode_symlink_bundle): Also test unicode
symlinks.

* bzrlib/tests/test__dirstate_helpers.py:
Fix some imports.
(load_tests): Start parametrizing against DirReaders.

* bzrlib/merge_directive.py:
(MergeDirectiveFormatRegistry): Add Aaron explanation for the
double registration.

* bzrlib/hashcache.py:
(HashCache.get_sha1): Instrumented for pronto.

* bzrlib/revisiontree.py:
(RevisionTree.get_symlink_target): Add comment.

* bzrlib/osutils.py:
(_walkdirs_utf8, UnicodeDirReader.read_dir): Intrumented for pronto.

* bzrlib/dirstate.py:
(DirState._read_link): Intrumented for pronto.

* bzrlib/tests/per_repository/test_commit_builder.py:
(TestCommitBuilder._add_commit_change_check_changed): Add a
file_id optional parameter.
(TestCommitBuilder._test_last_mod_rev_after_content_link_changes_ric):
Factored out.
(TestCommitBuilder.test_last_modified_rev_after_content_link_changes_ric,
TestCommitBuilder.test_last_modified_rev_after_content_unicode_link_changes_ric):
Also test unicode symlinks.

* bzrlib/tests/branch_implementations/test_sprout.py:
(TestSprout.test_sprout_with_unicode_symlink): Use an unicode name
for the link too. Add more checks for involved trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1637
1637
        #       higher level, because there either won't be anything on disk,
1638
1638
        #       or the thing on disk will be a file.
1639
1639
        fs_encoding = osutils._fs_enc
 
1640
        import pronto; pronto.bzr_test('dirstate._read_link(%r)' % abspath)
1640
1641
        if isinstance(abspath, unicode):
1641
1642
            # abspath is defined as the path to pass to lstat. readlink is
1642
1643
            # buggy in python < 2.6 (it doesn't encode unicode path into FS
1647
1648
        if fs_encoding not in ('UTF-8', 'US-ASCII', 'ANSI_X3.4-1968'):
1648
1649
            # Change encoding if needed
1649
1650
            target = target.decode(fs_encoding).encode('UTF-8')
 
1651
        pronto.bzr_test('dirstate._read_link() -> %r' % target)
1650
1652
        return target
1651
1653
 
1652
1654
    def get_ghosts(self):