Improved Mercurial hook to check only files that are part of the changeset
authorIván Perdomo <ivan.perdomo@openbravo.com>
Fri, 29 Jul 2011 16:51:04 +0200
changeset 13351 ed0b8ba5a684
parent 13350 540b30e15ffa
child 13352 6c17f2c86473
child 13357 cf2afed6e8ef
Improved Mercurial hook to check only files that are part of the changeset
modules/org.openbravo.client.kernel/jslint/jscheck-hg
--- a/modules/org.openbravo.client.kernel/jslint/jscheck-hg	Fri Jul 29 14:05:01 2011 +0200
+++ b/modules/org.openbravo.client.kernel/jslint/jscheck-hg	Fri Jul 29 16:51:04 2011 +0200
@@ -1,3 +1,5 @@
 #!/bin/sh
+
+# Mercurial pretxncommit hook
 echo "Performing jslint check on modified js resources"
-hg st -man  | awk '/.js$/ && ! /^web/' | xargs -rn1 ./modules/org.openbravo.client.kernel/jslint/jslint || exit 1
+hg log -r $HG_NODE --template '{files}'  | awk '/.js$/ && ! /^web/' | xargs -rn1 ./modules/org.openbravo.client.kernel/jslint/jslint || exit 1