annotate scripts/hg-audit.sh @ 330:70ea30cbe883

update locking strat for git specific gradle script.
author Marc Davis <davis@ssdt-ohio.org>
date Fri, 03 Mar 2023 22:02:56 -0500
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