From: W. Trevor King Date: Thu, 23 Aug 2012 14:38:14 +0000 (-0400) Subject: storage:vcs:hg: remove grandchildren from Hg._vcs_listdir. X-Git-Tag: 1.1.0~139 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4ee1b33812e3eb9f43406601245b8bc6aa2ed632;p=be.git 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). ... --- 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]