Rev 1960: Merge trunk. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Sat Nov 8 14:31:21 GMT 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1960
revision-id: jelmer at samba.org-20081108143115-n4ehrzyo2s5tlf9d
parent: jelmer at samba.org-20081108142308-t2ff0yuw5jorx8yp
parent: jelmer at samba.org-20081107132007-1it2g93hxzdvzy0q
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-11-08 15:31:15 +0100
message:
  Merge trunk.
modified:
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
  foreign/__init__.py            foreign.py-20080827193306-rxeku2c2obec90c4-1
  mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
  mapping4.py                    mapping4.py-20080827182338-y4xzpsf43vyiwcir-1
  repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
  subvertpy/subvertpy/client.c   client.pyx-20080313235339-wbyjbw2namuiql8f-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1929.1.26
    revision-id: jelmer at samba.org-20081107132007-1it2g93hxzdvzy0q
    parent: jelmer at samba.org-20081107131940-a3m6gi3p74quthm2
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Fri 2008-11-07 14:20:07 +0100
    message:
      Set user-agent revision property, for example so we can filter out erroneous revisions later.
    modified:
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
      mapping4.py                    mapping4.py-20080827182338-y4xzpsf43vyiwcir-1
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1929.1.25
    revision-id: jelmer at samba.org-20081107131940-a3m6gi3p74quthm2
    parent: jelmer at samba.org-20081107131927-1bnej31fmjqa2gs1
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Fri 2008-11-07 14:19:40 +0100
    message:
      Fix error in test.
    modified:
      branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
    ------------------------------------------------------------
    revno: 1929.1.24
    revision-id: jelmer at samba.org-20081107131927-1bnej31fmjqa2gs1
    parent: jelmer at samba.org-20081105203531-ji8vkslzgf4bom3c
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Fri 2008-11-07 14:19:27 +0100
    message:
      Fix syntax error.
    modified:
      repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
    ------------------------------------------------------------
    revno: 1929.1.23
    revision-id: jelmer at samba.org-20081105203531-ji8vkslzgf4bom3c
    parent: jelmer at samba.org-20081105202803-h1awtij5tbc553sv
    parent: jelmer at samba.org-20081105190148-5wu9jr0p4dwt00q0
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Wed 2008-11-05 21:35:31 +0100
    message:
      merge 0.4.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
        ------------------------------------------------------------
        revno: 1669.8.5
        revision-id: jelmer at samba.org-20081105190148-5wu9jr0p4dwt00q0
        parent: jelmer at samba.org-20081105185800-mbveowwy4d25s3om
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Wed 2008-11-05 20:01:48 +0100
        message:
          Mention bug #
        modified:
          NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
        ------------------------------------------------------------
        revno: 1669.8.4
        revision-id: jelmer at samba.org-20081105185800-mbveowwy4d25s3om
        parent: jelmer at samba.org-20081103141047-yngwlay84xy7xi2n
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Wed 2008-11-05 19:58:00 +0100
        message:
          Fix another bug handling files as tags.
        modified:
          NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
          repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
    ------------------------------------------------------------
    revno: 1929.1.22
    revision-id: jelmer at samba.org-20081105202803-h1awtij5tbc553sv
    parent: jelmer at samba.org-20081105201533-w0q6w0pyi243gfoq
    parent: jelmer at samba.org-20081103035500-ekmm1fam44l875aq
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Wed 2008-11-05 21:28:03 +0100
    message:
      Merge trunk.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
      mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
      revmeta.py                     revmeta.py-20080901215045-n8a6arqybs9ez5hl-1
      subvertpy/subvertpy/client.c   client.pyx-20080313235339-wbyjbw2namuiql8f-1
      subvertpy/subvertpy/delta.py   delta.py-20080316001917-xyng7m3jlxvdc4c9-1
      subvertpy/subvertpy/editor.h   editor.h-20080602191336-frj7az1sdk13o1tw-2
      subvertpy/subvertpy/ra.c       ra.pyx-20080313140933-qybkqaxe3m4mcll7-1
      subvertpy/subvertpy/wc.c       wc.pyx-20080313142018-10l8l23vha2j9e6b-1
      tests/test_commit.py           test_commit.py-20060624213521-l5kcufywkh9mnilk-1
      tests/test_mapping.py          test_mapping.py-20080201131338-0zd86eznn4bojtee-1
      tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
    ------------------------------------------------------------
    revno: 1929.1.21
    revision-id: jelmer at samba.org-20081105201533-w0q6w0pyi243gfoq
    parent: jelmer at samba.org-20081030212127-o3qh2q4lme1x5hpe
    parent: jelmer at samba.org-20081105201428-wdna6mc47zdeb0w6
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Wed 2008-11-05 21:15:33 +0100
    message:
      Move hack for escaping commit message to bzr-foreign.
    modified:
      fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
      foreign/__init__.py            foreign.py-20080827193306-rxeku2c2obec90c4-1
        ------------------------------------------------------------
        revno: 0.5.17
        revision-id: jelmer at samba.org-20081105201428-wdna6mc47zdeb0w6
        parent: jelmer at samba.org-20080930203134-76qinvlamxl3lstm
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: trunk
        timestamp: Wed 2008-11-05 21:14:28 +0100
        message:
          Import escape commit message function.
        modified:
          __init__.py                    foreign.py-20080827193306-rxeku2c2obec90c4-1
    ------------------------------------------------------------
    revno: 1929.1.20
    revision-id: jelmer at samba.org-20081030212127-o3qh2q4lme1x5hpe
    parent: jelmer at samba.org-20081015211712-8zylfzyft3wgjwy6
    parent: jelmer at samba.org-20081030205059-uae7dcrznb89u2sv
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Thu 2008-10-30 22:21:27 +0100
    message:
      Merge 0.4.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
      remote.py                      format.py-20060406233823-b6fa009fe35dfde7
      subvertpy/subvertpy/client.c   client.pyx-20080313235339-wbyjbw2namuiql8f-1
      subvertpy/subvertpy/editor.c   editor.c-20080602191336-frj7az1sdk13o1tw-1
      tests/test_push.py             test_push.py-20070201165715-g2ievcdfqi33wqsy-1
