convert: remove incorrect and unused handling of removed svn directories
Since it was introduced in
f0c58fd4b798, tidy_dirs has been comparing
the result of os.listdir with a string - which never can be true.
Convert apparently works anyway and there is no test coverage of it.
It also seems like it could make a bigger difference on older svn versions but
is less relevant with more recent versions.
Instead of trying to fix the code, we take the low risk option and remove it.
--- a/hgext/convert/subversion.py Tue Aug 26 22:03:32 2014 +0200
+++ b/hgext/convert/subversion.py Tue Aug 26 22:03:32 2014 +0200
@@ -1211,16 +1211,6 @@
self.xargs(files, 'add', quiet=True)
return files
- def tidy_dirs(self, names):
- deleted = []
- for d in sorted(self.dirs_of(names), reverse=True):
- wd = self.wjoin(d)
- if os.listdir(wd) == '.svn':
- self.run0('delete', d)
- self.manifest.remove(d)
- deleted.append(d)
- return deleted
-
def addchild(self, parent, child):
self.childmap[parent] = child
@@ -1258,7 +1248,6 @@
self.manifest.remove(f)
self.delete = []
entries.update(self.add_files(files.difference(entries)))
- entries.update(self.tidy_dirs(entries))
if self.delexec:
self.xargs(self.delexec, 'propdel', 'svn:executable')
self.delexec = []