Using global / system files git -review config (git -review.conf) is deprecated

Today I started contributing to the Wikimedia Gerrit community using Git and the GitHub desktop on my Windows 10 (PC).


First I installed the package git-reviewwith Pip:

$ pip install git-review

After logging in, I clone and create a new branch with Git:

$ ssh suriyaa@gerrit.wikimedia.org -p 29418

$ git clone ssh://suriyaa@gerrit.wikimedia.org:29418/operations/mediawiki-config
$ git pull origin master
$ git checkout -b suriyaakudocommits origin/master
$ git branch
$ git branch suriyaakudocommits --track origin/master
$ git checkout suriyaakudocommits

I am editing the file and adding it with git add:

$ git diff
$ git status
$ git add 404.html
$ git status
$ git diff --cached
$ git commit
$ git pull --rebase origin master

I used to commit my changes from my " " branch to Wikimedia Gerrit (branch: " "), and I got this (error) output: git review -Rsuriyaakudocommitsmaster

C:\Users\Suriyaa\Documents\GitHub\mediawiki-config [suriyaakudocommits]> git review -R
Using global/system git-review config files (C:\Users\Suriyaa/.config/git-review\git-review.conf) is deprecated
Traceback (most recent call last):
  File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python34\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python34\Scripts\git-review.exe\__main__.py", line 9, in <module>
  File "C:\Python34\lib\site-packages\git_review\cmd.py", line 1522, in main
    _main()
  File "C:\Python34\lib\site-packages\git_review\cmd.py", line 1393, in _main
    config = Config(os.path.join(top_dir, ".gitreview"))
  File "C:\Python34\lib\site-packages\git_review\cmd.py", line 285, in __init__
    self.config.update(load_config_file(filename))
  File "C:\Python34\lib\site-packages\git_review\cmd.py", line 671, in load_config_file
    configParser.read(config_file)
  File "C:\Python34\lib\configparser.py", line 672, in read
    self._read(fp, filename)
  File "C:\Python34\lib\configparser.py", line 1058, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: 'C:\\Users\\Suriyaa/.config/git-review\\git-review.conf', line: 1
'[gerrit]\n'

What happened? Hope someone can help me.

I am using Python 3.4 (32 bit)!

I followed the MediaWiki Tutorial for Gerrit .


C:\\Users\\Suriyaa/.config/git-review\\git-review.conf:

[gerrit]
defaultremote = origin
+4
1

MediaWiki, , , git -review.conf . :

$ git config --global gitreview.remote origin

.conf, .

+3

Source: https://habr.com/ru/post/1606796/


All Articles