General questions from a first-patcher
Holà Koha! First to present myself, I'm a new developper on Koha. I work for inLibro, which has been a Koha proponent for a while now. All our changes, enhancements and bug fixes have been local so far, meaning we patched for each library as they needed. We got a bundle of those to contribute to the community. Fixes and enhancements. To get the hang of it, I started with three small ones (after dutifully reading the wiki, blog and asking irc questions), but I'm sure I screwed up a few things. I will appreciate _any_ and _every_ constructive comments you can make on the following: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6201 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8753 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10951 Questions: - I work with patches. I used git-bz for one, and manual for the others. Now how to I email to patch mailing list? I just copy the content? I comment it? Do I add the [PATCH] in the header or some tool could have done all that for me? (my server can't send email, so I'm not sure if git-bz should have done it) - My local branch names are bug_XXXX from the master. But I'm not sure if that must be commited. Some wiki (contribute!) only talks about sending a patch. Others (http://wiki.koha-community.org/wiki/Commit_messages) talk about it. Can you enlighten me? Long text for two questions. Sorry. But I need that clarified before I start piling up fixes :) Very best regards, Blou -- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Philippe Blouin schreef op do 26-09-2013 om 16:08 [-0400]:
First to present myself, I'm a new developper on Koha. I work for inLibro, which has been a Koha proponent for a while now.
Hello and welcome!
I will appreciate any and every constructive comments you can make on the following: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6201 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8753 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10951
They look pretty alright to me. One comment is in the format of your commit comments, go for: --------- Bug 1234 - fix the wotsit The wotsit is broken and causes sparks to come out of the monitor. This patch fixes the wotsit by screwing it in tighter. Test plan: 1) Fromble the wotsit without this patch, note your house catches on fire. 2) Apply the patch, and repeat step 1, noting that no fire engines arrive this time. But there is an ice-cream truck outside. --------- Having "Bug 1234" as the first thing allows tools like git bz to behave a bit more automagically, and the whole first line should be a succinct summary, with a blank line and more detail below. The first line should be no more than 60 or 70 characters ideally (this is because it becomes an email subject line, also forces you to make small, simple patches.)
Questions: - I work with patches. I used git-bz for one, and manual for the others. Now how to I email to patch mailing list? I just copy the content? I comment it? Do I add the [PATCH] in the header or some tool could have done all that for me? (my server can't send email, so I'm not sure if git-bz should have done it)
Git can do it. I use: git send-email --to=kpatches HEAD^ where ~/.git_aliases contains: alias kpatches koha-patches@lists.koha-community.org Git-bz is the best thing for interacting with bugzilla. It makes life substantially easier. And if you format patches like above, just do: git bz attach HEAD and it'll figure out the bug to apply it to.
- My local branch names are bug_XXXX from the master. But I'm not sure if that must be commited. Some wiki (contribute!) only talks about sending a patch. Others (http://wiki.koha-community.org/wiki/Commit_messages) talk about it. Can you enlighten me?
Patches don't include branch names, call it whatever you like. Personally, I tend to use things like: bug1234-fix-the-wotsit but that's totally personal preference. No one else will see it unless they access your repo directly, which isn't so common. Now go forth and write patches :D -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
Thanks Robin, and thanks to everyone else that took time to comment on my three bugzillas. I don't think I'm out of the wood, but I've learned a lot in the past 24h and the process was very smooth. I still have two issues: 1) git bz worked for my very first patch, but after that I only managed to use it once again. I always get some Traceback OR a huge xml/html page as an error. 2) I used git send-email as specified below, but I don't see anything generated on the list (patches). Actually, I rarely ever see anything on that list. How is it used, exactly? Thanks again! Blou On 13-09-26 07:29 PM, Robin Sheat wrote:
Philippe Blouin schreef op do 26-09-2013 om 16:08 [-0400]:
First to present myself, I'm a new developper on Koha. I work for inLibro, which has been a Koha proponent for a while now. Hello and welcome!
I will appreciate any and every constructive comments you can make on the following: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6201 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8753 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10951 They look pretty alright to me. One comment is in the format of your commit comments, go for:
--------- Bug 1234 - fix the wotsit
The wotsit is broken and causes sparks to come out of the monitor. This patch fixes the wotsit by screwing it in tighter.
Test plan: 1) Fromble the wotsit without this patch, note your house catches on fire. 2) Apply the patch, and repeat step 1, noting that no fire engines arrive this time. But there is an ice-cream truck outside. ---------
Having "Bug 1234" as the first thing allows tools like git bz to behave a bit more automagically, and the whole first line should be a succinct summary, with a blank line and more detail below. The first line should be no more than 60 or 70 characters ideally (this is because it becomes an email subject line, also forces you to make small, simple patches.)
Questions: - I work with patches. I used git-bz for one, and manual for the others. Now how to I email to patch mailing list? I just copy the content? I comment it? Do I add the [PATCH] in the header or some tool could have done all that for me? (my server can't send email, so I'm not sure if git-bz should have done it) Git can do it. I use:
git send-email --to=kpatches HEAD^
where ~/.git_aliases contains:
alias kpatches koha-patches@lists.koha-community.org
Git-bz is the best thing for interacting with bugzilla. It makes life substantially easier. And if you format patches like above, just do:
git bz attach HEAD
and it'll figure out the bug to apply it to.
- My local branch names are bug_XXXX from the master. But I'm not sure if that must be commited. Some wiki (contribute!) only talks about sending a patch. Others (http://wiki.koha-community.org/wiki/Commit_messages) talk about it. Can you enlighten me? Patches don't include branch names, call it whatever you like. Personally, I tend to use things like:
bug1234-fix-the-wotsit
but that's totally personal preference. No one else will see it unless they access your repo directly, which isn't so common.
Now go forth and write patches :D
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
op 28-09-13 06:27, Philippe Blouin schreef:
1) git bz worked for my very first patch, but after that I only managed to use it once again. I always get some Traceback OR a huge xml/html page as an error.
What're the errors that you're seeing? Also, are you using the latest version? An upgrade to bugzilla a while back caused some strange behaviour and required an update to git-bz to work.
2) I used git send-email as specified below, but I don't see anything generated on the list (patches). Actually, I rarely ever see anything on that list. How is it used, exactly?
The main conduit for patches is bugzilla, however posting them to the patches list allows anyone subscribed to that to see what's going on. As a bit of a guideline, I'll post initial patches for things there, but don't bother with updated versions or sign-offs. But what you choose to do is up to you really. As for why it's not sending, you'll probably have to have a look through your computer's configuration to figure it out. Is it set up to send email properly, for example? Is there diagnostic information in the logs? Robin.
On 2013-09-28, at 5:21 PM, Robin Sheat wrote:
op 28-09-13 06:27, Philippe Blouin schreef:
1) git bz worked for my very first patch, but after that I only managed to use it once again. I always get some Traceback OR a huge xml/html page as an error.
What're the errors that you're seeing? Also, are you using the latest version? An upgrade to bugzilla a while back caused some strange behaviour and required an update to git-bz to work.
hi again, just 2 quick points… 1/ the traceback error in git-bz is a common http timeout error. the current workaround is to just be a bit quicker! 2/ if you look closely thru that xml/html output, you can spot the actual error message from bugzilla ...this type of git-bz error is often caused by someone attempting to move a bug's status from say… NEW to PASSED-QA (you can only change a bug's status to PASSED-QA, if the bug's status has been set to SIGNED-OFF previously)
Is it possible I was getting that error because the bug state was not in Assigned anymore? I was trying to update/replace the patch. For a while I thought that was because I was using the wrong user as well, but it still didn't work when I changed. I see a lot of benefits to using git-bz instead of the manual approach, so anything that get me there is all good. Thanks a lot! Blou On 13-09-30 03:03 PM, Mason James wrote:
On 2013-09-28, at 5:21 PM, Robin Sheat wrote:
op 28-09-13 06:27, Philippe Blouin schreef:
1) git bz worked for my very first patch, but after that I only managed to use it once again. I always get some Traceback OR a huge xml/html page as an error. What're the errors that you're seeing? Also, are you using the latest version? An upgrade to bugzilla a while back caused some strange behaviour and required an update to git-bz to work. hi again, just 2 quick points…
1/ the traceback error in git-bz is a common http timeout error. the current workaround is to just be a bit quicker!
2/ if you look closely thru that xml/html output, you can spot the actual error message from bugzilla
...this type of git-bz error is often caused by someone attempting to move a bug's status from say… NEW to PASSED-QA (you can only change a bug's status to PASSED-QA, if the bug's status has been set to SIGNED-OFF previously)
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
On 2013-09-27, at 11:29 AM, Robin Sheat wrote:
Philippe Blouin schreef op do 26-09-2013 om 16:08 [-0400]:
First to present myself, I'm a new developper on Koha. I work for inLibro, which has been a Koha proponent for a while now.
Questions: - I work with patches. I used git-bz for one, and manual for the others. Now how to I email to patch mailing list? I just copy the content? I comment it? Do I add the [PATCH] in the header or some tool could have done all that for me? (my server can't send email, so I'm not sure if git-bz should have done it)
Git can do it. I use:
git send-email --to=kpatches HEAD^
where ~/.git_aliases contains:
alias kpatches koha-patches@lists.koha-community.org
Git-bz is the best thing for interacting with bugzilla. It makes life substantially easier. And if you format patches like above, just do:
git bz attach HEAD
and it'll figure out the bug to apply it to.
hi Philippe also, git-bz will email your patch(es) to the patches list, via the '--mail' arg $ git bz attach --mail 9999 HEAD (for this to work, you do need to subscribe to the list first)
Still no luck with git-bz. After entering Attach? [yn] y <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>Suspicious Action</title> /...// //a very long xml// //..../ *Failed to attach patch to bug 10986, status=200* On 13-09-30 02:38 PM, Mason James wrote:
On 2013-09-27, at 11:29 AM, Robin Sheat wrote:
Philippe Blouin schreef op do 26-09-2013 om 16:08 [-0400]:
First to present myself, I'm a new developper on Koha. I work for inLibro, which has been a Koha proponent for a while now.
Questions: - I work with patches. I used git-bz for one, and manual for the others. Now how to I email to patch mailing list? I just copy the content? I comment it? Do I add the [PATCH] in the header or some tool could have done all that for me? (my server can't send email, so I'm not sure if git-bz should have done it) Git can do it. I use:
git send-email --to=kpatches HEAD^
where ~/.git_aliases contains:
alias kpatches koha-patches@lists.koha-community.org
Git-bz is the best thing for interacting with bugzilla. It makes life substantially easier. And if you format patches like above, just do:
git bz attach HEAD
and it'll figure out the bug to apply it to.
hi Philippe
also, git-bz will email your patch(es) to the patches list, via the '--mail' arg
$ git bz attach --mail 9999 HEAD
(for this to work, you do need to subscribe to the list first)
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Philippe Blouin schreef op wo 02-10-2013 om 16:14 [-0400]:
Still no luck with git-bz. After entering
<title>Suspicious Action</title>
Can you find the bit where it says what the suspicious action is? -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
Hi Robin! I attached the response (conveniently put in a .html file for easier display). That's the whole response, minus the little non-html bits I've already given. And the maybe relevant git config stuff: user.email=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.path=/bugzilla3 bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.bz-password=XXXXXXXXXXXX bz.default-tracker=bugs.koha-community.org Thanks again, Blou On 13-10-02 07:02 PM, Robin Sheat wrote:
Philippe Blouin schreef op wo 02-10-2013 om 16:14 [-0400]:
Still no luck with git-bz. After entering <title>Suspicious Action</title> Can you find the bit where it says what the suspicious action is?
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
On Thu, Oct 3, 2013 at 9:21 AM, Philippe Blouin <philippe.blouin@inlibro.com
wrote:
Hi Robin!
I attached the response (conveniently put in a .html file for easier display). That's the whole response, minus the little non-html bits I've already given.
And the maybe relevant git config stuff: user.email=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.path=/bugzilla3 bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.bz-password=XXXXXXXXXXXX bz.default-tracker=bugs.koha-community.org
I only have this in .gitconfig [bz-tracker "bugs.koha-community.org"] path = /bugzilla3 bz-user = tomascohen@gmail.com bz-password = XXX Regards To+ -- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
I gave extra info, but once limited to .gitconfig, I have exactly the same parameters. [bz-tracker "bugs.koha-community.org"] path = /bugzilla3 bz-user = philippe.blouin@inlibro.com bz-password = "XXXXXXXX" well, beside the "" around the password. On 13-10-03 08:52 AM, Tomas Cohen Arazi wrote:
On Thu, Oct 3, 2013 at 9:21 AM, Philippe Blouin <philippe.blouin@inlibro.com <mailto:philippe.blouin@inlibro.com>> wrote:
Hi Robin!
I attached the response (conveniently put in a .html file for easier display). That's the whole response, minus the little non-html bits I've already given.
And the maybe relevant git config stuff: user.email=philippe.blouin@inlibro.com <mailto:user.email=philippe.blouin@inlibro.com> bz-tracker.bugs.koha-community.org.path=/bugzilla3 bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com <mailto:bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com> bz-tracker.bugs.koha-community.org.bz-password=XXXXXXXXXXXX bz.default-tracker=bugs.koha-community.org <http://bugs.koha-community.org>
I only have this in .gitconfig
[bz-tracker "bugs.koha-community.org <http://bugs.koha-community.org>"] path = /bugzilla3 bz-user = tomascohen@gmail.com <mailto:tomascohen@gmail.com> bz-password = XXX Regards To+
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
Philippe, That error looks to me like the one you would get if you had an old version of git-bz. Did you clone the git-bz repo on git.koha-community.org and check out the fishsoup branch? Regards, Jared On Thu, Oct 3, 2013 at 9:42 AM, Philippe Blouin <philippe.blouin@inlibro.com
wrote:
I gave extra info, but once limited to .gitconfig, I have exactly the same parameters.
[bz-tracker "bugs.koha-community.org"] path = /bugzilla3 bz-user = philippe.blouin@inlibro.com bz-password = "XXXXXXXX"
well, beside the "" around the password.
On 13-10-03 08:52 AM, Tomas Cohen Arazi wrote:
On Thu, Oct 3, 2013 at 9:21 AM, Philippe Blouin < philippe.blouin@inlibro.com> wrote:
Hi Robin!
I attached the response (conveniently put in a .html file for easier display). That's the whole response, minus the little non-html bits I've already given.
And the maybe relevant git config stuff: user.email=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.path=/bugzilla3 bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com bz-tracker.bugs.koha-community.org.bz-password=XXXXXXXXXXXX bz.default-tracker=bugs.koha-community.org
I only have this in .gitconfig
[bz-tracker "bugs.koha-community.org"] path = /bugzilla3 bz-user = tomascohen@gmail.com bz-password = XXX
Regards To+
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
-- Philippe Blouin, Responsable du développement informatique
Tél. : (888) 604-2627 philippe.blouin@inLibro.com inLibro | pour esprit libre | www.inLibro.com
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins@cpbibliography.com (web) http://www.cpbibliography.com/
Interesting. I switched computer yesterday and that one WAS NOT on fishsoup. I ignored the advice earlier as I knew I was on fishsoup on the server. Well, *thank you!* that solved my local problem. Not my server's, but I'll work on that ... later :) Now I get Incorrect authentication data 65280 The patch is attached, so I guess that issue was to send the email: git bz attach --mail 10986 HEAD Thanks a gain for your time! Blou On 13-10-03 09:46 AM, Jared Camins-Esakov wrote:
Philippe,
That error looks to me like the one you would get if you had an old version of git-bz. Did you clone the git-bz repo on git.koha-community.org <http://git.koha-community.org> and check out the fishsoup branch?
Regards, Jared
On Thu, Oct 3, 2013 at 9:42 AM, Philippe Blouin <philippe.blouin@inlibro.com <mailto:philippe.blouin@inlibro.com>> wrote:
I gave extra info, but once limited to .gitconfig, I have exactly the same parameters.
[bz-tracker "bugs.koha-community.org <http://bugs.koha-community.org>"] path = /bugzilla3 bz-user = philippe.blouin@inlibro.com <mailto:philippe.blouin@inlibro.com> bz-password = "XXXXXXXX"
well, beside the "" around the password.
On 13-10-03 08 <tel:13-10-03%2008>:52 AM, Tomas Cohen Arazi wrote:
On Thu, Oct 3, 2013 at 9:21 AM, Philippe Blouin <philippe.blouin@inlibro.com <mailto:philippe.blouin@inlibro.com>> wrote:
Hi Robin!
I attached the response (conveniently put in a .html file for easier display). That's the whole response, minus the little non-html bits I've already given.
And the maybe relevant git config stuff: user.email=philippe.blouin@inlibro.com <mailto:user.email=philippe.blouin@inlibro.com> bz-tracker.bugs.koha-community.org.path=/bugzilla3 bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com <mailto:bz-tracker.bugs.koha-community.org.bz-user=philippe.blouin@inlibro.com> bz-tracker.bugs.koha-community.org.bz-password=XXXXXXXXXXXX bz.default-tracker=bugs.koha-community.org <http://bugs.koha-community.org>
I only have this in .gitconfig
[bz-tracker "bugs.koha-community.org <http://bugs.koha-community.org>"] path = /bugzilla3 bz-user = tomascohen@gmail.com <mailto:tomascohen@gmail.com> bz-password = XXX Regards To+
-- Tomás Cohen Arazi Prosecretaría de Informática Universidad Nacional de Córdoba ✆ +54 351 4333190 ext 13168 <tel:%2B54%20351%204333190%20ext%2013168> GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
-- Philippe Blouin, Responsable du développement informatique
Tél. : (888) 604-2627 <tel:%28888%29%20604-2627> philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com>
inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins@cpbibliography.com <mailto:jcamins@cpbibliography.com> (web) http://www.cpbibliography.com/
-- Philippe Blouin, Responsable du développement informatique Tél. : (888) 604-2627 philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com> inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
participants (5)
-
Jared Camins-Esakov -
Mason James -
Philippe Blouin -
Robin Sheat -
Tomas Cohen Arazi