Unable to visualize branch (assuming because of non-standard ascii commit messages)

30 views
Skip to first unread message

Nathan Hüsken

unread,
Aug 4, 2015, 1:46:49 AM8/4/15
to git-cola
Hey,

Trying to visualize my current branch, I get this error:

--------------------------
Traceback (most recent call last):


File "C:\Program Files (x86)\git-cola\pkgs\cola\cmds.py", line 1724, in do_cmd

return cmd.do()


File "C:\Program Files (x86)\git-cola\pkgs\cola\cmds.py", line 1637, in do

launch_history_browser(browser + [self.model.currentbranch])


File "C:\Program Files (x86)\git-cola\pkgs\cola\cmds.py", line 1677, in launch_history_browser

_, details = utils.format_exception(e)


File "C:\Program Files (x86)\git-cola\pkgs\cola\utils.py", line 38, in format_exception

details = '\n'.join(details)


UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 42: ordinal not in range(128)


----------------------


This is under windows 8.1 using the python 2.7 and the newest git cola.

Maybe it is because I use german non-ascii characters in commit messages?


Any advice?


Thanks!

Nathan

David Aguilar

unread,
Aug 4, 2015, 2:10:28 AM8/4/15
to Nathan Hüsken, Thomas Kluyver, git-cola
I know that unicode is well supported on Linux and OSX, but I don't
have a modern windows machine to test on.

It may be that the branch name has unicode characters, which might be
tricky on windows, but even that is known to work well (on unix).

It's curious that it hits an error while trying to display the
original exception, which is unfortunate, since it probably contained
useful details.

I bet it's going to tell you that it can't find gitk or something like
that. I think this issue is related:

https://github.com/git-cola/git-cola/issues/429

There, they suggest:

OK gitk launches from git-cola if the history browser option is set as:
C:/Git/bin/sh --login -i C:/Git/bin/gitk

That wrinkle deserves its own README entry for windows users to post-configure.

The gitk script is a shell script that invokes wish that invokes the
script again.
It works fine on unix because unix natively supports shell scripts.
On windows, you have to use the above workaround to force sh to
interpret the script.


Maybe the installer can do it? Since we'd be touching ~/.gitconfig,
it'd make sense to have it be optional (default true), but maybe nsis
can't do that, so at the very least I'll document it.


I do know that the path where git-cola is installed cannot contain
non-utf-8 characters on windows, so common encodings (such as windows'
default) breaks us in all sorts of sad ways if cola's installation
path contains unicode characters.

On linux, it works great. We've gone through great lengths to ensure
that utf-8 (and even other encodings for files via .gitattributes)
work perfectly in git-cola.


The traceback code you found seems like it might need some attention
so I'll see what we can do there. Nonetheless, please try the above
config tweak and see if that gets gitk launching.
--
David

Nathan Hüsken

unread,
Aug 4, 2015, 4:01:26 AM8/4/15
to git-cola
Hey,

Thanks for the reply!

    C:/Git/bin/sh --login -i C:/Git/bin/gitk 

did it for me! I had to adjust the path, but then it worked.

Thanks!
Nathan

David Aguilar

unread,
Aug 4, 2015, 4:14:58 AM8/4/15
to Nathan Hüsken, git-cola
On Tue, Aug 4, 2015 at 1:01 AM, Nathan Hüsken
<nathan....@googlemail.com> wrote:
> Hey,
>
> Thanks for the reply!
>
> C:/Git/bin/sh --login -i C:/Git/bin/gitk
>
> did it for me! I had to adjust the path, but then it worked.


Cool, I'm glad that worked.

I also just pushed the README updates, and made it so that the default
on Windows uses a different command without the shell-script gotcha,
which should hopefully make things easier for new users in the future.

Thanks for the heads-up,
--
David
Reply all
Reply to author
Forward
0 new messages