=== modified file 'NEWS'
--- a/NEWS	2008-11-03 14:35:35 +0000
+++ b/NEWS	2008-11-08 14:31:15 +0000
@@ -60,6 +60,10 @@
 
     + Standard commit code provides commit notification. (#79333)
 
+bzr-svn 0.4.15	UNRELEASED
+
+   * Ignore tags that happen to be files. (#294283)
+
 bzr-svn 0.4.14	2008-11-03
 
   BUG FIXES

=== modified file '__init__.py'
--- a/__init__.py	2008-11-03 14:35:35 +0000
+++ b/__init__.py	2008-11-08 14:31:15 +0000
@@ -72,6 +72,12 @@
 
     mutter("bzr-svn: using Subversion %d.%d.%d (%s)" % ra_version)
 
+
+def get_client_string():
+    """Return a string that can be send as part of the User Agent string."""
+    return "bzr%s+bzr-svn%s" % (bzrlib.__version__, __version__)
+
+
 # Find subvertpy, somehow
 try:
     import subvertpy 

=== modified file 'commit.py'
--- a/commit.py	2008-11-03 18:51:14 +0000
+++ b/commit.py	2008-11-08 14:31:15 +0000
@@ -163,7 +163,8 @@
     # Loop over entries of file_id in old_inv
     # remove if they no longer exist with the same name
     # or parents
-    if (file_id in old_inv and old_inv[file_id].kind == 'directory'):
+    if (file_id in old_inv and 
+        old_inv[file_id].kind == 'directory'):
         for child_name in old_inv[file_id].children:
             child_ie = old_inv.get_child(file_id, child_name)
             # remove if...

=== modified file 'fetch.py'
--- a/fetch.py	2008-11-03 03:55:00 +0000
+++ b/fetch.py	2008-11-05 20:28:03 +0000
@@ -28,33 +28,13 @@
 from subvertpy import properties
 from subvertpy.delta import apply_txdelta_handler
 from bzrlib.plugins.svn.errors import InvalidFileName
+from bzrlib.plugins.svn.foreign import escape_commit_message
 from bzrlib.plugins.svn.mapping import (SVN_PROP_BZR_PREFIX)
 from bzrlib.plugins.svn.repository import SvnRepository, SvnRepositoryFormat
 from bzrlib.plugins.svn.transport import _url_escape_uri
 
 FETCH_COMMIT_WRITE_SIZE = 500
 
-def _escape_commit_message(message):
-    """Replace xml-incompatible control characters."""
-    if message is None:
-        return None
-    import re
-    # FIXME: RBC 20060419 this should be done by the revision
-    # serialiser not by commit. Then we can also add an unescaper
-    # in the deserializer and start roundtripping revision messages
-    # precisely. See repository_implementations/test_repository.py
-    
-    # Python strings can include characters that can't be
-    # represented in well-formed XML; escape characters that
-    # aren't listed in the XML specification
-    # (http://www.w3.org/TR/REC-xml/#NT-Char).
-    message, _ = re.subn(
-        u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]+',
-        lambda match: match.group(0).encode('unicode_escape'),
-        message)
-    return message
-
-
 def md5_strings(strings):
     """Return the MD5sum of the concatenation of strings.
 
@@ -402,7 +382,7 @@
         rev = self.revmeta.get_revision(self.mapping)
         self.inventory.revision_id = self.revid
         # Escaping the commit message is really the task of the serialiser
-        rev.message = _escape_commit_message(rev.message)
+        rev.message = escape_commit_message(rev.message)
         rev.inventory_sha1 = None
         assert self.inventory.root.revision is not None
         self.target.add_revision(self.revid, rev, self.inventory)

=== modified file 'foreign/__init__.py'
--- a/foreign/__init__.py	2008-09-30 20:33:04 +0000
+++ b/foreign/__init__.py	2008-11-05 20:15:33 +0000
@@ -173,3 +173,25 @@
     suite.addTest(loader.loadTestsFromModuleNames(testmod_names))
     return suite
 
+def escape_commit_message(message):
+    """Replace xml-incompatible control characters."""
+    if message is None:
+        return None
+    import re
+    # FIXME: RBC 20060419 this should be done by the revision
+    # serialiser not by commit. Then we can also add an unescaper
+    # in the deserializer and start roundtripping revision messages
+    # precisely. See repository_implementations/test_repository.py
+    
+    # Python strings can include characters that can't be
+    # represented in well-formed XML; escape characters that
+    # aren't listed in the XML specification
+    # (http://www.w3.org/TR/REC-xml/#NT-Char).
+    message, _ = re.subn(
+        u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]+',
+        lambda match: match.group(0).encode('unicode_escape'),
+        message)
+    return message
+
+
+

=== modified file 'mapping.py'
--- a/mapping.py	2008-10-15 16:56:33 +0000
+++ b/mapping.py	2008-11-07 13:20:07 +0000
@@ -40,6 +40,7 @@
 SVN_REVPROP_BZR_COMMITTER = 'bzr:committer'
 SVN_REVPROP_BZR_FILEIDS = 'bzr:file-ids'
 SVN_REVPROP_BZR_MAPPING_VERSION = 'bzr:mapping-version'
+SVN_REVPROP_BZR_USER_AGENT = 'bzr:user-agent'
 SVN_REVPROP_BZR_MERGE = 'bzr:merge'
 SVN_REVPROP_BZR_REVISION_ID = 'bzr:revision-id'
 SVN_REVPROP_BZR_REVNO = 'bzr:revno'

=== modified file 'mapping4.py'
--- a/mapping4.py	2008-09-11 14:31:28 +0000
+++ b/mapping4.py	2008-11-07 13:20:07 +0000
@@ -15,7 +15,7 @@
 
 from bzrlib import errors
 
-from bzrlib.plugins.svn import mapping
+from bzrlib.plugins.svn import mapping, get_client_string
 from bzrlib.plugins.svn.layout.standard import RootLayout, TrunkLayout
 
 supported_features = set()
@@ -125,6 +125,7 @@
             self.revprops.export_revision(branch_root, timestamp, timezone, committer, 
                                           revprops, revision_id, revno, parent_ids, svn_revprops, svn_fileprops)
             svn_revprops[mapping.SVN_REVPROP_BZR_MAPPING_VERSION] = self.name
+            svn_revprops[mapping.SVN_REVPROP_BZR_USER_AGENT] = get_client_string()
         else:
             self.fileprops.export_revision(branch_root, timestamp, timezone, committer, 
                                       revprops, revision_id, revno, parent_ids, svn_revprops, svn_fileprops)

=== modified file 'repository.py'
--- a/repository.py	2008-11-03 14:35:35 +0000
+++ b/repository.py	2008-11-08 14:31:15 +0000
@@ -672,7 +672,10 @@
                             if not changes.changes_path(newpaths, p, False) and layout.is_branch(cf):
                                 tp = cf
                                 tr = self._log.find_latest_change(cf, cr)
-                            tag_changes[p] = self.generate_revision_id(tr, tp, mapping)
+                            try:
+                                tag_changes[p] = self.generate_revision_id(tr, tp, mapping)
+                            except SubversionException, (_, errors.ERR_FS_NOT_DIRECTORY):
+                                pass
                         else:
                             try:
                                 tag_changes[bp] = self._revmeta_provider.get_revision(bp, revnum, revprops=revprops).get_revision_id(mapping)

=== modified file 'subvertpy/subvertpy/client.c'
--- a/subvertpy/subvertpy/client.c	2008-11-03 14:35:35 +0000
+++ b/subvertpy/subvertpy/client.c	2008-11-08 14:31:15 +0000
@@ -803,8 +803,6 @@
 
 void initclient(void)
 {
-    extern void initeditor(void);
-
 	PyObject *mod;
 
 	if (PyType_Ready(&Client_Type) < 0)
@@ -816,8 +814,6 @@
 	if (PyType_Ready(&ConfigItem_Type) < 0)
 		return;
 
-    initeditor();
-
 	/* Make sure APR is initialized */
 	apr_initialize();
 

=== modified file 'transport.py'
--- a/transport.py	2008-10-02 21:18:28 +0000
+++ b/transport.py	2008-11-07 13:20:07 +0000
@@ -33,11 +33,7 @@
 
 svn_config = get_config()
 
-def get_client_string():
-    """Return a string that can be send as part of the User Agent string."""
-    return "bzr%s+bzr-svn%s" % (bzrlib.__version__, bzrlib.plugins.svn.__version__)
 
- 
 # Don't run any tests on SvnTransport as it is not intended to be 
 # a full implementation of Transport
 def get_test_permutations():
@@ -109,7 +105,7 @@
         mutter('opening SVN RA connection to %r' % url)
         ret = ra.RemoteAccess(url.encode('utf8'), 
                 auth=create_auth_baton(url),
-                client_string_func=get_client_string)
+                client_string_func=bzrlib.plugins.svn.get_client_string)
         if 'transport' in debug.debug_flags:
             ret = MutteringRemoteAccess(ret)
     except SubversionException, (msg, num):




More information about the bazaar-commits mailing list