summaryrefslogtreecommitdiff
path: root/support/vc/hg-windows/vc.bat
diff options
context:
space:
mode:
Diffstat (limited to 'support/vc/hg-windows/vc.bat')
-rw-r--r--support/vc/hg-windows/vc.bat25
1 files changed, 25 insertions, 0 deletions
diff --git a/support/vc/hg-windows/vc.bat b/support/vc/hg-windows/vc.bat
new file mode 100644
index 0000000000..affb891d25
--- /dev/null
+++ b/support/vc/hg-windows/vc.bat
@@ -0,0 +1,25 @@
+@echo off
+REM This is file 'vc.bat' from the vc bundle for TeX.
+REM The original file can be found at CTAN:support/vc.
+REM This file is Public Domain.
+
+setlocal
+REM Parse command line options.
+set mod=0
+:loopParams
+if "%1" NEQ "" (
+ if "%1"=="-m" (set mod=1) else (
+ echo usage: vc [-m]
+ exit /b 1
+ )
+ shift
+ goto loopParams
+)
+REM English locale.
+set LC_ALL=C
+
+hg log --pager=off -r . --template "Hash: {node}\nAbr. Hash: {node|short}\nBranch: {branch}\nParent1 Hash: {p1node}\nParent2 Hash: {p2node}\nAbr. Parent1 Hash: {p1node|short}\nAbr. Parent2 Hash: {p2node|short}\nAuthor Name: {author|user}\nAuthor Email: {author|email}\nAuthor Date: {date|isodatesec}" | gawk -v script=log -f vc-hg.awk > vc.tex
+
+if "%mod%"=="1" (
+ hg status --pager=off | gawk -v script=status -f vc-hg.awk >> vc.tex
+)