Comment 2 for bug 412244

Revision history for this message
Robert Collins (lifeless) wrote : Re: unlock fails to unlock over FTP with Windows FTP server (Microsoft FTP Service IIS6)

modified unlock method in lockdir for debugging

            # gotta own it to unlock
            self.confirm()
            print "waiting two seconds"
            time.sleep(2)
            for pos in range(10):
                try:
                    if pos:
                        self.confirm()
                except LockBroken:
                    print "pre-rename missing lock ", i
                    break
                except Exception, e:
                    print "pre-rename fail: ", e
                    raise
                try:
                    self.transport.rename(self._held_dir, tmpname)
                except Exception, e:
                    print "fail: ", e
                    raise
                time.sleep(1)
                try:
                    self.confirm()
                except LockBroken:
                    print "rename-to-unlock successful"
                    break
                except Exception, e:
                    print "confirm fail: ", e
                    raise
                else:
                    print "ftp breakage"
            print "past unlock step"
            self._lock_held = False
            self.transport.delete(tmpname + self.__INFO_NAME)