problems with encoding and mercurial


We're transfer our teamcity server 8.1 (with internal databse@windows with "file.encoding=cp1251", "sun.jnu.encoding=Cp1251") to new server (debian wheezy, w/ external mysql (utf-8), "file.encoding=UTF-8", "sun.jnu.encoding=UTF-8"): create backups from old server and restore it at new TS.

1. We got some problems with git\mercurial russian commits and usernames with russian characters such as "???". How to fix it correctly?
2. Git's repositories works fine, but we have problem with mercurial. "Test connection" is ok. But when we start build we got this:

Failed to build patch for build #1685 {build id=18814}, VCS root: "client-repository" {instance id=134, parent internal id=11, parent id=client_repository, description: "mercurial:"}, due to error: 'hg archive -t files -r 61d0999cdf40 /opt/TeamCity/temp/hg1' command failed.
stderr: ** unknown exception encountered, please report by visiting
** Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2]
** Mercurial Distributed SCM (version 2.2.2)
** Extensions loaded:
Traceback (most recent call last):knights-
File "/usr/bin/hg", line 38, in <module>
File "/usr/lib/python2.7/dist-packages/mercurial/", line 27, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 64, in dispatch
return _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 87, in _runcatch
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 696, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 472, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 786, in _runcommand
return checkargs()
File "/usr/lib/python2.7/dist-packages/mercurial/", line 757, in checkargs
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/", line 693, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 463, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 377, in archive
matchfn, prefix, subrepos=opts.get('subrepos'))
File "/usr/lib/python2.7/dist-packages/mercurial/", line 274, in archive
write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 239, in write
data = getdata()
File "/usr/lib/python2.7/dist-packages/mercurial/", line 462, in data
File "/usr/lib/python2.7/dist-packages/mercurial/", line 38, in read
t = self.revision(node)
File "/usr/lib/python2.7/dist-packages/mercurial/", line 929, in revision
text = mdiff.patches(text, bins)
mpatch.mpatchError: patch cannot be decoded

From new TC server i can clone mercurial repositories without any problems.
What's wrong?

Thanks anyway :)

Comment actions Permalink

anyone can help me?

Comment actions Permalink

#1 can probably be fixed, by taking a backup from Windows machine, then going to backup/database_dump directory, then replace encoding for files from windows-1251 to utf-8.

#2 please go to admin->diagnostics, enable DEBUG-VCS logging mode, then try to the a hg checkout, then open teamcity-vcs.log and check for hg command that teamcity executes.


Please sign in to leave a comment.