jybuestc / gource

Automatically exported from code.google.com/p/gource
0 stars 0 forks source link

Gource will not accept my .log #230

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. git clone https://github.com/IJoshFTW/testRepository.git

2. gource --log-command git
> git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 
--no-renames

3. git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 
--no-renames > log.log

4. gource log.log
> gource: unsupported log format (you may need to regenerate your log file)

What is the expected output? What do you see instead?
Expected: Run okay
What I see: error (see above)

What version of the product are you using? On what operating system?
0.42 on Windows 64 bit

Please provide any additional information below.
Running gource without specifying the file will run it fine. I am just 
wondering why it isn't when I do.

Original issue reported on code.google.com by joshua.b...@gmail.com on 19 Oct 2014 at 1:12

GoogleCodeExporter commented 8 years ago
I couldn't reproduce this. What do the first few entries in that log file look 
like?

Original comment by acaudw...@gmail.com on 19 Oct 2014 at 3:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
*** *** ***
user:IJoshFTW
1413636011
:000000 100644 0000000... 1904319... A  README.md

user:Joshua Slik
1413636927
:000000 100644 0000000... 985fafe... A  index.html

user:Joshua Slik
1413637202
:100644 100644 985fafe... 830f2ae... M  index.html
:000000 100644 0000000... f8c5a98... A  index2.html

user:Joshua Slik
1413637305
:100644 100644 830f2ae... 58e3e18... M  index.html
*** *** ***

File contents are between asterisk rows.
Full file attached.

Original comment by joshua.b...@gmail.com on 19 Oct 2014 at 4:56

Attachments:

GoogleCodeExporter commented 8 years ago
The file you attached seems to have some slightly funny character encoding 
(UTF-16?). Gource is expecting a UTF-8.

Possibly when you piped it (>) to the log file your command prompt turned it 
into UTF-16.

Original comment by acaudw...@gmail.com on 19 Oct 2014 at 5:48

GoogleCodeExporter commented 8 years ago
I am using PowerShell 4.0 (Win 8.1 x86_64).
I am not familiar with it, do you know where I van change the character 
encoding?

Original comment by joshua.b...@gmail.com on 19 Oct 2014 at 5:52

GoogleCodeExporter commented 8 years ago
Did some testing, here are the results:

git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 
--no-renames | Out-File -Encoding Unicode log.gourcelog
> [No output, successful command]
gource log.gourcelog
> Unsupported log format (As expected, because this is UTF16, the default 
output)

git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 
--no-renames | Out-File -Encoding UTF8 log.gourcelog
> [No output, successful command]
gource log.gourcelog
> Unsupported log format (Huh? I thought it was expecting UTF8?)

So I decided to push on

git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 
--no-renames | Out-File -Encoding UTF7 log.gourcelog
> [No output, successful command]
gource log.gourcelog
> [Gource runs]

Ok what...?

If git gives it as UTF 8 and I save it as UTF 7, it runs with no problem.

Original comment by joshua.b...@gmail.com on 19 Oct 2014 at 7:22

GoogleCodeExporter commented 8 years ago
It also won't work if there is a byte-order-marker (BOM) at the start of the 
file, it looks like that Out-File command line will include a BOM.

You can use 'gource --output-custom-log custom.log' to save a copy of the log 
file read by gource from git and then use that. Or use regular command prompt 
to save the git log.

Original comment by acaudw...@gmail.com on 19 Oct 2014 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by acaudw...@gmail.com on 15 Dec 2014 at 4:06