-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kreu historion por listo de artikoloj samtempe por ŝapri tempon, alio…
…kaze ĉe multaj artikoloj eksplodus la tempo: 100min por 100 dosieroj anst. 2min
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# ni supozas, ke ni estas revo-fonto/revo, t.e. en la | ||
# dosierujo kie enestas la XML-dosieroj, do ili donitaj | ||
# kiel argumentoj ($@) ne havas padon kiel prefikso! | ||
|
||
# ĉiuj eroj de la historio | ||
commits="HEAD" | ||
|
||
# https://gist.github.com/rhochreiter/4666858 | ||
revlist=$(git rev-list $commits -- $@) | ||
( | ||
echo '<?xml version="1.0" encoding="UTF-8"?>' | ||
echo '<changelog>' | ||
for rev in $revlist | ||
do | ||
# malnova git 1.8 ne subtenas: --date=format:'%Y-%m-%d %H:%M' | ||
echo "$(git log -1 --date=short --pretty=format:"<entry revision=\"%h\">%n<date>%ad</date>%n<msg><![CDATA[%s]]></msg>%n" $rev)" | ||
files=$(git log -1 --pretty="format:" --name-only $rev) | ||
#echo '<paths>' | ||
for file in $files | ||
do | ||
filename=${file#"revo/"} | ||
# konsideru nur dosierojn donitajn kiel argumento kaj | ||
# ignoru aliajn samtempe ŝanĝitajn | ||
if [[ " $@ " =~ " ${filename} " ]]; then | ||
echo "<file><name>$filename</name></file>" | ||
fi | ||
done | ||
#echo '</paths>' | ||
echo '</entry>' | ||
done | ||
echo '</changelog>' | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters