Changeset 747:3469bb236ef4 in hatta-dev
- Timestamp:
- 01/24/10 15:36:26 (2 years ago)
- Branch:
- default
- Files:
-
- 2 edited
-
hatta.py (modified) (4 diffs)
-
tests/test_repo.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hatta.py
r746 r747 686 686 687 687 def _title_to_file(self, title): 688 """Modified escaping to allowslashes and spaces."""688 """Modified escaping allowing (some) slashes and spaces.""" 689 689 690 690 title = unicode(title).strip() … … 696 696 697 697 def save_file(self, title, file_name, author=u'', comment=u'', parent=None): 698 """Make the subdirectories if needed.""" 698 """ 699 Save the file and make the subdirectories if needed. 700 """ 699 701 700 702 file_path = self._file_path(title) … … 709 711 710 712 def delete_page(self, title, author=u'', comment=u''): 713 """ 714 Remove empty directories after deleting a page. 715 716 Note that Mercurial doesn't track directories, so we don't have to 717 commit after removing empty directories. 718 """ 719 711 720 super(WikiSubdirectoryStorage, self).delete_page(title, author, comment) 712 721 file_path = self._file_path(title) … … 714 723 dir_path = os.path.dirname(file_path) 715 724 os.removedirs(dir_path) 725 716 726 717 727 class WikiParser(object): -
tests/test_repo.py
r746 r747 80 80 81 81 def test_title_to_file(self, subdir_repo): 82 """ 83 Test the modified filename escpaing. 84 """ 85 82 86 for title, filename in self.title_encodings.iteritems(): 83 87 escaped = subdir_repo._title_to_file(title) … … 97 101 98 102 def test_subdirectory_delete(self, subdir_repo): 103 """ 104 Check if empty subdirectories are removed on page delete. 105 """ 106 99 107 title = u'foo/bar' 100 108 filepath = os.path.join(subdir_repo.path, 'foo/bar')
Note: See TracChangeset
for help on using the changeset viewer.
