Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 24692:144883a8d0d4
util: add removedirs as platform depending function
According to fa901423ac23 introducing "windows._removedirs()":
If a hg repository including working directory is a reparse point
(directory symlinked or a junction point), then using
os.removedirs will remove the reparse point erroneously.
"windows._removedirs()" should be used instead of "os.removedirs()" on
Windows.
This patch adds "removedirs" as platform depending function to replace
"os.removedirs()" invocations for portability and safety
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 11 Apr 2015 00:47:09 +0900 |
parents | 21e1ece30f8c |
children | 986a5c23b1c1 |
comparison
equal
deleted
inserted
replaced
24691:def1145cec2d | 24692:144883a8d0d4 |
---|---|
57 popen = platform.popen | 57 popen = platform.popen |
58 posixfile = platform.posixfile | 58 posixfile = platform.posixfile |
59 quotecommand = platform.quotecommand | 59 quotecommand = platform.quotecommand |
60 readpipe = platform.readpipe | 60 readpipe = platform.readpipe |
61 rename = platform.rename | 61 rename = platform.rename |
62 removedirs = platform.removedirs | |
62 samedevice = platform.samedevice | 63 samedevice = platform.samedevice |
63 samefile = platform.samefile | 64 samefile = platform.samefile |
64 samestat = platform.samestat | 65 samestat = platform.samestat |
65 setbinary = platform.setbinary | 66 setbinary = platform.setbinary |
66 setflags = platform.setflags | 67 setflags = platform.setflags |