Rev 3100: Allow 'bzr commit --author' to take a unicode string. in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/unicode_commit_author

John Arbash Meinel john at arbash-meinel.com
Mon Dec 10 16:39:29 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/unicode_commit_author

------------------------------------------------------------
revno: 3100
revision-id:john at arbash-meinel.com-20071210163900-2wo190x3shshcvup
parent: pqm at pqm.ubuntu.com-20071210120611-a3j02d26cbzvlyju
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: unicode_commit_author
timestamp: Mon 2007-12-10 10:39:00 -0600
message:
  Allow 'bzr commit --author' to take a unicode string.
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-12-09 06:35:14 +0000
+++ b/bzrlib/builtins.py	2007-12-10 16:39:00 +0000
@@ -2231,7 +2231,7 @@
                     "files in the working tree."),
              ListOption('fixes', type=str,
                     help="Mark a bug as being fixed by this revision."),
-             Option('author', type=str,
+             Option('author', type=unicode,
                     help="Set the author's name, if it's different "
                          "from the committer."),
              Option('local',

=== modified file 'bzrlib/tests/blackbox/test_commit.py'
--- a/bzrlib/tests/blackbox/test_commit.py	2007-11-30 02:06:35 +0000
+++ b/bzrlib/tests/blackbox/test_commit.py	2007-12-10 16:39:00 +0000
@@ -520,11 +520,12 @@
         tree = self.make_branch_and_tree('tree')
         self.build_tree(['tree/hello.txt'])
         tree.add('hello.txt')
-        self.run_bzr("commit -m hello --author='John Doe <jdoe at example.com>' "
-                     "tree/hello.txt")
+        self.run_bzr(["commit", '-m', 'hello',
+                      '--author', u'John D\xf6 <jdoe at example.com>',
+                     "tree/hello.txt"])
         last_rev = tree.branch.repository.get_revision(tree.last_revision())
         properties = last_rev.properties
-        self.assertEqual('John Doe <jdoe at example.com>', properties['author'])
+        self.assertEqual(u'John D\xf6 <jdoe at example.com>', properties['author'])
 
     def test_author_no_email(self):
         """Author's name without an email address is allowed, too."""



More information about the bazaar-commits mailing list