aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-08-23 10:38:14 -0400
committerW. Trevor King <wking@tremily.us>2012-08-23 10:38:14 -0400
commit4ee1b33812e3eb9f43406601245b8bc6aa2ed632 (patch)
tree5dabe01d1c23e3a8c5cb0e0ae06811eb850d10ab /libbe/storage
parent89c608d8e3c5ac48b84057b30614ded4f0183c43 (diff)
downloadbugseverywhere-4ee1b33812e3eb9f43406601245b8bc6aa2ed632.tar.gz
storage:vcs:hg: remove grandchildren from Hg._vcs_listdir.
This fixes: From: Phil Schumm Date: Thu, 23 Aug 2012 08:15:21 -0500 Subject: [Be-devel] -be diff- under Hg ... I've just noticed that -be diff- seems to yield different output under Git than it does under Hg (e.g., in a Mercurial +repository, -be diff- appears to show all changes as new bugs rather than modified). ...
Diffstat (limited to 'libbe/storage')
-rw-r--r--libbe/storage/vcs/hg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbe/storage/vcs/hg.py b/libbe/storage/vcs/hg.py
index ce7cc90..2f4469d 100644
--- a/libbe/storage/vcs/hg.py
+++ b/libbe/storage/vcs/hg.py
@@ -152,7 +152,10 @@ class Hg(base.VCS):
output = self._u_invoke_client('manifest', '--rev', revision)
files = output.splitlines()
path = path.rstrip(os.path.sep) + os.path.sep
- return [self._u_rel_path(f, path) for f in files if f.startswith(path)]
+ descendent_files = [self._u_rel_path(f, path) for f in files
+ if f.startswith(path)]
+ return sorted(set(
+ f.split(os.path.sep, 1)[0] for f in descendent_files))
def _vcs_commit(self, commitfile, allow_empty=False):
args = ['commit', '--logfile', commitfile]