changeset 11314:c34dcc085da6

Merge with mpm
author Martin Geisler <mg@aragost.com>
date Wed, 09 Jun 2010 17:50:45 +0200
parents 0bb14798cd07 (current diff) 3f1409082720 (diff)
children 666b62c52767
files
diffstat 3 files changed, 30 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Wed Jun 09 17:27:47 2010 +0200
+++ b/mercurial/hg.py	Wed Jun 09 17:50:45 2010 +0200
@@ -30,8 +30,10 @@
         if branch == '.':
             if not lrepo or not lrepo.local():
                 raise util.Abort(_("dirstate branch not accessible"))
-            branch = lrepo.dirstate.branch()
-        butf8 = encoding.fromlocal(branch)
+            butf8 = lrepo.dirstate.branch()
+            branch = encoding.tolocal(butf8)
+        else:
+            butf8 = encoding.fromlocal(branch)
         if butf8 in branchmap:
             revs.extend(node.hex(r) for r in reversed(branchmap[butf8]))
         else:
--- a/tests/test-branch-option	Wed Jun 09 17:27:47 2010 +0200
+++ b/tests/test-branch-option	Wed Jun 09 17:50:45 2010 +0200
@@ -20,6 +20,14 @@
 echo b > foo
 hg ci -d '0 0' -mb
 hg up 0
+hg --encoding utf-8 branch æ
+echo ae1 > foo
+hg ci -d '0 0' -mae1
+hg up 0
+hg --encoding utf-8 branch -f æ
+echo ae2 > foo
+hg ci -d '0 0' -mae2
+hg up 0
 hg branch -f b
 echo b2 > foo
 hg ci -d '0 0' -mb2
@@ -30,6 +38,10 @@
 echo out branch .
 hg out -q ../branch#.
 hg out -q -b .
+echo out branch . non-ascii
+hg --encoding utf-8 up æ
+hg --encoding latin1 out -q ../branch#.
+hg --encoding latin1 out -q -b .
 echo clone branch b
 cd ..
 hg clone branch2#b branch3
--- a/tests/test-branch-option.out	Wed Jun 09 17:27:47 2010 +0200
+++ b/tests/test-branch-option.out	Wed Jun 09 17:50:45 2010 +0200
@@ -12,6 +12,12 @@
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 marked working directory as branch b
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch æ
+created new head
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+marked working directory as branch æ
+created new head
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 marked working directory as branch b
 in rev c branch a
 1:dd6e60a716c6
@@ -20,9 +26,15 @@
 2:f25d57ab0566
 out branch .
 1:b84708d77ab7
-2:65511d0e2b55
+4:65511d0e2b55
 1:b84708d77ab7
-2:65511d0e2b55
+4:65511d0e2b55
+out branch . non-ascii
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+2:df5a44224d4e
+3:4f4a5125ca10
+2:df5a44224d4e
+3:4f4a5125ca10
 clone branch b
 requesting all changes
 adding changesets