annotate scripts/hg-audit.sh @ 287:b19757184b5e

SSED-1600: Created artifactory70.gradle which has a getter for internal property isFeature (required for Gradle 7+)
author Kyle Miller <kyle.miller@mcoecn.org>
date Tue, 19 Jul 2022 14:50:34 +0100
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