--- a/mercurial/windows.py Thu Oct 08 01:17:48 2009 -0500
+++ b/mercurial/windows.py Sun Oct 11 13:54:19 2009 -0500
@@ -267,7 +267,7 @@
head, tail = os.path.split(head)
while head and tail:
try:
- if osutil.listdir(name):
+ if osutil.listdir(head):
return
os.rmdir(head)
except: