<< Back to previous view

[QB-704] Git plugin. Changeset: non-English log messages and file names are shown incorrectly
Created: 22/Oct/10  Updated: 29/Nov/10

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 3.1.0-beta1
Fix Version/s: 3.1.0

Type: Bug Priority: Minor
Reporter: Alexey Shumkin Assigned To: Robin Shen
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
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)

File Attachments: PNG File git-repo-changeset-error-all.png     JPEG File git-repo-changeset-error-eng.jpg     File .gitconfig     Zip Archive cygcheck.log.zip     PNG File git-repo-changeset-error.png     PNG File git-repo-changeset-ok.png     Zip Archive git-repo-test.bundle.zip     PNG File svn-repo-changeset-ok.png    

 Description   
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)

 Comments   
Comment by Alexey Shumkin [ 22/Oct/10 01:34 PM ]
Git changeset - incorrect view
Comment by Alexey Shumkin [ 22/Oct/10 01:34 PM ]
Git changeset - CORRECT view
Comment by Alexey Shumkin [ 22/Oct/10 01:35 PM ]
SVN changeset - CORRECT view with "English (USA)" regional settings
Comment by Alexey Shumkin [ 22/Oct/10 01:36 PM ]
"cygcheck -s" output
Comment by Alexey Shumkin [ 22/Oct/10 01:38 PM ]
test Git repo bundle with Russian filenames and log messages on Russian
Comment by Alexey Shumkin [ 22/Oct/10 01:40 PM ]
.gitconfig file (placed in %USERPROFILE% folder to Git work correctly on native Windows)
Comment by 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
Comment by Robin Shen [ 25/Oct/10 12:24 AM ]
Thanks for reporting. We will address this issue in 3.1 betea2.
Comment by 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 ))
Comment by Alexey Shumkin [ 26/Nov/10 03:43 PM ]
And "English (USA)" regional settings, too
Comment by 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.
Comment by 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!
Generated at Fri May 17 05:37:49 UTC 2024 using JIRA 189.