From d3b90e754b8f37fc8b7f15ca3434486d9fe9b23b Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Sat, 2 Sep 2017 11:10:56 +0000
Subject: [PATCH 1/7] britney: Rewrite conditional assignment

The original method confused IntelliJ into thinking that binary_t was
a boolean rather than an object.

Signed-off-by: Niels Thykier <niels@thykier.net>
---
 britney.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/britney.py b/britney.py
index faf55a4..0fb9c5e 100755
--- a/britney.py
+++ b/britney.py
@@ -1142,7 +1142,7 @@ class Britney(object):
             pkg_name = pkg_id.package_name
 
             # retrieve the testing (if present) and unstable corresponding binary packages
-            binary_t = pkg_name in packages_t_a and packages_t_a[pkg_name] or None
+            binary_t = packages_t_a[pkg_name] if pkg_name in packages_t_a else None
             binary_u = packages_s_a[pkg_name]
 
             # this is the source version for the new binary package

From 3220710a6c18c516af4b1ede60772cafab24ff3f Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Fri, 8 Sep 2017 07:43:11 +0000
Subject: [PATCH 2/7] britney.py: stop referring to the freeze policy while
 we're not frozen

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 britney.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/britney.py b/britney.py
index 0fb9c5e..0d428f7 100755
--- a/britney.py
+++ b/britney.py
@@ -1084,7 +1084,7 @@ class Britney(object):
         # if the package is blocked, skip it
         for hint in self.hints.search('block', package=pkg, removal=True):
             excuse.addhtml("Not touching package, as requested by %s "
-                "(check https://release.debian.org/testing/freeze_policy.html if update is needed)" % hint.user)
+                "(contact debian-release if update is needed)" % hint.user)
             excuse.addreason("block")
             self.excuses[excuse.name] = excuse
             return False
@@ -1352,7 +1352,7 @@ class Britney(object):
                         excuse.addhtml("%s request by %s ignored due to version mismatch: %s" %
                                        (unblock_cmd.capitalize(), unblocks[0].user, unblocks[0].version))
                 if suite == 'unstable' or block_cmd == 'block-udeb':
-                    tooltip = "check https://release.debian.org/testing/freeze_policy.html if update is needed"
+                    tooltip = "please contact debian-release if update is needed"
                     # redirect people to d-i RM for udeb things:
                     if block_cmd == 'block-udeb':
                         tooltip = "please contact the d-i release manager if an update is needed"

From ac39d2448fbffa21153c64bd642e9af695c2b78d Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Thu, 5 Oct 2017 17:50:10 +0000
Subject: [PATCH 3/7] doc/hints.md: grammar fix - "if it was" -> "if it were"

This phrasing is the subjunctive mood, for which English always uses
"were"

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 doc/hints.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/hints.md b/doc/hints.md
index a5c48ce..3575014 100644
--- a/doc/hints.md
+++ b/doc/hints.md
@@ -210,7 +210,7 @@ entire hint is rejected as invalid.
 ### easy `<action list>`
 
 Perform all the migrations and removals denoted by `<action list>` as if
-it was a single migration group.  If the end result is equal or better
+it were a single migration group.  If the end result is equal or better
 compared to the original situation, the action is committed.
 
 This hint is primarily useful if britney fails to compute a valid
@@ -224,7 +224,7 @@ make sense (as britney always tries those).
 ### hint `<action list>`
 
 Perform all the migrations and removals denoted by `<action list>` as if
-it was a single migration group.  After that, process all remaining
+it were a single migration group.  After that, process all remaining
 (unmigrated) items and accept any that can now be processed.  If the
 end result is equal or better compared to the original situation, the
 result is committed.  Otherwise, all actions triggered by the hint are

From c6170a6042db812651ed099380eb98e0011d9410 Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Thu, 5 Oct 2017 17:52:27 +0000
Subject: [PATCH 4/7] docs/hints.md: be consistent of capitalisation of
 "britney"

Only capitalise it at the start of sentences, not within them

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 doc/hints.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/hints.md b/doc/hints.md
index 3575014..25fc8b0 100644
--- a/doc/hints.md
+++ b/doc/hints.md
@@ -31,7 +31,7 @@ Configuration example:
     HINTS_AUTO-REMOVALS = remove
 
 There is no fixed rules for how to use hints files.  Though usually,
-each person with permissions to give hints to Britney will have their
+each person with permissions to give hints to britney will have their
 own hint file along with write permissions for that file.  It can also
 make sense to create hint files for "roles".  Like in the above
 example there are two human hints (anna and john) plus two non-human
