Skip to content

Commit

Permalink
Fixed problem with Hg backend not displaying files and directories
Browse files Browse the repository at this point in the history
inside another directory when the path does not end with a slash.
  • Loading branch information
clsdaniel committed Jul 27, 2009
1 parent 6aede12 commit eb8e8d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyvcs/backends/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def list_directory(self, path, revision=None):
Returns a list of files in a directory (list of strings) at a given
revision, or HEAD if revision is None.
"""
# Add an ending slash to path, otherwise the file
# names start with it, also it does not list files
# inside another folder
if path and path[-1] != os.path.sep:
path += os.path.sep

chgctx = self.repo.changectx(revision or 'tip')
file_list = []
folder_list = set()
Expand Down

0 comments on commit eb8e8d2

Please sign in to comment.