~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: Robert Collins
  • Date: 2005-08-23 06:52:09 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050823065209-81cd5962c401751b
move io redirection into each test case from the global runner

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
                        fpos = os.lseek(fn, 0,0)
199
199
                        os.lseek(fn, 0,0)
200
200
 
201
 
                    if flags & self.LOCK_SH:
202
 
                        if flags & self.LOCK_NB:
 
201
                    if flags & _msvc_FileLock.LOCK_SH:
 
202
                        if flags & _msvc_FileLock.LOCK_NB:
203
203
                            lock_mode = msvcrt.LK_NBLCK
204
204
                        else:
205
205
                            lock_mode = msvcrt.LK_LOCK
206
 
                    elif flags & self.LOCK_EX:
207
 
                        if flags & self.LOCK_NB:
 
206
                    elif flags & _msvc_FileLock.LOCK_EX:
 
207
                        if flags & _msvc_FileLock.LOCK_NB:
208
208
                            lock_mode = msvcrt.LK_NBRLCK
209
209
                        else:
210
210
                            lock_mode = msvcrt.LK_RLCK