Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1426420
listRecentCommits.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
listRecentCommits.sh
View Options
#!/bin/bash -eu
# This script generates a structured git log of commits to the VisualEditor-MediaWiki repository,
# and walks the submodule updates to the lib/ve submodule and the OOjs and OOjs UI pull-through
# build commits to detail all changes since a given branch point.
# Using `git branch -a | grep wmf | sort -V` to automatically pick the latest branch version would
# be nice here, but doesn't work because Mac OS X's version of sort is too old.
# cd to the VisualEditor directory
cd
$(
cd
$(
dirname
$0
)
/..
;
pwd
)
# Ensure input is correct
if
[
-z
"
${
1
:-
}
"
]
then
echo
>
&
2
"Usage: listRecentCommits.sh <startBranch>"
exit
1
fi
STARTHASH
=
`
git
rev-parse
$1
`
if
[
"
$?
"
-ne
"0"
]
then
echo
>
&
2
"Parameter is not a valid git branch"
exit
1
fi
echo
"Listing changes since '
$1
' (hash:
$STARTHASH
)"
echo
""
LOCALCHANGES
=
`
git
log
$1
..
--oneline
--no-merges
--reverse
--color
=
never
|
egrep
--color
=
never
-v
'(translatewiki|BrowserTest)'
`
# Iterate over lines matching "Update VE core submodule"
while
read
-r
CHANGE
do
printf
"
$CHANGE
\n"
if
[[
$CHANGE
==
*
"Update VE core submodule"
*
]]
then
CHANGEHASH
=
`
cut
-f1
-d
' '
<<<
$CHANGE
`
SUBCHANGES
=
`
git
log
--format
=
%B
-n1
$CHANGEHASH
--
|
sed
-n
-e
'/New changes/,/^$/p'
|
tail
-n
+2
|
sed
-e
'$ d'
|
grep
--color
=
never
-v
'translatewiki'
`
while
read
-r
SUBCHANGE
do
printf
"\t
$SUBCHANGE
\n"
done
<<<
"
$SUBCHANGES
"
# Extra new-line between sub-module pulls for clarity
printf
"\n"
fi
done
<<<
"
$LOCALCHANGES
"
exit
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, May 16, 13:11 (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/e3/3febfac1b6a1127d8d352a2d61d5
Default Alt Text
listRecentCommits.sh (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment