~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_interrepository/test_interrepository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    )
33
33
 
34
34
 
35
 
def check_old_format_lock_error(repository_format):
36
 
    """Potentially ignore LockError on old formats.
37
 
 
38
 
    On win32, with the old OS locks, we get a failure of double-lock when
39
 
    we open a object in 2 objects and try to lock both.
40
 
 
41
 
    On new formats, LockError would be invalid, but for old formats
42
 
    this was not supported on Win32.
43
 
    """
44
 
    if sys.platform != 'win32':
45
 
        raise
46
 
 
47
 
    description = repository_format.get_format_description()
48
 
    if description in ("Repository format 4",
49
 
                       "Weave repository format 5",
50
 
                       "Weave repository format 6"):
51
 
        # jam 20060701
52
 
        # win32 OS locks are not re-entrant. So one process cannot
53
 
        # open the same repository twice and lock them both.
54
 
        raise TestSkipped('%s on win32 cannot open the same'
55
 
                          ' repository twice in different objects'
56
 
                          % description)
57
 
    raise
58
 
 
59
 
 
60
35
def check_repo_format_for_funky_id_on_win32(repo):
61
36
    if not repo._format.supports_funky_characters and sys.platform == 'win32':
62
37
        raise TestSkipped("funky chars not allowed on this platform in repository"