annotate scripts/hg-audit.sh @ 336:6258c89efe9e

add a new init70 for github actions
author marc_davis <davis@ssdt-ohio.org>
date Tue, 30 May 2023 12:54:59 -0400
parents 40316e0cdef2
children
rev   line source
213
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
1 /**
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
2 Creates abbreivated changeset log report of all HG repos under the current directory.
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
3 Adjust the date before executing.
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
4 */
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
5
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
6
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
7 template = "{date|isodate}\\t{rev}:{node|short}\\t{author|user}\\t{desc|firstline}\\t{files}\\n"
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
8
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
9 cmd = 'log -d">2015-04-01" --template "' + template + '"'
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
10 new File(".").eachDirRecurse { d ->
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
11
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
12 if ( new File(d,".hg").exists() ) {
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
13 def out = new File("${d.name}-changesets.txt")
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
14 out.delete()
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
15 out << "$d.name: $cmd \n-----------------------------------"
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
16 out << "hg -R ${d.absolutePath} ${cmd}".execute().text
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
17
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
18 }
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
19 }
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
20 // hg log -l 10 --template "{date|isodate}\t{rev}:{node|short}\t{author}\t{desc}\t{files}\n"
40316e0cdef2 add hg audit report script
smith@nwoca.org
parents:
diff changeset
21