##// END OF EJS Templates
log: convert branch names to the local encoding
Alexis S. L. Carvalho -
r3827:3674ca80 default
parent child Browse files
Show More
@@ -261,6 +261,7 b' class changeset_printer(object):'
261 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)))
261 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)))
262
262
263 if branch:
263 if branch:
264 branch = util.tolocal(branch)
264 self.ui.write(_("branch: %s\n") % branch)
265 self.ui.write(_("branch: %s\n") % branch)
265 for tag in self.repo.nodetags(changenode):
266 for tag in self.repo.nodetags(changenode):
266 self.ui.write(_("tag: %s\n") % tag)
267 self.ui.write(_("tag: %s\n") % tag)
@@ -404,6 +405,7 b' class changeset_templater(changeset_prin'
404 def showbranches(**args):
405 def showbranches(**args):
405 branch = changes[5].get("branch")
406 branch = changes[5].get("branch")
406 if branch:
407 if branch:
408 branch = util.tolocal(branch)
407 return showlist('branch', [branch], plural='branches', **args)
409 return showlist('branch', [branch], plural='branches', **args)
408 # add old style branches if requested
410 # add old style branches if requested
409 if self.brinfo:
411 if self.brinfo:
@@ -25,6 +25,9 b' echo "utf-8" > a'
25 HGENCODING=utf-8 hg ci -l utf-8 -d "0 0"
25 HGENCODING=utf-8 hg ci -l utf-8 -d "0 0"
26
26
27 HGENCODING=latin-1 hg tag -d "0 0" `cat latin-1-tag`
27 HGENCODING=latin-1 hg tag -d "0 0" `cat latin-1-tag`
28 cp latin-1-tag .hg/branch
29 HGENCODING=latin-1 hg ci -d "0 0" -m 'latin1 branch'
30 rm .hg/branch
28
31
29 echo % ascii
32 echo % ascii
30 hg --encoding ascii log
33 hg --encoding ascii log
@@ -38,3 +41,9 b' echo % latin-1'
38 HGENCODING=latin-1 hg tags
41 HGENCODING=latin-1 hg tags
39 echo % utf-8
42 echo % utf-8
40 HGENCODING=utf-8 hg tags
43 HGENCODING=utf-8 hg tags
44 echo % ascii
45 HGENCODING=ascii hg branches
46 echo % latin-1
47 HGENCODING=latin-1 hg branches
48 echo % utf-8
49 HGENCODING=utf-8 hg branches
@@ -15,8 +15,14 b' transaction abort!'
15 rollback completed
15 rollback completed
16 % these should work
16 % these should work
17 % ascii
17 % ascii
18 changeset: 4:d8a5d9eaf41e
19 branch: ?
20 tag: tip
21 user: test
22 date: Thu Jan 01 00:00:00 1970 +0000
23 summary: latin1 branch
24
18 changeset: 3:5edfc7acb541
25 changeset: 3:5edfc7acb541
19 tag: tip
20 user: test
26 user: test
21 date: Thu Jan 01 00:00:00 1970 +0000
27 date: Thu Jan 01 00:00:00 1970 +0000
22 summary: Added tag ? for changeset 91878608adb3
28 summary: Added tag ? for changeset 91878608adb3
@@ -38,8 +44,14 b' date: Thu Jan 01 00:00:00 1970 +0'
38 summary: latin-1 e': ?
44 summary: latin-1 e': ?
39
45
40 % latin-1
46 % latin-1
47 changeset: 4:d8a5d9eaf41e
48 branch: �
49 tag: tip
50 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: latin1 branch
53
41 changeset: 3:5edfc7acb541
54 changeset: 3:5edfc7acb541
42 tag: tip
43 user: test
55 user: test
44 date: Thu Jan 01 00:00:00 1970 +0000
56 date: Thu Jan 01 00:00:00 1970 +0000
45 summary: Added tag � for changeset 91878608adb3
57 summary: Added tag � for changeset 91878608adb3
@@ -61,8 +73,14 b' date: Thu Jan 01 00:00:00 1970 +0'
61 summary: latin-1 e': �
73 summary: latin-1 e': �
62
74
63 % utf-8
75 % utf-8
76 changeset: 4:d8a5d9eaf41e
77 branch: é
78 tag: tip
79 user: test
80 date: Thu Jan 01 00:00:00 1970 +0000
81 summary: latin1 branch
82
64 changeset: 3:5edfc7acb541
83 changeset: 3:5edfc7acb541
65 tag: tip
66 user: test
84 user: test
67 date: Thu Jan 01 00:00:00 1970 +0000
85 date: Thu Jan 01 00:00:00 1970 +0000
68 summary: Added tag é for changeset 91878608adb3
86 summary: Added tag é for changeset 91878608adb3
@@ -84,11 +102,17 b' date: Thu Jan 01 00:00:00 1970 +0'
84 summary: latin-1 e': é
102 summary: latin-1 e': é
85
103
86 % ascii
104 % ascii
87 tip 3:5edfc7acb541
105 tip 4:d8a5d9eaf41e
88 ? 2:91878608adb3
106 ? 2:91878608adb3
89 % latin-1
107 % latin-1
90 tip 3:5edfc7acb541
108 tip 4:d8a5d9eaf41e
91 � 2:91878608adb3
109 � 2:91878608adb3
92 % utf-8
110 % utf-8
93 tip 3:5edfc7acb541
111 tip 4:d8a5d9eaf41e
94 é 2:91878608adb3
112 é 2:91878608adb3
113 % ascii
114 ? 4:d8a5d9eaf41e
115 % latin-1
116 � 4:d8a5d9eaf41e
117 % utf-8
118 é 4:d8a5d9eaf41e
General Comments 0
You need to be logged in to leave comments. Login now