[Pkg-ocaml-maint-commits] [SCM] oasis2debian project branch, master, updated. 94ae27000298101188a629fbcc6b28420021fe10
Sylvain Le Gall
gildor at debian.org
Sat Nov 20 00:58:56 UTC 2010
The following commit has been merged in the master branch:
commit 637ff513c8d32e5299fc51166ea934bf17a93b98
Author: Sylvain Le Gall <gildor at debian.org>
Date: Fri Nov 19 16:48:14 2010 +0100
Allow to disable BTS queries
diff --git a/src/Conf.ml b/src/Conf.ml
index ffe2548..59c28e4 100644
--- a/src/Conf.ml
+++ b/src/Conf.ml
@@ -40,14 +40,7 @@ let rec get ~ctxt r =
| Value x ->
x
-let create ?cli ?parse help t =
- let parse =
- match parse with
- | Some f ->
- f
- | None ->
- fun s -> s
- in
+let create_full ?cli parse help t =
let res =
{
value = t;
@@ -66,3 +59,6 @@ let create ?cli ?parse help t =
| None -> ()
end;
res
+
+let create ?cli help t =
+ create_full ?cli (fun s -> s) help t
diff --git a/src/Main.ml b/src/Main.ml
index b529869..ab61aa2 100644
--- a/src/Main.ml
+++ b/src/Main.ml
@@ -37,6 +37,13 @@ let itp =
"Bug number of the ITP for the package"
Conf.ShortInput
+let bts_query =
+ Conf.create_full
+ ~cli:"--bts-query"
+ bool_of_string
+ "Query the BTS for ITP (true/false)"
+ (Conf.Value true)
+
let () =
let () =
(* Clean ENV *)
@@ -132,9 +139,18 @@ let () =
let itp =
Conf.get ~ctxt itp
in
+ let opts =
+ ""
+ in
+ let opts =
+ if Conf.get ~ctxt bts_query then
+ opts
+ else
+ opts^" --no-query"
+ in
assert_command ~ctxt
(interpolate
- "dch --create --package $pkg.OASISTypes.name --newversion $pkg_version-1 --closes $itp")
+ "dch --create --package $pkg.OASISTypes.name --newversion $pkg_version-1 --closes $itp $opts")
end
in
--
oasis2debian project
More information about the Pkg-ocaml-maint-commits
mailing list