problems with encoding and mercurial

Hi!

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: http://10.13.42.245/hg/client/"}, due to error: 'hg archive -t files -r 61d0999cdf40 /opt/TeamCity/temp/hg1' command failed.
stderr: ** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** 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>
mercurial.dispatch.run()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 27, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 64, in dispatch
return _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 696, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 472, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 786, in _runcommand
return checkargs()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 757, in checkargs
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 693, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 463, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 377, in archive
matchfn, prefix, subrepos=opts.get('subrepos'))
File "/usr/lib/python2.7/dist-packages/mercurial/archival.py", 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/archival.py", line 239, in write
data = getdata()
File "/usr/lib/python2.7/dist-packages/mercurial/context.py", line 462, in data
return self._filelog.read(self._filenode)
File "/usr/lib/python2.7/dist-packages/mercurial/filelog.py", line 38, in read
t = self.revision(node)
File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", 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 :)

2 comments
Comment actions Permalink

anyone can help me?
:_|

0
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.

0

Please sign in to leave a comment.