History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-704
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Robin Shen
Reporter: Alexey Shumkin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Git plugin. Changeset: non-English log messages and file names are shown incorrectly

Created: 22/Oct/10 01:33 PM   Updated: 29/Nov/10 11:38 AM
Component/s: None
Affects Version/s: 3.1.0-beta1
Fix Version/s: 3.1.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. File .gitconfig (0.1 kb)
2. Zip Archive cygcheck.log.zip (5 kb)
3. Zip Archive git-repo-test.bundle.zip (3 kb)

Image Attachments:

1. git-repo-changeset-error-all.png
(42 kb)

2. git-repo-changeset-error-eng.jpg
(122 kb)

3. git-repo-changeset-error.png
(70 kb)

4. git-repo-changeset-ok.png
(69 kb)

5. svn-repo-changeset-ok.png
(69 kb)
Environment:
Operating System Windows 2003 5.2, x86
JVM Java HotSpot(TM) Client VM 17.0-b17, Sun Microsystems Inc.
QuickBuild Version 3.1.0-beta1 - Tue Oct 19 03:36:59 MSD 2010
Git (v1.7.3; compiled from sources) under Cygwin (v1.5)


 Description  « Hide
Non-English log messages and file names are shown incorrectly when "English(USA)" regional settings are set

Prerequisites

Repo:
Note: Git is usually is used under Cygwin. Nevertheless it can be run under native Windows and work correctly (as Java is run under Windows, not Cygwin)
1. Configure Git to work correctly with your codepage (cp1251 in my case; see attached ".gitconfig")
2. Create test Git repository
3. Make first commit

OS:
1. Set regional settings to "English (USA)" for <test-user> (this is done for a project tests (they are run by QB) which must pass with such a regional settings)

QB:
1. Start QB server under <test-user>
2. Create config using Git repo created above.
3. To reproduce error it is enough to setup "checkout from repo" step
4. Optionally repo label step can be set.

Steps
1. Start configuration build. Wait for first build
2. As changesets are calculated between builds modify repo: add/change files. Filenames must contain non-English characters (Russian in my case)
3. Commit changes. Log message also must contain non-English characters (Russian, of course ))
4. Start build again.
5. See changesets with invalid filenames and log messages (see screenshot "git-repo-changeset-error.png")

Expected:
AFAIK, log messages and filenames are stored in Git repo in UTF-8 encoding. So, I expect its representation in changeset to be independent of regional settings (as for SVN, for example)

Correct behaviour can be achieved with steps:
Change regional settings for <test-user> to appropriate ones ("Russian" for me).
Restart QB server (to make regional settings applied)
Delete last build with invalid characters in changeset
Start build again (to make changeset)
Changeset is shown CORRECTLY (see screenshot "git-repo-changeset-ok.png")

For SVN plugin such a change of regional settings does not matter (see screenshot "svn-repo-changeset-ok.png" for "English (USA)" settings)
Note: regional settings that was set at the moment of making changeset can be verified at Action column: date representation depends on it)

 All   Comments   Work Log   Change History      Sort Order:
Alexey Shumkin [22/Oct/10 01:34 PM]
Git changeset - incorrect view

Alexey Shumkin [22/Oct/10 01:34 PM]
Git changeset - CORRECT view

Alexey Shumkin [22/Oct/10 01:35 PM]
SVN changeset - CORRECT view with "English (USA)" regional settings

Alexey Shumkin [22/Oct/10 01:36 PM]
"cygcheck -s" output

Alexey Shumkin [22/Oct/10 01:38 PM]
test Git repo bundle with Russian filenames and log messages on Russian

Alexey Shumkin [22/Oct/10 01:40 PM]
.gitconfig file (placed in %USERPROFILE% folder to Git work correctly on native Windows)

Alexey Shumkin [22/Oct/10 04:13 PM]
additional info:
QB server is run in console mode (so .gitconfig is in %USERPROFILE% is used)

Note: when QB is run as a service, %USERPROFILE%/.gitconfig is not searched by Git, but %CYGWIN_PATH%/etc/gitconfig file is searched

Robin Shen [25/Oct/10 12:24 AM]
Thanks for reporting. We will address this issue in 3.1 betea2.

Alexey Shumkin [26/Nov/10 03:36 PM]
Error still is reproduced :(
Even more: worked earlier configuration is now broken (see "At" column to check regional settings) :((

Please revert it back, at least ))

Alexey Shumkin [26/Nov/10 03:43 PM]
And "English (USA)" regional settings, too

Robin Shen [27/Nov/10 12:53 AM]
We parse log messages and file names in UTF-8 format, and tested with non-ascii characters and it turns out to be working. Is it possible that your comment is using the OS native encoding instead of UTF-8.

Alexey Shumkin [29/Nov/10 11:38 AM]
>>Is it possible that your comment is using the OS native encoding instead of UTF-8.
Of course
see "Prerequisites, Repo: "
>>1. Configure Git to work correctly with your codepage (cp1251 in my case; see attached ".gitconfig")

So, I commented out in %CYGWIN_PATH%/etc/gitconfig
[i18n]
# logOutputEncoding = cp1251
And it works now!

Thanks!