summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/git-send-bugzilla.txt8
-rwxr-xr-xgit-send-bugzilla.pl6
2 files changed, 10 insertions, 4 deletions
diff --git a/docs/git-send-bugzilla.txt b/docs/git-send-bugzilla.txt
index 286c4f9..e8718e4 100644
--- a/docs/git-send-bugzilla.txt
+++ b/docs/git-send-bugzilla.txt
@@ -26,6 +26,9 @@ formatted as "[n/m] Subject".
OPTIONS
-------
+-b|--url <url>::
+ The Bugzilla URL.
+
-u|--username <username>::
Your Bugzilla user name.
@@ -47,11 +50,12 @@ OPTIONS
CONFIGURATION
-------------
-You can specify an user name and a password for the bugzilla in the
-repository configuration as follows:
+You can specify an URL, an user name and a password for the bugzilla
+in the repository configuration as follows:
..........................
[bugzilla]
+ url = "http://bugzilla.kernel.org"
username = "wanda@gnome.org"
password = "********"
..........................
diff --git a/git-send-bugzilla.pl b/git-send-bugzilla.pl
index 976d926..c26af96 100755
--- a/git-send-bugzilla.pl
+++ b/git-send-bugzilla.pl
@@ -16,8 +16,8 @@ not available. You can install it using cpan WWW::Mechanize.
ERROR
}
-my $url = "http://bugzilla.gnome.org";
my $mech = WWW::Mechanize->new(agent => "git-send-bugzilla/0.0");
+my $url = '';
sub authenticate {
my $username = shift;
@@ -131,6 +131,7 @@ sub usage {
exit $exitcode;
}
+$url = read_repo_config 'url', 'str', 'http://bugzilla.gnome.org';
my $username = read_repo_config 'username';
my $password = read_repo_config 'password';
my $numbered = read_repo_config 'numbered', 'bool', 0;
@@ -140,7 +141,8 @@ my $dry_run = 0;
my $help = 0;
# Parse options
-GetOptions("username|u=s" => \$username,
+GetOptions("url|b=s" => \$url,
+ "username|u=s" => \$username,
"password|p=s" => \$password,
"numbered|n" => \$numbered,
"start-number" => \$start_number,