Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191350 - [PATCH] www-client/pybugz-0.7.0, show bugid as a pastable url
Summary: [PATCH] www-client/pybugz-0.7.0, show bugid as a pastable url
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-05 09:22 UTC by Togge
Modified: 2009-04-12 03:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pybugz-0.7.0-bugurl.patch (pybugz-0.7.0-bugurl.patch,2.67 KB, text/plain)
2007-09-05 09:24 UTC, Togge
Details
pybugz-0.7.0-namedcmd_bugurl.patch (pybugz-0.7.0-namedcmd_bugurl.patch,6.04 KB, text/plain)
2007-09-05 09:25 UTC, Togge
Details
New version for 0.7.2 (pybugz-0.7.2-bugurl.patch,3.37 KB, patch)
2007-12-29 22:14 UTC, Togge
Details | Diff
pybugz-0.7.2-namedcmd_bugurl.patch (pybugz-0.7.2-namedcmd_bugurl.patch,6.75 KB, patch)
2007-12-29 22:14 UTC, Togge
Details | Diff
Updated patch (pybugz-bugurl.patch,3.02 KB, patch)
2009-03-31 17:22 UTC, Togge
Details | Diff
Patch against git (0001-Add-option-to-show-link-to-bugzilla-entry.patch,2.87 KB, patch)
2009-04-02 17:00 UTC, Togge
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Togge 2007-09-05 09:22:56 UTC
Two patches that adds a '-l', '--showurl' option to search (and namedcmd) that will show the bugid as a url pointing to the bug for copy/paste into a browser.
Comment 1 Togge 2007-09-05 09:24:15 UTC
Created attachment 130059 [details]
pybugz-0.7.0-bugurl.patch

pybugz-0.7.0-bugurl.patch
Comment 2 Togge 2007-09-05 09:25:21 UTC
Created attachment 130061 [details]
pybugz-0.7.0-namedcmd_bugurl.patch

pybugz-0.7.0-namedcmd_bugurl.patch
Comment 3 William Hubbs gentoo-dev 2007-12-29 16:02:08 UTC
Can you please also update this for 0.7.2?

Thanks much,

William


Comment 4 Togge 2007-12-29 22:14:08 UTC
Created attachment 139582 [details, diff]
New version for 0.7.2
Comment 5 Togge 2007-12-29 22:14:58 UTC
Created attachment 139584 [details, diff]
pybugz-0.7.2-namedcmd_bugurl.patch

How about adding these to the program? :)
Comment 6 Togge 2008-01-01 14:43:07 UTC
Comment on attachment 139584 [details, diff]
pybugz-0.7.2-namedcmd_bugurl.patch

For the namedcmd patch see bug #191137
Comment 7 William Hubbs gentoo-dev 2009-03-22 04:18:28 UTC
Hello,

I am now up and working with pybugz again, so can you do me a favor?  We
are now using github, so can you please check out the latest source
from there and write this patch against the master branch and re-attach it
to this bug?

The clone url is

git://github.com/ColdWind/pybugz

Thanks much,

William

Comment 8 William Hubbs gentoo-dev 2009-03-28 18:48:53 UTC
Please re-open this when you get a chance to rewrite the patch against
the master branch at git://github.com/ColdWind/pybugz.git.

Thanks much.

William

Comment 9 Togge 2009-03-31 17:22:30 UTC
Created attachment 186881 [details, diff]
Updated patch

Updated patch against git (commit fb26ce3d99abf71bd60bb1c5c363adb1071b8bf0)
Comment 10 Togge 2009-03-31 17:22:54 UTC
New patch attached
Comment 11 William Hubbs gentoo-dev 2009-03-31 21:37:50 UTC
I am unable to apply your patch against my repository by doing the
following:

cd pybugz-repo
patch < pybugz-bugurl.patch

The patch program is unable to find the file that it should patch.

Also, I don't understand part of the patch (mainly probably because I am
still learning python), but why do we have to touch bugzilla.py for this
patch?  It seems to be something that only affects the cli which is in
bugz/cli.py.

Thanks,

William
Comment 12 Togge 2009-04-01 17:30:57 UTC
(In reply to comment #11)
> I am unable to apply your patch against my repository by doing the
> following:
> 
> cd pybugz-repo
> patch < pybugz-bugurl.patch

Should be:

patch -p1 < pybugz-bugurl.patch

(git adds a virtual topdirectory to the patch path when extracting a patch)

> Also, I don't understand part of the patch (mainly probably because I am
> still learning python), but why do we have to touch bugzilla.py for this
> patch?  It seems to be something that only affects the cli which is in
> bugz/cli.py.

I touch bugzilla.py because it was the easiest way to get the new option to search working. bugzilla.py is called with **kwds, ie with all options that search got. The other way would have been to filter out showlink from kwds prior to calling bugzilla.

/Regards
Togge
Comment 13 William Hubbs gentoo-dev 2009-04-01 19:29:37 UTC
How difficult would it be to filter out showlink instead of passing it
on to the bugzilla interface since it isn't used at that level anyway?

Thanks,

William

Comment 14 William Hubbs gentoo-dev 2009-04-01 20:20:49 UTC
Another way you can submit the patch that would work really well is to
use git format-patch.  This will create a patch, with authorship
information, etc, which I can directly commit to the repository.  For
information on this, do the following:

git help format-patch

or

git format-patch --help

Thanks,

William

Comment 15 Togge 2009-04-02 17:00:35 UTC
Created attachment 187109 [details, diff]
Patch against git

Updated patch to keep bugzilla.py clean.
Diff with git format-patch origin

/Togge
Comment 16 William Hubbs gentoo-dev 2009-04-12 03:26:02 UTC
I have added this to 0.7.4_rc3; however, I made a couple of slight
changes to the original patch.

First, the command line option is --show-url instead of showlink.  To me
that is more clear since the url itself cannot be clicked on to open a
browser, and you would be able to click on a link.

Also, I did not include the title wrapping at this point, since I found
that listbugs needed to be cleaned up another area.  Now there is only
one print statement at the bottom of the for loop.

Please open another bug regarding wrapping the output and provide a
patch for listbugs if you can.

Thanks for your report.

William