fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e414276
)
Umożliwianie ustawiania opisu zmian oraz nazwy użytkownika w unicode (utf-8).
author
Marek Stępniowski
<marek@stepniowski.com>
Fri, 7 Aug 2009 13:41:28 +0000
(15:41 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Fri, 7 Aug 2009 13:41:28 +0000
(15:41 +0200)
lib/hg.py
patch
|
blob
|
history
diff --git
a/lib/hg.py
b/lib/hg.py
index
535707d
..
a2702f6
100644
(file)
--- a/
lib/hg.py
+++ b/
lib/hg.py
@@
-1,7
+1,10
@@
# -*- coding: utf-8 -*-
import os
import codecs
# -*- coding: utf-8 -*-
import os
import codecs
-from mercurial import localrepo, ui, error, match, node
+from mercurial import localrepo, ui, error, match, node, encoding
+
+
+encoding.encoding = 'utf-8'
class RepositoryDoesNotExist(Exception):
class RepositoryDoesNotExist(Exception):
@@
-48,7
+51,7
@@
class Repository(object):
if path not in self._pending_files:
self._pending_files.append(path)
if path not in self._pending_files:
self._pending_files.append(path)
- def commit(self, message='hgshelve auto commit', key=None, user=None):
+ def commit(self, message=
u
'hgshelve auto commit', key=None, user=None):
"""
Commit unsynchronized data to disk.
Arguments::
"""
Commit unsynchronized data to disk.
Arguments::
@@
-56,6
+59,11
@@
class Repository(object):
- message: mercurial's changeset message
- key: supply to sync only one key
"""
- message: mercurial's changeset message
- key: supply to sync only one key
"""
+ if isinstance(message, unicode):
+ message = message.encode('utf-8')
+ if isinstance(user, unicode):
+ user = user.encode('utf-8')
+
commited = False
rev = None
files_to_add = []
commited = False
rev = None
files_to_add = []