summaryrefslogtreecommitdiff
path: root/support/vc/hg-windows/vc.bat
blob: affb891d2562c49c020e03bb64db4fdbff141c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
)