azzurris / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

Repo breaks when using git preview versions (unexpected formatting of the version string) #160

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: all
Environment: Ubuntu 14.04

What steps will reproduce the problem?
1. Installing git version 1.9.rc1
2. Doing a repo sync

What is the expected output? What do you see instead?

expected output is that it should sync the project.
instead after fetching projects, the repo sync breaks

Please provide any additional information below.

alex@evisceration:~/android$ repo sync

...
...
...

Fetching projects: 100% (424/424), done.  
Traceback (most recent call last):
  File "/home/alex/android/.repo/repo/main.py", line 418, in <module>
    _Main(sys.argv[1:])
  File "/home/alex/android/.repo/repo/main.py", line 394, in _Main
    result = repo._Run(argv) or 0
  File "/home/alex/android/.repo/repo/main.py", line 142, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/alex/android/.repo/repo/subcmds/sync.py", line 650, in Execute
    fetched = self._Fetch(to_fetch, opt)
  File "/home/alex/android/.repo/repo/subcmds/sync.py", line 368, in _Fetch
    self._GCProjects(projects)
  File "/home/alex/android/.repo/repo/subcmds/sync.py", line 377, in _GCProjects
    has_dash_c = git_require((1, 7, 2))
  File "/home/alex/android/.repo/repo/git_command.py", line 110, in git_require
    git_version = git.version_tuple()
  File "/home/alex/android/.repo/repo/git_command.py", line 93, in version_tuple
    ver_str[len('git version '):].strip().split('-')[0].split('.')[0:3]
ValueError: invalid literal for int() with base 10: 'rc1'

alex@evisceration:~/android$ git --version
git version 1.9.rc1

it uses "rc1" as an int and therefore breaks.

a similar issue is reported here too, which affects another formatting.

formatting of this issue: x.x.rc
formatting of the similar issue: x.x.x-rc

https://code.google.com/p/git-repo/issues/detail?id=158

Original issue reported on code.google.com by Eviscera...@gmail.com on 2 Feb 2014 at 1:09

GoogleCodeExporter commented 9 years ago
Duplicate of issue 146.

Original comment by jrn@google.com on 2 Feb 2014 at 8:43