This is mostly for Mircea :-) but in case others are interested.
This link describes the mechanics of taking the patch into you git repo:
http://sipx-wiki.calivia.com/index.php/Mirroring_sipXecs_subversion_repository_with_git#Accepting_patches_sent_by_other_developers
I attached a few helpers I use to take patches (you need to source the
attached file in your .bashrc)
I start by creating a branch based on 4.0 (tracks svn/4.0) branch:
git co -b take-this-patch-branch 4.0
I usually just copy patch URL from JIRA and run:
gjira-apply <patch-url>
At this point (unless you are well versed in git reflogs) it's a good idea
to tag the HEAD. You'll be doing crazy things like editing history. As long
as you have this tag it's easy to get back here without losing anything.
git tag good
If I have more than one patch for an issue I keep them as separate commits
only if I think that history is useful. IOW: if patch series is carefully
constructed. But if I see that it's just an initial patch + fixes I squash
them to keep history clean.
git rebase -i 4.0
Displays history editor: replace pick with s(quash) for patches that you
want squashed.
Every sipXconfig commit has to have proper comment:
http://sipx-wiki.calivia.com/index.php/SipX_ConfigServer_Contributing#Commit_comments
If the patch does not have the proper comments it needs to be fixed by running:
git commit --amend # editor will let you change commit comment now
And since committing to subversion will wipe our git information about the
patch author we need to add a 'thank you' comment.
There is a tool (check sipXconfig/meta/fix-commit-msg) to do that. You need
to be in root repo directory to use it.
fix-commit-msg "FirstName LastName" 4.0..
Once I commit to subversion it's time to mark the issue as fixed. Run:
gsl -1
To display the comment that can be pasted into JIRA.
D.
# git helpers for sipXconfig developers
# if you have non-git patch run this
jira-apply() {
curl $1 | git apply -p0 --whitespace=strip
}
# if you have git patch run this
gjira-apply() {
curl $1 | git am -3 --whitespace=strip
}
# used to generate jira links in 'git-svn-log'
jira-links-filter() {
sed -e
's/^r\([0-9][0-9]*\).*/http:\/\/sipxecs.sipfoundry.org\/ViewVC\/sipXecs?view=rev\&rev=\1/'
}
# use gsl -3 to display last 3 commits
gsl() {
git svn log $1 --reverse | jira-links-filter
}
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev