From be9a78a8445ec11ab6a9e6473bf632504988624d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 3 Feb 2014 09:03:03 +0000 Subject: [PATCH] scripts/list-source-files: Handle Mercurial subdirectories properly git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5260 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/list-source-files | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/list-source-files b/scripts/list-source-files index a14307b3b..4a2eed863 100755 --- a/scripts/list-source-files +++ b/scripts/list-source-files @@ -29,7 +29,13 @@ list_source_files() { echo "Ignored directory $1" >&2 fi elif [ -e "$r/.hg" ]; then - hg manifest + subdir="${d#${r}}" + if [ -n "${subdir}" ]; then + subdir="${subdir#/}/" + hg manifest | sed -n "s|^$subdir||p" + else + hg manifest + fi else echo "Not under source control: $1 ?" >&2 fi