Rev 4515: (mbp) integrated community patches to docs and OS locks in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jul 8 02:24:45 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4515 [merge]
revision-id: pqm at pqm.ubuntu.com-20090708012443-fd0130qlk7tfjy2q
parent: pqm at pqm.ubuntu.com-20090707105737-6s1x97fbhihlpvli
parent: mbp at sourcefrog.net-20090707234654-np06h03b0fbsyiz6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-07-08 02:24:43 +0100
message:
  (mbp) integrated community patches to docs and OS locks
modified:
  bzrlib/lock.py                 lock.py-20050527050856-ec090bb51bc03349
  bzrlib/tests/per_lock/__init__.py __init__.py-20070314201444-u92yjsqrkh2m3qcb-1
  bzrlib/tests/per_lock/test_lock.py test_lock.py-20070313190612-mfpoa7t8kvrgrhj2-1
  doc/en/tutorials/tutorial.txt  tutorial.txt-20050804190939-9dcbba2ef053bc84
=== modified file 'bzrlib/lock.py'
--- a/bzrlib/lock.py	2009-06-19 10:04:02 +0000
+++ b/bzrlib/lock.py	2009-07-07 09:00:59 +0000
@@ -301,13 +301,19 @@
 
 
 if have_pywin32 and sys.platform == 'win32':
+    if os.path.supports_unicode_filenames:
+        # for Windows NT/2K/XP/etc
+        win32file_CreateFile = win32file.CreateFileW
+    else:
+        # for Windows 98
+        win32file_CreateFile = win32file.CreateFile
 
     class _w32c_FileLock(_OSLock):
 
         def _open(self, filename, access, share, cflags, pymode):
             self.filename = osutils.realpath(filename)
             try:
-                self._handle = win32file.CreateFile(filename, access, share,
+                self._handle = win32file_CreateFile(filename, access, share,
                     None, win32file.OPEN_ALWAYS,
                     win32file.FILE_ATTRIBUTE_NORMAL, None)
             except pywintypes.error, e:

=== modified file 'bzrlib/tests/per_lock/__init__.py'
--- a/bzrlib/tests/per_lock/__init__.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/per_lock/__init__.py	2009-07-07 09:00:59 +0000
@@ -39,7 +39,6 @@
     return result
 
 
-
 def load_tests(standard_tests, module, loader):
     submod_tests = loader.loadTestsFromModuleNames([
         'bzrlib.tests.per_lock.test_lock',

=== modified file 'bzrlib/tests/per_lock/test_lock.py'
--- a/bzrlib/tests/per_lock/test_lock.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/per_lock/test_lock.py	2009-07-07 09:00:59 +0000
@@ -21,6 +21,7 @@
     osutils,
     )
 
+from bzrlib.tests import UnicodeFilenameFeature
 from bzrlib.tests.per_lock import TestCaseWithLock
 
 
@@ -160,3 +161,18 @@
                 b_lock.unlock()
             if c_lock is not None:
                 c_lock.unlock()
+
+
+class TestLockUnicodePath(TestCaseWithLock):
+
+    _test_needs_features = [UnicodeFilenameFeature]
+
+    def test_read_lock(self):
+        self.build_tree([u'\u1234'])
+        u_lock = self.read_lock(u'\u1234')
+        self.addCleanup(u_lock.unlock)
+
+    def test_write_lock(self):
+        self.build_tree([u'\u1234'])
+        u_lock = self.write_lock(u'\u1234')
+        self.addCleanup(u_lock.unlock)

=== modified file 'doc/en/tutorials/tutorial.txt'
--- a/doc/en/tutorials/tutorial.txt	2009-06-09 09:59:43 +0000
+++ b/doc/en/tutorials/tutorial.txt	2009-06-27 08:10:13 +0000
@@ -117,35 +117,35 @@
 address by looking up your username and hostname. If you don't like the
 guess that Bazaar makes, then three options exist:
 
- 1. Set an email address via ``bzr whoami``.  This is the simplest way.
-
-    To set a global identity, use::
- 
-    % bzr whoami "Your Name <email at example.com>"
- 
-    If you'd like to use a different address for a specific branch, enter
-    the branch folder and use::
- 
-    % bzr whoami --branch "Your Name <email at example.com>"
- 
- #. Setting the email address in the ``~/.bazaar/bazaar.conf`` [1]_ by
-    adding the following lines.  Please note that  ``[DEFAULT]`` is case
-    sensitive::
-
-        [DEFAULT]
-        email=Your Name <email at isp.com>
-
-    As above, you can override this settings on a branch by branch basis
-    by creating a branch section in ``~/.bazaar/locations.conf`` and
-    adding the following lines::
-
-        [/the/path/to/the/branch]
-        email=Your Name <email at isp.com>
-
-
- #. Overriding the two previous options by setting the global environment
-    variable ``$BZR_EMAIL`` or ``$EMAIL`` (``$BZR_EMAIL`` will take
-    precedence) to your full email address.
+1. Set an email address via ``bzr whoami``.  This is the simplest way.
+
+   To set a global identity, use::
+
+   % bzr whoami "Your Name <email at example.com>"
+
+   If you'd like to use a different address for a specific branch, enter
+   the branch folder and use::
+
+   % bzr whoami --branch "Your Name <email at example.com>"
+
+#. Setting the email address in the ``~/.bazaar/bazaar.conf`` [1]_ by
+   adding the following lines.  Please note that  ``[DEFAULT]`` is case
+   sensitive::
+
+       [DEFAULT]
+       email=Your Name <email at isp.com>
+
+   As above, you can override this settings on a branch by branch basis
+   by creating a branch section in ``~/.bazaar/locations.conf`` and
+   adding the following lines::
+
+       [/the/path/to/the/branch]
+       email=Your Name <email at isp.com>
+
+
+#. Overriding the two previous options by setting the global environment
+   variable ``$BZR_EMAIL`` or ``$EMAIL`` (``$BZR_EMAIL`` will take
+   precedence) to your full email address.
 
 .. [1] On Windows, the users configuration files can be found in the
    application data directory. So instead of ``~/.bazaar/branch.conf``
@@ -459,9 +459,9 @@
 directory.  This is a bit different to CVS, which requires that you also
 do ``cvs remove``.
 
-    ``bzr remove`` makes the file un-versioned, but may or may not delete
-    the working copy [2]_.  This is useful when you add the wrong file,
-    or decide that a file should actually not be versioned. 
+``bzr remove`` makes the file un-versioned, but may or may not delete the
+working copy [2]_.  This is useful when you add the wrong file, or decide that
+a file should actually not be versioned. 
 
 ::
 
@@ -570,10 +570,9 @@
   uses rsync to push the changes to the revision history and the working
   tree.
 
-You can also use copy the files around manually, by sending a tarball, or
-using rsync, or other related file transfer methods.  This is usually
-less safe than using ``push``, but may be faster or easier in some
-situations.
+* You can also copy the files around manually, by sending a tarball, or using
+  rsync, or other related file transfer methods.  This is usually less safe
+  than using ``push``, but may be faster or easier in some situations.
 
 Moving changes between trees 
 ============================




More information about the bazaar-commits mailing list