annotate debian/copyright @ 6364:e8d85d51c7b2 stable

topic: monkey-patch ctx.branch() correctly in override_context_branch There's a `for p in ctx.parents()` loop in this block of code, and it's used to monkey-patch .branch() method for both parents of ctx. It assigns each parent of ctx to variable `p` (implicitly) and p.branch method to variable `pbranch` (explicitly). This worked fine when there's only one p1, but when there were 2 parents, this code was broken, and our tests didn't catch this because the use of override_context_branch context manager is quite limited. The problem is that the newly created function uses `p` and `pbranch`, and the closures for the new p1.branch() and p2.branch() didn't get created until the for-loop finished, and the values `p` and `pbranch` could change before that. In other words, the new .branch method of p1 was effectively identical to p2's because the values that were available to it were from the second cycle of the for-loop, when it the loop was at p2. Now we pass the values to a function that creates the new .branch methods, and since these values are provided to overridebranch() as arguments, they get enclosed when the function returns. This was seen (and tested) during topic namespaces-related work, when override_context_branch usage was expanded to include some local operations.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 15 Dec 2022 17:07:25 +0400
parents 9571d40061c8
children 8f52da3cefd0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6213
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
1 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
2 Upstream-Name: evolve
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
3 Source: https://www.mercurial-scm.org/repo/evolve/
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
4
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
5 Files: *
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
6 Copyright:
6214
06711ddb4c1c copyright: undust the copyright notice to reflect current state
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6213
diff changeset
7 2011—2022 Pierre-Yves David <pierre-yves.david@octobus.net>
06711ddb4c1c copyright: undust the copyright notice to reflect current state
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6213
diff changeset
8 Anton Shestakov <av6@dwimlabs.net>
06711ddb4c1c copyright: undust the copyright notice to reflect current state
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 6213
diff changeset
9 and others
6213
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
10 License: GPL-2+
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
11
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
12 Files: debian/*
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
13 Copyright:
6215
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
14 2011-2022 Anton Shestakov <av6@dwimlabs.net>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
15 Pierre-Yves David <pierre-yves.david@octobus.net>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
16 Faheem Mitha <faheem@faheem.info>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
17 Julien Cristau <julien.cristau@logilab.fr>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
18 Georges Racinet <georges.racinet@octobus.net>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
19 Denis Laxalde <denis@laxalde.org>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
20 Kim Alvefur <zash@zash.se>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
21 Martin von Zweigbergk <martinvonz@google.com>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
22 Laurent Charignon <lcharignon@fb.com>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
23 Philippe Pepiot <philippe.pepiot@logilab.fr>
9571d40061c8 copyright: update for the debian/ subdirectory
Georges Racinet <georges.racinet@octobus.net>
parents: 6214
diff changeset
24 Logilab SA <contact@logilab.fr>
6213
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
25 License: GPL-2+
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
26
6213
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
27 License: GPL-2+
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
28 This program is free software; you can redistribute it and/or modify
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
29 it under the terms of the GNU General Public License as published by
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
30 the Free Software Foundation; either version 2, or (at your option)
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
31 any later version.
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
32 .
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
33 This program is distributed in the hope that it will be useful,
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
34 but WITHOUT ANY WARRANTY; without even the implied warranty of
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
36 GNU General Public License for more details.
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
37 .
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
38 You should have received a copy of the GNU General Public License along
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
39 with this program; if not, write to the Free Software Foundation,
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
40 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
41 .
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
42 On Debian systems, the complete text of the GNU General Public License
fc877278f79e copyright: convert debian/copyright to the machine-readable format
Andrej Shadura <andrew.shadura@collabora.co.uk>
parents: 2557
diff changeset
43 version 2 can be found in ‘/usr/share/common-licenses/GPL-2’.
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
44
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
45 This software may be used and distributed according to the terms of the GNU
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
46 General Public License version 2 or any later version.
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
47
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
48 On Debian systems, the complete text of the GNU General Public License version
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
49 2 can be found in `/usr/share/common-licenses/GPL-2'.