oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

Mirror script fails with exception in 1.2.4 for git repositories #2723

Closed tulinkry closed 5 years ago

tulinkry commented 5 years ago

I just tried 1.2.4 on git repositories and it fails with an exception, nothing gets indexed.

@400000005c900c51375ba374 Command output in project 'xxx' contains errors:
@400000005c900c51375ceb94   /opt/python/3.5/bin/opengrok-mirror -U http://localhost:8080/source -c /opengrok/etc/mirror-config.yml xxx
@400000005c900c51375e8d8c     Synchronizing repository /src/xxx
@400000005c900c51375e9174     Traceback (most recent call last):
@400000005c900c51375e9174       File "/opt/python/3.5/bin/opengrok-mirror", line 10, in <module>
@400000005c900c51375e955c         sys.exit(main())
@400000005c900c51375e955c       File "/opt/python/3.5/lib/python3.5/site-packages/opengrok_tools/mirror.py", line 397, in main
@400000005c900c51375e955c         if repo.sync() != 0:
@400000005c900c51375ea8e4       File "/opt/python/3.5/lib/python3.5/site-packages/opengrok_tools/scm/repository.py", line 62, in sync
@400000005c900c51375eaccc         return self.reposync()
@400000005c900c51375eaccc       File "/opt/python/3.5/lib/python3.5/site-packages/opengrok_tools/scm/git.py", line 48, in reposync
@400000005c900c51375eb0b4         self.logger.info("output of " + git_command + ":")
@400000005c900c51375eb0b4     TypeError: Can't convert 'list' object to str implicitly
tulinkry commented 5 years ago

I guess there would be a similar problem for the other repository types.

vladak commented 5 years ago

This is fixed in aef397c2ed08afa0b63849a3d252fa159190ca49

tulinkry commented 5 years ago

Aha, perfect.