Merge commits up to v1.13.1
12ee5446e9eb 2018-12-19 21:28:35 -0800 init: Remove -c short option for --current-branch
e158e3802da0 2018-12-20 07:21:02 +0000 Merge "README: link in new bug tracker"
3bbbcaf99d61 2018-12-20 02:11:35 -0500 README: link in new bug tracker
d4b13c280b5c 2018-12-18 21:21:12 -0800 Leverage the next keyword from python 2.7
BUG=chromium:900461
TEST=`repo sync` locally
Change-Id: I407dddce5d33f63ed98293f963fa38a69919f110
diff --git a/.pydevproject b/.pydevproject
index 27c2485..837d544 100644
--- a/.pydevproject
+++ b/.pydevproject
@@ -5,6 +5,6 @@
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/git-repo</path>
</pydev_pathproperty>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>
diff --git a/README.md b/README.md
index 39f6bb8..acd4803 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
that you can put anywhere in your path.
* Homepage: https://gerrit.googlesource.com/git-repo/
-* Bug reports: https://code.google.com/p/git-repo/issues/
+* Bug reports: https://bugs.chromium.org/p/gerrit/issues/list?q=component:repo
* Source: https://gerrit.googlesource.com/git-repo/
* Overview: https://source.android.com/source/developing.html
* Docs: https://source.android.com/source/using-repo.html
diff --git a/event_log.py b/event_log.py
index 2f1b180..508b18e 100644
--- a/event_log.py
+++ b/event_log.py
@@ -18,8 +18,6 @@
import json
import multiprocessing
-from pyversion import is_python3
-
TASK_COMMAND = 'command'
TASK_SYNC_NETWORK = 'sync-network'
TASK_SYNC_LOCAL = 'sync-local'
@@ -73,7 +71,7 @@
A dictionary of the event added to the log.
"""
event = {
- 'id': (kind, self._next_id.__next__() if is_python3() else self._next_id.next()),
+ 'id': (kind, next(self._next_id)),
'name': name,
'task_name': task_name,
'start_time': start,
diff --git a/repo b/repo
index 9d3e577..0de5992 100755
--- a/repo
+++ b/repo
@@ -23,7 +23,7 @@
# limitations under the License.
# increment this whenever we make important changes to this script
-VERSION = (1, 24)
+VERSION = (1, 25)
# increment this if the MAINTAINER_KEYS block is modified
KEYRING_VERSION = (1, 5)
@@ -240,7 +240,7 @@
S_repo = 'repo' # special repo repository
S_manifests = 'manifests' # special manifest repository
REPO_MAIN = S_repo + '/main.py' # main script
-MIN_PYTHON_VERSION = (2, 6) # minimum supported python version
+MIN_PYTHON_VERSION = (2, 7) # minimum supported python version
GITC_CONFIG_FILE = '/gitc/.config'
GITC_FS_ROOT_DIR = '/gitc/manifest-rw/'
@@ -279,9 +279,12 @@
# Python version check
ver = sys.version_info
if (ver[0], ver[1]) < MIN_PYTHON_VERSION:
- _print('error: Python version %s unsupported.\n'
- 'Please use Python 2.6 - 2.7 instead.'
- % sys.version.split(' ')[0], file=sys.stderr)
+ _print('error: Python version {} unsupported.\n'
+ 'Please use Python {}.{} instead.'.format(
+ sys.version.split(' ')[0],
+ MIN_PYTHON_VERSION[0],
+ MIN_PYTHON_VERSION[1],
+ ), file=sys.stderr)
sys.exit(1)
home_dot_repo = os.path.expanduser('~/.repoconfig')
@@ -307,7 +310,7 @@
group.add_option('-m', '--manifest-name',
dest='manifest_name',
help='initial manifest file', metavar='NAME.xml')
-group.add_option('-c', '--current-branch',
+group.add_option('--current-branch',
dest='current_branch_only', action='store_true',
help='fetch only current manifest branch from server')
group.add_option('--mirror',
@@ -1036,6 +1039,6 @@
if __name__ == '__main__':
if ver[0] == 3:
_print('warning: Python 3 support is currently experimental. YMMV.\n'
- 'Please use Python 2.6 - 2.7 instead.',
+ 'Please use Python 2.7 instead.',
file=sys.stderr)
main(sys.argv[1:])
diff --git a/subcmds/init.py b/subcmds/init.py
index 6e99658..9a9e849 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -95,7 +95,7 @@
g.add_option('-b', '--manifest-branch',
dest='manifest_branch',
help='manifest branch or revision', metavar='REVISION')
- g.add_option('-c', '--current-branch',
+ g.add_option('--current-branch',
dest='current_branch_only', action='store_true',
help='fetch only current manifest branch from server')
g.add_option('-m', '--manifest-name',