Patchwork Workflow improvement
Hi All,
right now I'm writing a Qt 4.6 based application that might help us a bit with the patchwork queue.
The idea of the script is to have two things at the end:
1.) a branch with all the patches that applied and that can be published 2.) a list of patches that don't apply.
What people are supposed to:
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...
The current version is able to download the information of all pending patches, the next thing is to do is to apply them and keep track of the result...
/*
* Copyright (C) 2010 Holger Hans Peter Freyther
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#include <QApplication>
#include <QWebFrame>
#include <QWebElement>
#include <QWebPage>
class Worker : public QObject {
Q_OBJECT
public:
Worker()
: m_currentPage(1)
{
m_page = new QWebPage(this);
connect(m_page, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
}
void start()
{
qWarning("Trying to download page %d from patchwork", m_currentPage);
QUrl url("http://patchwork.openembedded.org/project/openembedded/list/?order=date&page=" + QByteArray::number(m_currentPage));
m_page->mainFrame()->load(url);
}
void startNext()
{
++m_currentPage;
start();
}
void handleCurrentPatch(QWebElement patch)
{
QWebElement link = patch.findFirst("a");
QList<QWebElement> table = patch.findAll("td").toList();
QString date, author, state;
if (table.size() == 5) {
date = table[1].toPlainText();
author = table[2].toPlainText();
state = table[4].toPlainText();
}
qWarning("\tDate: %s Author: '%s' State: %s '%s'", qPrintable(date), qPrintable(author), qPrintable(state), qPrintable(link.toPlainText()));
}
// query for all patches..
void handleCurrentPage()
{
QWebElementCollection patches = m_page->mainFrame()->findAllElements("tr[id*=patch_row]");
foreach(QWebElement element, patches)
handleCurrentPatch(element);
}public Q_SLOTS:
void loadFinished(bool result)
{
// Verify that we got the page we wanted
QWebElement currentPage = m_page->mainFrame()->findFirstElement("span[title='Current Page']");
if (currentPage.isNull()) {
qWarning("Failed to find the current page.");
return QApplication::exit(-1);
}
int currentPageNo = currentPage.toPlainText().toInt();
if (currentPageNo != m_currentPage) {
qWarning("The end was reached.");
return QApplication::exit(0);
}
qWarning("Finished the download of page %d with status: %d", m_currentPage, result);
handleCurrentPage();
startNext();
}private:
QWebPage* m_page;
int m_currentPage;
};int main(int argc, char **argv)
{
QApplication app(argc, argv);
Worker worker;
worker.start();
app.exec();
}#include "main.moc"
Quoted 3 lines · On Saturday 23 January 2010 09:43:24 Holger Hans Peter Freyther wrote:
The current version is able to download the information of all pending patches, the next thing is to do is to apply them and keep track of the result...
Ofcourse there is pwclient (which I couldn't find right now when I started this) but it will not be able to help us on the main purpose..
Quoted 1 line · On Saturday 23 January 2010 09:43:24 Holger Hans Peter Freyther wrote:
Hi All,
these urls fail to apply. It would be cool if people would help with the following randomized algorithm:
Pick a given number between 0 to 138 and then work on a block of 10 times.
1.) Open the URL in the browser
2.) Check if the patch was applied
2.1) If it was applied, close the report
2.2) If it was not applied, and the patch makes sense, send a follow
up mail to the author and defer the current patch
2.3) If it was not applied, and the patch does not make sense,
just close the bug as rejected..
please help
# 139 patches failed to apply.
http://patchwork.openembedded.org/patch/454
http://patchwork.openembedded.org/patch/650
http://patchwork.openembedded.org/patch/651
http://patchwork.openembedded.org/patch/691
http://patchwork.openembedded.org/patch/714
http://patchwork.openembedded.org/patch/727
http://patchwork.openembedded.org/patch/729
http://patchwork.openembedded.org/patch/740
http://patchwork.openembedded.org/patch/743
http://patchwork.openembedded.org/patch/746
http://patchwork.openembedded.org/patch/750
http://patchwork.openembedded.org/patch/753
http://patchwork.openembedded.org/patch/770
http://patchwork.openembedded.org/patch/773
http://patchwork.openembedded.org/patch/890
http://patchwork.openembedded.org/patch/893
http://patchwork.openembedded.org/patch/902
http://patchwork.openembedded.org/patch/940
http://patchwork.openembedded.org/patch/942
http://patchwork.openembedded.org/patch/949
http://patchwork.openembedded.org/patch/959
http://patchwork.openembedded.org/patch/960
http://patchwork.openembedded.org/patch/972
http://patchwork.openembedded.org/patch/986
http://patchwork.openembedded.org/patch/988
http://patchwork.openembedded.org/patch/989
http://patchwork.openembedded.org/patch/994
http://patchwork.openembedded.org/patch/1000
http://patchwork.openembedded.org/patch/1004
http://patchwork.openembedded.org/patch/1005
http://patchwork.openembedded.org/patch/1007
http://patchwork.openembedded.org/patch/1008
http://patchwork.openembedded.org/patch/1016
http://patchwork.openembedded.org/patch/1020
http://patchwork.openembedded.org/patch/1021
http://patchwork.openembedded.org/patch/1022
http://patchwork.openembedded.org/patch/1023
http://patchwork.openembedded.org/patch/1024
http://patchwork.openembedded.org/patch/1030
http://patchwork.openembedded.org/patch/1043
http://patchwork.openembedded.org/patch/1036
http://patchwork.openembedded.org/patch/1046
http://patchwork.openembedded.org/patch/1041
http://patchwork.openembedded.org/patch/1048
http://patchwork.openembedded.org/patch/1056
http://patchwork.openembedded.org/patch/1064
http://patchwork.openembedded.org/patch/1066
http://patchwork.openembedded.org/patch/1067
http://patchwork.openembedded.org/patch/1074
http://patchwork.openembedded.org/patch/1078
http://patchwork.openembedded.org/patch/1082
http://patchwork.openembedded.org/patch/1083
http://patchwork.openembedded.org/patch/1089
Quoted 1 line · On Saturday 23 January 2010 09:43:24 Holger Hans Peter Freyther wrote:
Hi All,
I have pushed "holger/staging-branch" to the server. It does contain all patches from patchwork that are still applying. Please go through the branch and cherry-pick or follow up on the emails.. I also have a new version of the program I use attached... I will probably switch it to use pwclient in the future.
thanks
The current list of failures:
# 142 patches failed to apply.
http://patchwork.openembedded.org/patch/454
http://patchwork.openembedded.org/patch/650
http://patchwork.openembedded.org/patch/651
http://patchwork.openembedded.org/patch/691
http://patchwork.openembedded.org/patch/714
http://patchwork.openembedded.org/patch/727
http://patchwork.openembedded.org/patch/729
http://patchwork.openembedded.org/patch/740
http://patchwork.openembedded.org/patch/743
http://patchwork.openembedded.org/patch/746
http://patchwork.openembedded.org/patch/747
http://patchwork.openembedded.org/patch/750
http://patchwork.openembedded.org/patch/753
http://patchwork.openembedded.org/patch/770
http://patchwork.openembedded.org/patch/773
http://patchwork.openembedded.org/patch/881
http://patchwork.openembedded.org/patch/890
http://patchwork.openembedded.org/patch/893
http://patchwork.openembedded.org/patch/902
http://patchwork.openembedded.org/patch/940
http://patchwork.openembedded.org/patch/942
http://patchwork.openembedded.org/patch/949
http://patchwork.openembedded.org/patch/950
http://patchwork.openembedded.org/patch/959
http://patchwork.openembedded.org/patch/960
http://patchwork.openembedded.org/patch/972
http://patchwork.openembedded.org/patch/986
http://patchwork.openembedded.org/patch/988
http://patchwork.openembedded.org/patch/989
http://patchwork.openembedded.org/patch/994
http://patchwork.openembedded.org/patch/1000
http://patchwork.openembedded.org/patch/1004
http://patchwork.openembedded.org/patch/1005
http://patchwork.openembedded.org/patch/1007
http://patchwork.openembedded.org/patch/1008
http://patchwork.openembedded.org/patch/1016
http://patchwork.openembedded.org/patch/1020
http://patchwork.openembedded.org/patch/1021
http://patchwork.openembedded.org/patch/1022
http://patchwork.openembedded.org/patch/1023
http://patchwork.openembedded.org/patch/1024
http://patchwork.openembedded.org/patch/1030
http://patchwork.openembedded.org/patch/1043
http://patchwork.openembedded.org/patch/1036
http://patchwork.openembedded.org/patch/1046
http://patchwork.openembedded.org/patch/1041
http://patchwork.openembedded.org/patch/1048
http://patchwork.openembedded.org/patch/1056
http://patchwork.openembedded.org/patch/1064
http://patchwork.openembedded.org/patch/1066
http://patchwork.openembedded.org/patch/1067
http://patchwork.openembedded.org/patch/1074
http://patchwork.openembedded.org/patch/1078
http://patchwork.openembedded.org/patch/1082
http://patchwork.openembedded.org/patch/1083
http://patchwork.openembedded.org/patch/1089
http://patchwork.openembedded.org/patch/1090
http://patchwork.openembedded.org/patch/1092
http://patchwork.openembedded.org/patch/1093
http://patchwork.openembedded.org/patch/1095
http://patchwork.openembedded.org/patch/1098
http://patchwork.openembedded.org/patch/1115
http://patchwork.openembedded.org/patch/1119
http://patchwork.openembedded.org/patch/1122
http://patchwork.openembedded.org/patch/1135
http://patchwork.openembedded.org/patch/1144
http://patchwork.openembedded.org/patch/1149
http://patchwork.openembedded.org/patch/1150
http://patchwork.openembedded.org/patch/1152
http://patchwork.openembedded.org/patch/1153
http://patchwork.openembedded.org/patch/1154
http://patchwork.openembedded.org/patch/1157
http://patchwork.openembedded.org/patch/1161
http://patchwork.openembedded.org/patch/1162
http://patchwork.openembedded.org/patch/1163
http://patchwork.openembedded.org/patch/1164
http://patchwork.openembedded.org/patch/1172
http://patchwork.openembedded.org/patch/1176
http://patchwork.openembedded.org/patch/1175
http://patchwork.openembedded.org/patch/1173
http://patchwork.openembedded.org/patch/1178
http://patchwork.openembedded.org/patch/1186
http://patchwork.openembedded.org/patch/1187
http://patchwork.openembedded.org/patch/1191
http://patchwork.openembedded.org/patch/1192
http://patchwork.openembedded.org/patch/1193
http://patchwork.openembedded.org/patch/1194
http://patchwork.openembedded.org/patch/1202
http://patchwork.openembedded.org/patch/1204
http://patchwork.openembedded.org/patch/1209
http://patchwork.openembedded.org/patch/1210
http://patchwork.openembedded.org/patch/1211
http://patchwork.openembedded.org/patch/1214
http://patchwork.openembedded.org/patch/1221
http://patchwork.openembedded.org/patch/1223
http://patchwork.openembedded.org/patch/1225
http://patchwork.openembedded.org/patch/1226
http://patchwork.openembedded.org/patch/1229
http://patchwork.openembedded.org/patch/1231
http://patchwork.openembedded.org/patch/1247
http://patchwork.openembedded.org/patch/1250
http://patchwork.openembedded.org/patch/1261
http://patchwork.openembedded.org/patch/1266
http://patchwork.openembedded.org/patch/1267
http://patchwork.openembedded.org/patch/1269
http://patchwork.openembedded.org/patch/1283
http://patchwork.openembedded.org/patch/1284
http://patchwork.openembedded.org/patch/1286
http://patchwork.openembedded.org/patch/1289
http://patchwork.openembedded.org/patch/1303
http://patchwork.openembedded.org/patch/1314
http://patchwork.openembedded.org/patch/1317
http://patchwork.openembedded.org/patch/1316
http://patchwork.openembedded.org/patch/1320
http://patchwork.openembedded.org/patch/1322
http://patchwork.openembedded.org/patch/1326
http://patchwork.openembedded.org/patch/1327
http://patchwork.openembedded.org/patch/1334
http://patchwork.openembedded.org/patch/1352
http://patchwork.openembedded.org/patch/1354
http://patchwork.openembedded.org/patch/1351
http://patchwork.openembedded.org/patch/1366
http://patchwork.openembedded.org/patch/1379
http://patchwork.openembedded.org/patch/1382
http://patchwork.openembedded.org/patch/1393
http://patchwork.openembedded.org/patch/1402
http://patchwork.openembedded.org/patch/1418
http://patchwork.openembedded.org/patch/1431
http://patchwork.openembedded.org/patch/1438
http://patchwork.openembedded.org/patch/1439
http://patchwork.openembedded.org/patch/1440
http://patchwork.openembedded.org/patch/1453
http://patchwork.openembedded.org/patch/1454
http://patchwork.openembedded.org/patch/1455
http://patchwork.openembedded.org/patch/1456
http://patchwork.openembedded.org/patch/1457
http://patchwork.openembedded.org/patch/1452
http://patchwork.openembedded.org/patch/1467
http://patchwork.openembedded.org/patch/1468
http://patchwork.openembedded.org/patch/1489
http://patchwork.openembedded.org/patch/1504
http://patchwork.openembedded.org/patch/1505
/*
* Copyright (C) 2010 Holger Hans Peter Freyther
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#include <QApplication>
#include <QWebFrame>
#include <QWebElement>
#include <QWebPage>
class Worker : public QObject {
Q_OBJECT
public:
Worker()
: m_currentPage(1)
{
m_page = new QWebPage(this);
connect(m_page, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
}
void start()
{
qWarning("Trying to download page %d from patchwork", m_currentPage);
QUrl url("http://patchwork.openembedded.org/project/openembedded/list/?order=date&page=" + QByteArray::number(m_currentPage));
m_page->mainFrame()->load(url);
}
void startNext()
{
++m_currentPage;
start();
}
// Use git apply first and then use git am...
void applyPatch(int patch_no)
{
QByteArray apply_cmd = "cd /home/ich/source/embedded/openembedded/; ";
apply_cmd += "wget -o /dev/null -O /dev/stdout http://patchwork.openembedded.org/patch/" + QByteArray::number(patch_no) + "/mbox/";
apply_cmd += " | git apply --check > /dev/null 2>&1";
int result = system(apply_cmd.constData());
if (result == 0) {
QByteArray am_cmd = "cd /home/ich/source/embedded/openembedded/; ";
am_cmd += "wget -o /dev/null -O /dev/stdout http://patchwork.openembedded.org/patch/" + QByteArray::number(patch_no) + "/mbox/";
am_cmd += " | git am > /dev/null 2>&1";
result = system(am_cmd.constData());
}
if (result != 0)
m_failingPatches.append("http://patchwork.openembedded.org/patch/" + QByteArray::number(patch_no));
}
void handleCurrentPatch(QWebElement patch)
{
QWebElement link = patch.findFirst("a");
QList<QWebElement> table = patch.findAll("td").toList();
QString date, author, state;
if (table.size() == 5) {
date = table[1].toPlainText();
author = table[2].toPlainText();
state = table[4].toPlainText();
}
QString href = link.attribute("href");
if (href.isEmpty() || !href.startsWith("/patch/")) {
qWarning("Can not parse href from the link..");
return;
}
// strip the '/patch/' and the last '/' from the url
int patch_no = href.mid(sizeof "/patch/" - 1, href.length() - sizeof "/patch/").toInt();
if (patch_no <= 0) {
qWarning("Failed to find the patch number.");
return;
}
qWarning("\tDate: %s Author: '%s' State: %s '%s'", qPrintable(date), qPrintable(author), qPrintable(state), qPrintable(link.toPlainText()));
applyPatch(patch_no);
}
// query for all patches..
void handleCurrentPage()
{
QWebElementCollection patches = m_page->mainFrame()->findAllElements("tr[id*=patch_row]");
foreach(QWebElement element, patches)
handleCurrentPatch(element);
}public Q_SLOTS:
void loadFinished(bool result)
{
// Verify that we got the page we wanted
QWebElement currentPage = m_page->mainFrame()->findFirstElement("span[title='Current Page']");
if (currentPage.isNull()) {
qWarning("Failed to find the current page.");
return QApplication::exit(-1);
}
int currentPageNo = currentPage.toPlainText().toInt();
if (currentPageNo != m_currentPage) {
qWarning("The end was reached.");
return QApplication::exit(0);
}
qWarning("Finished the download of page %d with status: %d", m_currentPage, result);
handleCurrentPage();
startNext();
}public:
QWebPage* m_page;
int m_currentPage;
QList<QString> m_failingPatches;
};int main(int argc, char **argv)
{
QApplication app(argc, argv);
Worker worker;
worker.start();
app.exec();
if (worker.m_failingPatches.isEmpty())
return 0;
qWarning("# %d patches failed to apply.", worker.m_failingPatches.size());
foreach(QString url, worker.m_failingPatches)
qWarning("%s", qPrintable(url));
}#include "main.moc"
Dear Holger,
Am Samstag, den 23.01.2010, 10:56 +0100 schrieb Holger Hans Peter Freyther:
Quoted 1 line · On Saturday 23 January 2010 09:43:24 Holger Hans Peter Freyther wrote:
[…]
Quoted 3 lines
I have pushed "holger/staging-branch" to the server. It does contain all patches from patchwork that are still applying. Please go through the branch and cherry-pick or follow up on the emails..
if I understood correctly you mean with »patches from patchwork that are still applying« that the mbox file can be applied with git am as pw-am.sh does [1].
That requires that all patches are submitted using git send-email, which has been suggested lately on this list by several people, or that everyone uses a MUA which provides easy handling of mbox files created by git format-patch. Is that correct?
I will start a separate thread regarding git send-email.
Quoted 3 lines
I also have a new version of the
program I use attached... I will probably switch it to use pwclient in the future.
Thank you for your effort and bringing up pwclient. It is so sad, that there exists a lot of tools and stuff one does not know about which could safe work and time for oneself. I wonder why others projects did not face the same problems yet. Probably every project or developers wrote her/his own scripts (as OE did with pw-am.sh) and everyone reinvents the wheel.
Thanks,
Paul
[1] http://wiki.openembedded.net/index.php/Patchwork
[2] http://wiki.openembedded.net/index.php/Commit_Policy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 12 lines · Paul Menzel
Dear Holger,
Am Samstag, den 23.01.2010, 10:56 +0100 schrieb Holger Hans Peter Freyther:
Quoted 1 line · On Saturday 23 January 2010 09:43:24 Holger Hans Peter Freyther wrote:
[…]
Quoted 3 lines
I have pushed "holger/staging-branch" to the server. It does contain all patches from patchwork that are still applying. Please go through the branch and cherry-pick or follow up on the emails..
Quoted 5 lines
if I understood correctly you mean with »patches from patchwork that are still applying« that the mbox file can be applied with
git amaspw-am.shdoes [1].That requires that all patches are submitted using
git send-email,
That is not a hard requirement, but seems to be the most fool-proof one
Quoted 3 lines
Probably every project or developers
wrote her/his own scripts (as OE did withpw-am.sh) and everyone reinvents the wheel.
In this case it was purposely reinvented since getting OE developers to install extra software is like pulling teeth, so a simple shell script was added.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLWxH0MkyGM64RGpERAgAPAJ0VTGsXK2zviMV5G8Prq/Had2jzEgCfWwxu u1NK7hM+MNyDm2tDhAFIIug=
=ONPl
-----END PGP SIGNATURE-----
Quoted 6 lines · On Saturday 23 January 2010 15:53:05 Paul Menzel wrote:
Dear Holger,
Quoted 3 lines
I also have a new version of the
program I use attached... I will probably switch it to use pwclient in the future.
Quoted 6 lines
Thank you for your effort and bringing up
pwclient. It is so sad, that there exists a lot of tools and stuff one does not know about which could safe work and time for oneself. I wonder why others projects did not face the same problems yet. Probably every project or developers wrote her/his own scripts (as OE did withpw-am.sh) and everyone reinvents the wheel.
Well, I remembered that pwclient exists, so I went to the patchwork website at ozlabs.org but I could not find any reference to the tools (or the XML RPC API). It was just a matter that writing my version was faster than the time I would have to spent searching... :(.
I will probably give up on my version and now look into pw-am.sh.
pwclient (was: Patchwork Workflow improvement)
Am Samstag, den 23.01.2010, 17:46 +0100 schrieb Holger Hans Peter Freyther:
Quoted 14 lines · On Saturday 23 January 2010 15:53:05 Paul Menzel wrote:
Quoted 6 lines
Dear Holger,
Quoted 3 lines
I also have a new version of the
program I use attached... I will probably switch it to use pwclient in the future.Quoted 6 lines
Thank you for your effort and bringing up
pwclient. It is so sad, that there exists a lot of tools and stuff one does not know about which could safe work and time for oneself. I wonder why others projects did not face the same problems yet. Probably every project or developers wrote her/his own scripts (as OE did withpw-am.sh) and everyone reinvents the wheel.
Quoted 4 lines
Well, I remembered that pwclient exists, so I went to the patchwork website at ozlabs.org but I could not find any reference to the tools (or the XML RPC API). It was just a matter that writing my version was faster than the time I would have to spent searching... :(.
It seems to be available at [1] and in the Patchwork Git repository under apps/patchwork/bin.
Quoted 1 line
I will probably give up on my version and now look into
pw-am.sh.
If the only problem was that you could not find pwclient I hope we can improve pwclient.
Thanks,
Paul
Re: pwclient
Am Samstag, den 23.01.2010, 17:53 +0100 schrieb Paul Menzel:
Quoted 15 lines
Am Samstag, den 23.01.2010, 17:46 +0100 schrieb Holger Hans Peter Freyther:
Quoted 14 lines · On Saturday 23 January 2010 15:53:05 Paul Menzel wrote:
Quoted 12 lines
Dear Holger,
Quoted 3 lines
I also have a new version of the
program I use attached... I will probably switch it to use pwclient in the future.Thank you for your effort and bringing up
pwclient. It is so sad, that there exists a lot of tools and stuff one does not know about which could safe work and time for oneself. I wonder why others projects did not face the same problems yet. Probably every project or developers wrote her/his own scripts (as OE did withpw-am.sh) and everyone reinvents the wheel.
Quoted 7 lines
Quoted 4 lines
Well, I remembered that pwclient exists, so I went to the patchwork website at ozlabs.org but I could not find any reference to the tools (or the XML RPC API). It was just a matter that writing my version was faster than the time I would have to spent searching... :(.
It seems to be available at [1] and in the Patchwork Git repository under
apps/patchwork/bin.
I failed the first time trying to compose the help by myself, but reading and trying [1] you find pwclient under the »project info« page
[2] at the bottom [3] directly in our installation. There you can download the configuration file [4] too.
Quoted 4 lines
Quoted 1 line
I will probably give up on my version and now look into
pw-am.sh.If the only problem was that you could not find
pwclientI hope we can improvepwclient.
Thanks,
Paul
Quoted 1 line
[2] http://patchwork.openembedded.org/project/openembedded/
[3] http://patchwork.openembedded.org/help/pwclient/
[4] http://patchwork.openembedded.org/project/openembedded/pwclientrc/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 10 lines · Holger Hans Peter Freyther
Hi All,
right now I'm writing a Qt 4.6 based application that might help us a bit with the patchwork queue.
The idea of the script is to have two things at the end:
1.) a branch with all the patches that applied and that can be published 2.) a list of patches that don't apply.
Quoted 4 lines
What people are supposed to:
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...
I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
I guess we should flag patches with bad commit messages as 'rejected' in pw ASAP. We can weed out most of them by reject anything that lacks a ':' in the subject line.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLWtKwMkyGM64RGpERAgSAAJ4y0iproyWSH/ojheSFN40fdj16NgCfRfj3 rD4D/FAM3X5NeYdEUTRsbDQ=
=4N5e
-----END PGP SIGNATURE-----
Re: New state for patches not complying with commit policy (was: Patchwork Workflow improvement)
Am Samstag, den 23.01.2010, 11:42 +0100 schrieb Koen Kooi:
Quoted 15 lines · Holger Hans Peter Freyther
Quoted 1 line
right now I'm writing a Qt 4.6 based application that might help us
a bit with
Quoted 11 lines
the patchwork queue.
The idea of the script is to have two things at the end:
1.) a branch with all the patches that applied and that can be published 2.) a list of patches that don't apply.What people are supposed to:
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...
Quoted 7 lines
I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
I guess we should flag patches with bad commit messages as 'rejected' in pw ASAP. We can weed out most of them by reject anything that lacks a ':' in the subject line.
I am just getting into Patchwork [1][2], so I am sorry if I miss the obvious.
If it is possible, I suggest to add a new state (»Rejected – Commit Policy«) for patches not complying with the commit policy [3]?
As a bonus an automatically answer is sent to the message with the patch to the list with the following content, which is just a draft/suggestion of course.
Dear patch author,
thank you for your patch. Unfortunately we had to reject it because it does not comply with our commit policy [3].
It would be great if you could resend your patch with this issue fixed so that we can review and commit it as soon as possible.
Thank you,
OpenEmbedded people
Is there a way to automate this?
Thanks,
Paul
[1] http://patchwork.openembedded.org/
[2] http://ozlabs.org/~jk/projects/patchwork/
[3] http://wiki.openembedded.net/index.php/Commit_Policy
Re: New state for patches not complying with commit policy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 24 lines · Paul Menzel
Am Samstag, den 23.01.2010, 11:42 +0100 schrieb Koen Kooi:
Quoted 15 lines · Holger Hans Peter Freyther
Quoted 1 line
right now I'm writing a Qt 4.6 based application that might help us
a bit with
Quoted 11 lines
the patchwork queue.
The idea of the script is to have two things at the end:
1.) a branch with all the patches that applied and that can be published 2.) a list of patches that don't apply.What people are supposed to:
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...Quoted 7 lines
I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
I guess we should flag patches with bad commit messages as 'rejected' in pw ASAP. We can weed out most of them by reject anything that lacks a ':' in the subject line.
Quoted 5 lines
I am just getting into Patchwork [1][2], so I am sorry if I miss the obvious.
If it is possible, I suggest to add a new state (»Rejected – Commit Policy«) for patches not complying with the commit policy [3]?
We can add that easily, we did the same for the 'applied' state.
Quoted 3 lines
As a bonus an automatically answer is sent to the message with the patch to the list with the following content, which is just a draft/suggestion of course.
I'm unsure if we can do that. Patchwork does support sending emails, but I left it disabled since I suck at email stuff.
If someone knows how to make patchwork do that we can consider turning such a feature on.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLWwNXMkyGM64RGpERAp59AJ476WIGYubuaxiqdmQ4yl4r+z2EWgCeOGqM 6D0qHrY1hvikflj9fpVLXAk=
=VKyT
-----END PGP SIGNATURE-----
Re: New state for patches not complying with commit policy (was: Patchwork Workflow improvement)
In reply to Paul MenzelQuoted 2 lines · Paul Menzel
If it is possible, I suggest to add a new state (»Rejected – Commit Policy«) for patches not complying with the commit policy [3]?
If the patch is basically correct then it seems a little bit officious to reject it purely because it fails to conform to the commit policy in some way. Most of the issues listed in the policy are easy enough to fix up when applying the patch, after all.
By all means send a note to the patch submitter explaining how they could write a better commit message (or whatever) in the future, but I don't think there is any need to reject the patch just for that.
p.
Re: New state for patches not complying with commit policy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Phil Blundell
Quoted 2 lines · Paul Menzel
If it is possible, I suggest to add a new state (»Rejected – Commit Policy«) for patches not complying with the commit policy [3]?
If the patch is basically correct then it seems a little bit officious to reject it purely because it fails to conform to the commit policy in some way. Most of the issues listed in the policy are easy enough to fix up when applying the patch, after all.
And yet OE developers aren't fixing those up (latest example: the patch stack Khem pushed last week), however easy it may be.
Maybe it's a case of sampling bias since I only inspect bad commits, but in any case, the commit message of the commits that end up in .dev needs to get improved.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLWzlJMkyGM64RGpERAvyDAKCE7pBD3krfl2wBN4GvYi59Wi+g8wCeLNmA Wg9qotVtOlkyOtLgSkhTrPQ=
=ar+b
-----END PGP SIGNATURE-----
Quoted 5 lines · On Saturday 23 January 2010 11:42:56 Koen Kooi wrote:
Quoted 2 lines
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
Right... cherry-pick and use git commit --amend afterwards
Quoted 4 lines
I guess we should flag patches with bad commit messages as 'rejected' in pw ASAP. We can weed out most of them by reject anything that lacks a ':' in the subject line.
that is a difficult decision. E.g. of course we should handle patches that have a good commit message faster than patches that are of lower quality. But then again just rejecting a patch is also bad, e.g. maybe the contributor just didn't know better and needs a helpful hand?
I was going through them older stuff, e.g. someone sending a patch against a package but not as part of a fix to the recipe... So the contributor did his homework, he looked for similiar build errors and found a patch, it is low hanging fruit to fix that in OE.
The bottom line is. People don't send us "bad" patches to piss us off, they try to contribute and we should help them to be useful contributors.
z.
Quoted 8 lines · Holger Hans Peter Freyther
Quoted 5 lines · On Saturday 23 January 2010 11:42:56 Koen Kooi wrote:
Quoted 2 lines
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
yeah rebasing bit me in foot. my ammended commit messages did not make it to repo because I did'nt finish rebasing (git rebase --continue) and pushed it. It would have been nice if git warned me about being in the middle of rebase before pushing.
Quoted 7 lines · Khem Raj
Quoted 5 lines · Holger Hans Peter Freyther
Quoted 3 lines · On Saturday 23 January 2010 11:42:56 Koen Kooi wrote:
Quoted 2 lines
1.) Cherry pick from the branch
2.) Send updated patches, close the reports on patchwork...
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
I think people that apply those patches to oe.dev should fix up the commit message as well. The stack Khem pushed this week is just awfull.
yeah rebasing bit me in foot. my ammended commit messages did not make it to repo because I did'nt finish rebasing (git rebase --continue) and pushed it. It would have been nice if git warned me about being in the middle of rebase before pushing.
I guess we could install commit hooks similar to uclibc to rejects pushes which do
not have proper commit message format and also bogus branch merges that is seen so common
-Khem
Quoted 1 line · Khem Raj
I guess we could install commit hooks similar
[x] show code
;-)
Useful Git hooks for ensuring code quality. (was: Patchwork Workflow improvement)
Am Sonntag, den 24.01.2010, 01:28 +0100 schrieb Rolf Leggewie:
Quoted 4 lines
Quoted 1 line · Khem Raj
I guess we could install commit hooks similar
[x] show code
I mentioned this too in my other (rather long) mail »[oe] [RFC] Perfect(?) workflow for patches.« [1].
I hope I will find some time to code something up. But here are some links.
I copy the links from [1] into this message. Unfortunately I could not find the hooks uclibc is using.
Besides in git help hooks, Git hooks are covered very well in the Pro Git book section 7.3 [2]. There is a pretty good blog post regarding this issue [3] too.
1. Examples in the Pro Git book from section 7.4.
http://progit.org/book/ch7-4.html
2. Git hooks used by arora project (also referred to in [3]):
http://github.com/Arora/arora/tree/master/git_hooks/
3. Script which can be hooked up to automatically change state in Patchwork (for Subversion/SVN though):
http://lists.ozlabs.org/pipermail/patchwork/attachments/20091006/13e2340a/attachment.asc
4. Examples in the Git project
http://git.kernel.org/?p=git/git.git;a=tree;f=contrib/hooks
I suggest to also create a directory contrib/hooks where we should save tested hooks to share them.
Thanks,
Paul
[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-January/016715.html
[2] http://progit.org/book/ch7-3.html
[3] http://benjamin-meyer.blogspot.com/2008/10/git-hooks.html
Holger Hans Peter Freyther <[email protected]> [2010-01-23 09:43:24]:
Quoted 1 line
Hi All,
Hi,
Quoted 1 line
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
Apple? :)
-- ynezz
Quoted 8 lines · On Saturday 23 January 2010 16:19:32 Petr Štetiar wrote:
Holger Hans Peter Freyther <[email protected]> [2010-01-23 09:43:24]:
Quoted 1 line
Hi All,
Hi,
Quoted 1 line
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
Apple? :)
Haha.. I copied that from my WebKit sources :)
Quoted 2 lines · Holger Hans Peter Freyther
right now I'm writing a Qt 4.6 based application that might help us a bit with the patchwork queue.
Holger,
thank you for working on better integration of patchwork into the workflow. I was wondering if it was possible for the script to check for patches attached to open tickets that reverse-apply (IOW, the committer forgot to close the ticket). If your script would then close these tickets as APPLIED, that would be splendid.
Regards
Rolf