From 4ee1b33812e3eb9f43406601245b8bc6aa2ed632 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 23 Aug 2012 10:38:14 -0400 Subject: [PATCH] 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). ... --- libbe/storage/vcs/hg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] -- 2.26.2