[Kde-games-devel] Rule Writing
Wolfgang Rohdewald
wolfgang at rohdewald.de
Sat Mar 10 23:31:06 UTC 2012
Am Samstag, 10. März 2012, 11:40:29 schrieb Parker Coates:
> On Fri, Mar 9, 2012 at 17:23, Wolfgang Rohdewald wrote:
> > Am Donnerstag, 2. Februar 2012, 13:59:12 schrieb Wolfgang Rohdewald:
> > please note that kapman shows commits for branching like
> > "Branch for KDE 4.8" in r1269583. Those commits hold no changes.
> >
> > kajongg and libkmahjongg don't have such commits. I compared
> > with okular, kdelibs and akonadi and they don't have such commits
> > either.
> >
> > I also looked at granatier which has the same empty branching
> > commits so I suppose other games have them too.
>
> I was having the same issue last night. It looks even worse for
> temporary work branches that just get merged back into master after a
> commit or two.
the reason is that you probably only executed svn2git. Some postprocessing
is needed. Like - see below. For the games I am working on (kajongg,
libkmahjongg, kmahjongg) I wrote a conversion script. It first does svn2git,
then makes a backup of the new git repo and calls a separate postprocessing
script. This one will copy the backup and work on that. Just want to be sure
I do not forget to do things... And I now can re-execute postprocessing
without having to svn2git again
You probably do not need parent-adder because the games you worked on
are not that old - svn got better merging capabilities around 2008.
fix-tags fixes those empty tagging commits, it makes the tags
point to real commits, going up the parent chain.
I just tried that with granatier, and it now becomes much clearer
what is wrong there: The tags v4.7.80 up to v4.8.0 all point to
master/trunk commits while they should point to KDE/4.8 branch
commits. But I don't know that much about subversion - could
somebody please check if this is already wrong in svn or a bug
in svn2git?
cd $REPO
bindir="${RULESETDIR:?\$RULESETDIR must point to the kde-ruleset
directory}/bin"
source "$bindir/filter-goodies"
echo 'parent-adder...'
$bindir/parent-adder $RULESETDIR/kdegames/$REPO-parentmap
echo 'delete_fb_backups...'
delete_fb_backups
echo 'fix-tags...'
$bindir/fix-tags
I just wrote a little helper which adds a tag to every single commit,
its name being the svn revision. Quite helpful for visual debugging
with gitk --all
# add a tag to every commit, name=svn revision
# ignores empty tagging commits (those removed by fix-tags)
add_revision_tags() {
branches=$(git branch -a | grep -v HEAD | sed 's/ //g' | sed 's/^*//')
git log --pretty=%h $branches | while read commit
do
git tag r$(git show --pretty='%b' $commit | grep 'svn path=' |
sed 's/.*revision=//') $commit
done
}
--
Wolfgang
More information about the kde-games-devel
mailing list