Mercurial > hgsubversion
comparison util.py @ 19:1267b1944cd7
Killed some dead code found by test coverage.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Wed, 08 Oct 2008 16:44:05 -0500 |
| parents | f2636cfed115 |
| children | 50d55c3e0d85 |
comparison
equal
deleted
inserted
replaced
| 18:f4c751037a4a | 19:1267b1944cd7 |
|---|---|
| 16 f = os.path.join(hg_wc_path, f) | 16 f = os.path.join(hg_wc_path, f) |
| 17 if os.path.isdir(f): | 17 if os.path.isdir(f): |
| 18 shutil.rmtree(f) | 18 shutil.rmtree(f) |
| 19 else: | 19 else: |
| 20 os.remove(f) | 20 os.remove(f) |
| 21 | |
| 22 | |
| 23 def remove_all_files_with_status(path, rev_paths, strip_path, status): | |
| 24 for p in rev_paths: | |
| 25 if rev_paths[p].action == status: | |
| 26 if p.startswith(strip_path): | |
| 27 fi = p[len(strip_path)+1:] | |
| 28 if len(fi) > 0: | |
| 29 fi = os.path.join(path, fi) | |
| 30 if os.path.isfile(fi): | |
| 31 os.remove(fi) | |
| 32 print 'D %s' % fi | |
| 33 elif os.path.isdir(fi): | |
| 34 shutil.rmtree(fi) | |
| 35 print 'D %s' % fi |
