pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

hg-package.mk: add a "hg-cleandir" target to remove all checkouts and state



Module Name:	pkgsrc-wip
Committed By:	Martin Husemann <martin%NetBSD.org@localhost>
Pushed By:	martin
Date:		Mon Feb 1 21:20:25 2016 +0100
Changeset:	16bbd88bd3a17945761e132d70d65bcd9ca039bb

Modified Files:
	mk/hg-package.mk

Log Message:
hg-package.mk: add a "hg-cleandir" target to remove all checkouts and state

This is very much like "cleandir" but keeps the hg clones intact (plus
a few hidden .* files probably nobody cares about).

This is usefull with huge hg repos when testing/veryfing patches.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=16bbd88bd3a17945761e132d70d65bcd9ca039bb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mk/hg-package.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diffs:
diff --git a/mk/hg-package.mk b/mk/hg-package.mk
index ba91932..05f5e62 100644
--- a/mk/hg-package.mk
+++ b/mk/hg-package.mk
@@ -136,6 +136,16 @@ _HG_CREATE_CACHE.${repo}=	\
 	pax -w ${HG_MODULE.${repo}:Q} | gzip > ${HG_DISTDIR}/${_HG_DISTFILE.${repo}:Q}
 .endfor
 
+.PHONY: hg-cleandir
+hg-cleandir:
+.for _repo_ in ${HG_REPOSITORIES}
+	${RUN} cd ${WRKDIR};						\
+	if [ -d ${HG_MODULE.${_repo_}:Q} ]; then			\
+		cd ${HG_MODULE.${_repo_}:Q} && rm -rf *;		\
+	fi
+.endfor
+	${RUN} cd ${WRKDIR} && rm -f .*_done
+
 pre-extract: do-hg-extract
 
 .PHONY: do-hg-extract


Home | Main Index | Thread Index | Old Index