summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-04-27Fix 'git command --amend' typo in man pageOwen W. Taylor
Should have been 'git commit --amend'. Noticed by Matěj Cepl.
2010-09-22Fix python-2.7 compatibility with xmlrpclibOwen W. Taylor
In Python 2.7 xmlrpclib was changed to use httplib.HTTP[S]Connection instead of the deprecatede httplib.HTTP[S]. This broke our xmlrpclib.Transport subclass which overrode make_connection(). For compatibility with old and new Python, switch to subclassing Transport and SafeTransport separately, with a mixin to add cookies. https://bugzilla.gnome.org/show_bug.cgi?id=628731
2010-09-06Add bz.add-url config variableOwen W. Taylor
Allow specifying the default value for whether URLs are added via a new git config variable. The -u/--add-url and -n/--no-add-url override this value. Based on a patch by Xavier Claessens <xclaesse@gmail.com>
2010-09-06Use the actual description entered by the user, rather than unconditionally ↵Bobby Holley
using commit.subject By mistake, the code was discarding the description after parsing it out from the edit buffer. https://bugzilla.gnome.org/show_bug.cgi?id=628455
2010-09-06Fix duplicate variable settingOwen W. Taylor
In git_run, interactive was initialized twice. Fix from Felipe Contreras <felipe.contreras@gmail.com>.
2010-09-06Document new per-tracker configurationOwen W. Taylor
Add documentation for 'path', 'auth-user', and 'auth-password'
2010-09-06Fix inconsistent authuser/authpwd abbreviationsOwen W. Taylor
Instead of using authuser and authpwd, spell out auth_user and auth_password (as was already done in some places.) This changes the config options to auth-user and auth-password.
2010-09-06Handle partial URLsOwen W. Taylor
Code to handle parsing a base-path out of the URL would get confused when given an URL without a path or an URL without a hostname. Catch those cases.
2010-09-06Merge remote branch 'jjongsma/http-auth'Owen W. Taylor
2010-07-01Use sqlite3 module if availableYaakov Selkowitz
Since Python 2.5, pysqlite2 has been included in the Python standard library with the name sqlite3. https://bugzilla.gnome.org/show_bug.cgi?id=621715
2010-06-14docs: Quote example url to workaround asciidoc bugRobert Bragg
The example url in the section "Ways to refer to a bug" was causing asciidoc to emit invalid xml (by closing a docbook ulink tag before the closing semicolon for a &gt; replacement giving &gt</ulink>;) which meant that xmlto could not then produce a man page. Quoting the url seems to workaround this issue. asciidoc version was 8.4.4 https://bugzilla.gnome.org/show_bug.cgi?id=621580
2010-06-07Fix typo in google-chrome and chromium supportMarc-Andre Lureau
2010-06-05When prompting, loop, don't default on unknown inputsOwen W. Taylor
Rather than taking empty or unknown input as a "no", just reprompt. I don't think the default value is obvious enough for people to actually figure it out and rely on it, so we might as well add extra robustness to accidental input.
2010-06-05Fix problem with stray spacesOwen W. Taylor
Python adds a space character between consecutive calls to print when the first print doesn't end in a newline. To avoid problems with this, use <file>.write() rather than print when: * We might be printing something empty * The newline after the line is added via echoed user input on the terminal Tracked down by William Jon McCann <william.jon.mccann@gmail.com>
2010-06-05Fix typos in documentationChristophe Fergeau
2010-06-05Added google-chrome as a possible browserOwen W. Taylor
Chromium and Google Chrome have the same basic way of storing cookes, but different config paths. Add a google-chrome browser option with the correct config path for Google Chrome. Based on a patch by Eitan Isaacson <eitan@monotonous.org>
2010-06-05Add support for epiphany with the webkit backendJonathon Jongsma
When they moved to webkit as the browser engine, epiphany changed the location of their cookies database, but the format remained the same. This patch adds support for the new location, but falls back to the old location if the new one doesn't exist. https://bugzilla.gnome.org/show_bug.cgi?id=609668
2010-06-05Handle 'see <url> <bug reference>'Owen W. Taylor
The code that was supposed to handle 'See Mozilla bug http://bugzilla.mozilla.org/show_bug.cgi?...' as a cross reference was also detecting 'See https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_MaybeGC https://bugzilla.gnome.org/show_bug.cgi?id=614725' As a cross-reference. Fix by requiring the "intervening words" not to have a : or / in them, since "See <url>" is clearly standalone and something with a : or a / in it is probably an URL. Reported by Adel Gadllah https://bugzilla.gnome.org/show_bug.cgi?id=619328
2010-06-05Pass --ignore-submodules when checking uncommitted changesOwen W. Taylor
When we check for uncommitted changes prior to adding URLs to to commit messages we should ignore submodules, since they don't affect the rebase xprocess we use to add URLs. Reported by Benjamin Otte https://bugzilla.gnome.org/show_bug.cgi?id=611693
2009-10-17Handle Chromium cookie expiry properlyOwen W. Taylor
Expiry times are in microseconds since the epoch (with the epoch depending on the exact version of Chromium.) We weren't handling this at all and just considering all cookies non-expired because of the seconds vs. microseconds difference.
2009-09-18Fix subcommands without --add-url optionOwen W. Taylor
'git bz add-url' was dying because the code was expecting all subcommands to have an --add-url option but add-url doesn't.
2009-09-18Fix adding-url to just some commitsOwen W. Taylor
Adding an URL to just some commits was broken in the rewrite to be more like git rebase, shuffle things around to fix that.
2009-09-15Fix ' git bz attach' failure when bugzilla server has a pathJonathon Jongsma
I had accidentally prepended the bugzilla installation path in both BugServer.send_post() and BugServer.send_request() (which is called by send_post()), so the path was getting prepended twice when trying to attach a patch.
2009-09-15Fix exception when parsing an alias as a urlJonathon Jongsma
In BugHandle.parse(), we first try to parse the bug reference as a url and then fall back to interpreting it as an alias from the config file. Unfortunately, something like "gnome:123456" gets parsed as a url (with a scheme of 'gnome' and a path of '123456', and no hostname). This resulted in us passing a None hostname to tracker_get_auth_user(), which resulted in an uncaught exception. From now on, only proceed with treating the bug reference as a url if the scheme is parsed as 'http' or 'https'.
2009-09-11Add support for bugzilla installations that require http authJonathon Jongsma
This patch should support http authentication credentials specified in url form (e.g. https://user:password@foo.com) or in a configuration file. The additional configure options are: - bz-tracker.<alias>.authuser - bz-tracker.<alias>.authpwd
2009-09-11Add support for bugzilla installations in non-root pathsJonathon Jongsma
Currently, git-bz assumes that all bugzilla installations are at the root of the host (e.g. http://foo.com/). It is currently impossible to use git-bz with a bugzilla installation that is hosted at e.g. foo.com/bugzilla/. This patch adds that ability. A new configuration option ('bz-tracker.alias.path') allows the path to be specified for a host.
2009-09-09Mark bugzilla.gnome.org as httpsOwen W. Taylor
bugzilla.gnome.org now supports and redirects to https; even though we handle the redirects, having it as https in the config will save a round trip.
2009-09-09Handle redirectsOwen W. Taylor
Handle redirect HTTP responses, in particular if a Bugzilla server is redirecting from http to https. We try to detect "Bugzilla URL base is over here" when we ask for show_bug.cgi and remember that for future requests to the same BugServer to avoid too many redirections. Switch from caching connection on the BugServer to a global connection cache, and rewrite the BugServer cache so to deal with the possibility of redirections.
2009-09-09Avoid Python2.6-ismsEmmanuele Bassi
I'm not entirely up to speed with the new syntax of Python 2.6, but apparently you can now do: func(*args, named_arg=value, **options) and: func(*args, named_arg=value) and Python will happily coalesce named_arg into **options for you. This is not a valid syntax for Python 2.5, though.
2009-09-05Add 'git bz push -fix' and 'git bz edit --fix'Owen W. Taylor
Add one-stop-shopping --fix=<bug reference> options to 'git bz push' and 'git bz edit'. These combine attaching the patches and resolving the bug for cases where review and testing aren't necessary.
2009-09-05Make 'git bz add-url' more like git rebaseOwen W. Taylor
Instead of resetting the branch and applying the patches there, move to a detached HEAD, apply patches to the detached HEAD and then make a single update to the branch ref. The only real advantage of this is that 'git reflog show <branchname>' shows a single meaningful commit.
2009-09-05TODO updatesOwen W. Taylor
- Always do 'git bz attach --edit' - Apply patches as a single mailbox - Make -u/--add-url kinder on the reflog
2009-09-05Split out documentationOwen W. Taylor
Move the documentation from a giant comment at the start of the file into a separate asciidoc document. Among other revisions an 'EXAMPLE SESSION' section is added to give a sense of the normal workflow. Add a Makefile and asciidoc.conf for converting the asciidoc into HTML or a man page.
2009-09-05Command line option tweaksOwen W. Taylor
- Remove the -p shortcut for 'git bz edit --pushed' - I don't find it sufficiently mnemonic to be worth confusion with things like 'git add -p'. - Say -n/--no-add-url instead of just --no-add-url in an error message. - Fix usage messages to consistently use () for grouping and [] for optional parts.
2009-09-05Allow omitting bug reference for 'git bz attach'Owen W. Taylor
When there is a single bug referenced in the commits being attached, allow using that instead of specifying a bug reference manually.
2009-09-04Make --add-url the default for 'git bz apply' as wellOwen W. Taylor
1) It's confusing to have it different 2) For git bz push, we want to have that association whenever possible, even if you didn't create the patch yourself.
2009-09-04Ignore committed/rejected patchesOwen W. Taylor
If patches have a status and it's 'committed' or 'rejected', then skip them for git-bz apply and don't prompt.
2009-09-01Allow configuring bug reference additionOwen W. Taylor
Allow configuring the behavior of add-url and --add-url with the bz.add-url-method config variable. For example: git config bz.add-url-method subject-prepend:Bug %d -
2009-09-01Improve URL additionOwen W. Taylor
* Avoid false positives when the bug # is a substring of a number in the commit. * Look at the header, not just the body, for an existing bug # * When there are local changes, don't print the diffs to the the screen. * For 'git bz add-url' indicate what commits we are skipping, and don't prompt if we aren't going to do anything. * Don't start the rebase procedure if we aren't going to do anything.
2009-09-01Add URLs by defaultOwen W. Taylor
Switch the default for 'git bz file' and 'git bz attach' so that they automatically add the URL to the commit message. Add -n/--no-add-url options to disable adding the URL.
2009-08-31Make bug changes before attachment changes to avoid token problemsOwen W. Taylor
If we make attachment changes first, we change the timestamp of the bug; rather than refetching a new token for the bug (or parsing it out of the HTML response), we just make the bug changes first and the attachment changes second.
2009-08-31Use .add() for sets not .append()Owen W. Taylor
Fix a problem with adding patches to the 'unapplied_patches' set.
2009-08-31Cache legal field valuesOwen W. Taylor
Use our constant-field-value cache to cache legal field values for each server; this cuts round trips for 'git bz edit' from 3 to 1, which is quite noticeably faster. The legal_values method is moved from Bug to BugServer, where it makes more sense.
2009-08-31Add utility for constant-response cachingOwen W. Taylor
We don't want to constantly refetch things like legal field values from the server. Add a simple cache based on RawConfigParser and pickled values stored in ~/.git-bz-cache.
2009-08-31Add push subcommand to help commandOwen W. Taylor
When listing the available commands, include 'push'
2009-08-31Fix checking for missing fields in XML responseOwen W. Taylor
token = bug.find("token") self.token = token.text if token else None Was behaving strangely: apparently ElementTree can be logically false when non-None. Switch to the more explicit: self.token = None if token is None else token.text
2009-08-30Fix marking patches as obsolete from 'git bz edit'Owen W. Taylor
Field value for isobsolete must be string "1" not 1.
2009-08-30Fix git-bz to work with none-GNOME bugzillaOwen W. Taylor
* Catch the server returning a 500 protocol error on xmlrpc.cgi; this happens with bugzilla.openedhand.com and probably other older versions of post 3.0 bugzilla. * Handle the server not sending bug/attachment tokens * Make patch-status handling conditional on the server having status on patches.
2009-08-30Add 'git bz edit --pushed' and 'git bz push'Owen W. Taylor
'git bz edit --pushed <commits>' automatically prepares the bug editing buffering based on a guess as what edits (comments, resolving the bug, changing attachment status) are appropriate once the commits are pushed to the project's official repository. 'git bz push' actually pushes commits and then does 'git bz edit --pushed'
2009-08-30Allow capturing stderr from a run git commandOwen W. Taylor
If _return_error=True is added to git.<command_name>() then a tuple of captured output from stderr, stdout is returned. We'll need this to parse the output of 'git push' which goes to stderr.