Mercurial > hg
annotate mercurial/mergeutil.py @ 45830:c102b704edb5
global: use python3 in shebangs
Python 3 is the future. We want Python scripts to be using Python 3
by default.
This change updates all `#!/usr/bin/env python` shebangs to use
`python3`.
Does this mean all scripts use or require Python 3: no.
In the test environment, the `PATH` environment variable in tests is
updated to guarantee that the Python executable used to run
run-tests.py is used. Since test scripts all now use
`#!/usr/bin/env python3`, we had to update this code to install
a `python3` symlink instead of `python`.
It is possible there are some random scripts now executed with the
incorrect Python interpreter in some contexts. However, I would argue
that this was a pre-existing bug: we should almost always be executing
new Python processes using the `sys.executable` from the originating
Python script, as `python` or `python3` won't guarantee we'll use the
same interpreter.
Differential Revision: https://phab.mercurial-scm.org/D9273
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Nov 2020 13:58:59 -0800 |
parents | 32ce4cbaec4b |
children | fa87536d3d70 |
rev | line source |
---|---|
30494
c1149533676b
checkunresolved: move to new package to help avoid import cycles
Augie Fackler <augie@google.com>
parents:
30493
diff
changeset
|
1 # mergeutil.py - help for merge processing in mercurial |
2874
4ec58b157265
refactor text diff/patch code.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 # |
4635
63b9d2deed48
Updated copyright notices and add "and others" to "hg version"
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4633
diff
changeset
|
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
2874
4ec58b157265
refactor text diff/patch code.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
4 # |
8225
46293a0c7e9f
updated license to be explicit about GPL version 2
Martin Geisler <mg@lazybytes.net>
parents:
8210
diff
changeset
|
5 # This software may be used and distributed according to the terms of the |
10263 | 6 # GNU General Public License version 2 or any later version. |
2874
4ec58b157265
refactor text diff/patch code.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
7 |
28322
ebd0e86bdf89
cmdutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com>
parents:
28313
diff
changeset
|
8 from __future__ import absolute_import |
ebd0e86bdf89
cmdutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com>
parents:
28313
diff
changeset
|
9 |
ebd0e86bdf89
cmdutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com>
parents:
28313
diff
changeset
|
10 from .i18n import _ |
ebd0e86bdf89
cmdutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com>
parents:
28313
diff
changeset
|
11 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30494
diff
changeset
|
12 from . import error |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30494
diff
changeset
|
13 |
19211
3bfd7f1e7485
summary: augment output with info from extensions
Bryan O'Sullivan <bryano@fb.com>
parents:
19129
diff
changeset
|
14 |
30272
3d38a0bc774f
cmdutil: refactor checkunresolved
timeless <timeless@mozdev.org>
parents:
30182
diff
changeset
|
15 def checkunresolved(ms): |
3d38a0bc774f
cmdutil: refactor checkunresolved
timeless <timeless@mozdev.org>
parents:
30182
diff
changeset
|
16 if list(ms.unresolved()): |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30494
diff
changeset
|
17 raise error.Abort( |
43117
8ff1ecfadcd1
cleanup: join string literals that are already on one line
Martin von Zweigbergk <martinvonz@google.com>
parents:
43077
diff
changeset
|
18 _(b"unresolved merge conflicts (see 'hg help resolve')") |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
30494
diff
changeset
|
19 ) |