@@ -77,7 +77,7 @@ There are the following type of hints:
 ## Policy override hints
 
 The policy override hints are used to disable or tweak various
-policies in Britney.  Their effects are generally very precise ways of
+policies in britney.  Their effects are generally very precise ways of
 accepting specific regressions or disabling various checks.
 
 Some of these items are built-in while others are related to specific

From 5e58d18676b0f51d7cf0d7d2a7bf502dec628fcb Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Thu, 5 Oct 2017 17:54:06 +0000
Subject: [PATCH 5/7] doc/hints.md: remove gendered pronouns, to match other
 documentation

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 doc/hints.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/hints.md b/doc/hints.md
index 25fc8b0..288313e 100644
--- a/doc/hints.md
+++ b/doc/hints.md
@@ -6,8 +6,8 @@
 This document describes the "britney hints".  These are basically
 small instructions to britney.  The vast majority of them involve
 overriding a quality gating policy in britney.  However, there are a
-few hints that assist britney into finding solutions that she cannot
-compute herself.
+few hints that assist britney into finding solutions that it cannot
+compute itself.
 
 
 ## Related configuration
@@ -18,7 +18,7 @@ configurations that defines a "hint file" and the related hint
 permissions for it.
 
 For each `HINTS_<NAME>` configuration, britney will attempt to read
-`<HINTSDIR>/<name>`.  Note that she lowercases `<NAME>` when looking
+`<HINTSDIR>/<name>`.  Note that it lowercases `<NAME>` when looking
 for the file.
 
 
@@ -215,7 +215,7 @@ compared to the original situation, the action is committed.
 
 This hint is primarily useful if britney fails to compute a valid
 solution for a concrete problem with a valid solution.  Although, in
-many cases, Britney will generally figure out the solution on her own.
+many cases, Britney will generally figure out the solution on its own.
 
 Note that for `easy` the `<action list>` must have at least two
 elements.  There is no use-case where a single element for easy will
@@ -239,7 +239,7 @@ rather expensive and should be used sparingly.
 
 This hint is primarily useful if britney fails to compute a valid
 solution for a concrete problem with a valid solution.  Although, in
-many cases, Britney will generally figure out the solution on her own.
+many cases, Britney will generally figure out the solution on its own.
 
 *Caveat*: Due to "uninstallability trading", this hint may cause
 undesireable changes to the target suite.  In practise, this is rather

From f7173b9d668bcb9aeddcd34cbb1acc8692b02152 Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Thu, 5 Oct 2017 17:54:49 +0000
Subject: [PATCH 6/7] doc/hints.md: fix another couple of "Britney" ->
 "britney"

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 doc/hints.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/hints.md b/doc/hints.md
index 288313e..de530ee 100644
--- a/doc/hints.md
+++ b/doc/hints.md
@@ -215,7 +215,7 @@ compared to the original situation, the action is committed.
 
 This hint is primarily useful if britney fails to compute a valid
 solution for a concrete problem with a valid solution.  Although, in
-many cases, Britney will generally figure out the solution on its own.
+many cases, britney will generally figure out the solution on its own.
 
 Note that for `easy` the `<action list>` must have at least two
 elements.  There is no use-case where a single element for easy will
@@ -239,7 +239,7 @@ rather expensive and should be used sparingly.
 
 This hint is primarily useful if britney fails to compute a valid
 solution for a concrete problem with a valid solution.  Although, in
-many cases, Britney will generally figure out the solution on its own.
+many cases, britney will generally figure out the solution on its own.
 
 *Caveat*: Due to "uninstallability trading", this hint may cause
 undesireable changes to the target suite.  In practise, this is rather

From 3ee3ba546392e57ab7438af16ea80cdadeb11af3 Mon Sep 17 00:00:00 2001
From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
Date: Thu, 5 Oct 2017 17:56:25 +0000
Subject: [PATCH 7/7] doc/hints.md: subject-number agreement fix

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
---
 doc/hints.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/hints.md b/doc/hints.md
index de530ee..42f6aae 100644
--- a/doc/hints.md
+++ b/doc/hints.md
@@ -30,7 +30,7 @@ Configuration example:
     HINTS_FREEZE = block block-all block-udeb
     HINTS_AUTO-REMOVALS = remove
 
-There is no fixed rules for how to use hints files.  Though usually,
+There are no fixed rules for how to use hints files.  Though usually,
 each person with permissions to give hints to britney will have their
 own hint file along with write permissions for that file.  It can also
 make sense to create hint files for "roles".  Like in the above