Rev 322: Package 0.4.16. in http://bzr.debian.org/pkg-bazaar/bzr-svn/experimental

Jelmer Vernooij jelmer at samba.org
Thu Dec 4 15:08:51 GMT 2008


At http://bzr.debian.org/pkg-bazaar/bzr-svn/experimental

------------------------------------------------------------
revno: 322
revision-id: jelmer at samba.org-20081204150846-azyfn0qjfapb5u8m
parent: jelmer at samba.org-20081110013216-jfwygakf3hnbti03
parent: jelmer at samba.org-20081204150336-2f00myb4gewski80
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: debian
timestamp: Thu 2008-12-04 16:08:46 +0100
message:
  Package 0.4.16.
modified:
  AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  debian/changelog               changelog-20061009030331-beff4307o0ccq70i-3
  debian/control                 control-20061009030331-beff4307o0ccq70i-5
  editor.c                       editor.c-20080602191336-frj7az1sdk13o1tw-1
  errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
  format.py                      format.py-20070917005147-94kb7zysotf82kqw-1
  mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
  mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
  mapping3/scheme.py             scheme.py-20060516195850-95181aae6b272f9e
  remote.py                      format.py-20060406233823-b6fa009fe35dfde7
  repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
  setup.py                       setup.py-20060502115218-86950492da22353f
  tests/test_repository.py       test_repos.py-20060508151940-ddc49a59257ca712
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 220.76.37
    revision-id: jelmer at samba.org-20081204150336-2f00myb4gewski80
    parent: jelmer at samba.org-20081204150149-jk978w1zr0abvf14
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Thu 2008-12-04 16:03:36 +0100
    message:
      Release 0.4.16.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
    ------------------------------------------------------------
    revno: 220.76.36
    revision-id: jelmer at samba.org-20081204150149-jk978w1zr0abvf14
    parent: jelmer at samba.org-20081203194007-w6q3o7lfmgq0ln6u
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Thu 2008-12-04 16:01:49 +0100
    message:
      Fix tests.
    modified:
      format.py                      format.py-20070917005147-94kb7zysotf82kqw-1
    ------------------------------------------------------------
    revno: 220.76.35
    revision-id: jelmer at samba.org-20081203194007-w6q3o7lfmgq0ln6u
    parent: jelmer at samba.org-20081203193232-17tqlhwre2t9eavw
    parent: jelmer at samba.org-20081202202421-r0irnl4nvcg01ess
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-12-03 20:40:07 +0100
    message:
      Merge upstream.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
        ------------------------------------------------------------
        revno: 220.80.3
        revision-id: jelmer at samba.org-20081202202421-r0irnl4nvcg01ess
        parent: jelmer at samba.org-20081202202200-ft1jao36g7dn042b
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Tue 2008-12-02 21:24:21 +0100
        message:
          FIx imports.
        modified:
          transport.py                   transport.py-20060406231150-b3472d06b3a0818d
        ------------------------------------------------------------
        revno: 220.80.2
        revision-id: jelmer at samba.org-20081202202200-ft1jao36g7dn042b
        parent: jelmer at samba.org-20081201154408-4vjkx1l2uqyxbd4t
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Tue 2008-12-02 21:22:00 +0100
        message:
          Properly display Malformed URL error.
        modified:
          transport.py                   transport.py-20060406231150-b3472d06b3a0818d
        ------------------------------------------------------------
        revno: 220.80.1
        revision-id: jelmer at samba.org-20081201154408-4vjkx1l2uqyxbd4t
        parent: jelmer at samba.org-20081119130100-0t6381c1p45re08k
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Mon 2008-12-01 16:44:08 +0100
        message:
          Allow target URLs in redirect requests to contain relative URLs.
        modified:
          NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
          transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 220.76.34
    revision-id: jelmer at samba.org-20081203193232-17tqlhwre2t9eavw
    parent: jelmer at samba.org-20081119130100-0t6381c1p45re08k
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-12-03 20:32:32 +0100
    message:
      Fix removing of file properties.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      editor.c                       editor.c-20080602191336-frj7az1sdk13o1tw-1
    ------------------------------------------------------------
    revno: 220.76.33
    revision-id: jelmer at samba.org-20081119130100-0t6381c1p45re08k
    parent: jelmer at samba.org-20081119005159-jj3in693h306z1e5
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-19 14:01:00 +0100
    message:
      Set bzr:user-agent revision property, e.g. to allow blacklisting in the future.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
    ------------------------------------------------------------
    revno: 220.76.32
    revision-id: jelmer at samba.org-20081119005159-jj3in693h306z1e5
    parent: jelmer at samba.org-20081119003135-1qbc5ch07p9cuemo
    parent: jeanfrancois.roy at me.com-20081119004407-y7b95jvcis5g8u90
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-19 01:51:59 +0100
    message:
      Merge test fix.
    modified:
      mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
        ------------------------------------------------------------
        revno: 220.79.1
        revision-id: jeanfrancois.roy at me.com-20081119004407-y7b95jvcis5g8u90
        parent: jelmer at samba.org-20081119003135-1qbc5ch07p9cuemo
        committer: Jean-Francois Roy <jeanfrancois.roy at me.com>
        branch nick: svn-foo-fix
        timestamp: Tue 2008-11-18 16:44:07 -0800
        message:
          - Changed the litteral string "foo" in supports_tags to be a unicode string instead, as per the requirements of get_tag_path.
        modified:
          mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
    ------------------------------------------------------------
    revno: 220.76.31
    revision-id: jelmer at samba.org-20081119003135-1qbc5ch07p9cuemo
    parent: jelmer at samba.org-20081112121503-kdxid1oidzvkorad
    parent: jelmer at samba.org-20081118222630-eblzc2vymzhwmnw4
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-19 01:31:35 +0100
    message:
      Merge upstream.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
      mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
      mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
      mapping3/scheme.py             scheme.py-20060516195850-95181aae6b272f9e
        ------------------------------------------------------------
        revno: 220.78.2
        revision-id: jelmer at samba.org-20081118222630-eblzc2vymzhwmnw4
        parent: jelmer at samba.org-20081118170305-37bo3sgmbufxr4kl
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Tue 2008-11-18 23:26:30 +0100
        message:
          Give proper error when tags can't be pushed.
        modified:
          NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
          branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
          mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
          mapping3/__init__.py           __init__.py-20080502174630-9324zh25kka98vlw-1
        ------------------------------------------------------------
        revno: 220.78.1
        revision-id: jelmer at samba.org-20081118170305-37bo3sgmbufxr4kl
        parent: jelmer at samba.org-20081111164040-trao8l0gf2jjmzf3
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: 0.4
        timestamp: Tue 2008-11-18 18:03:05 +0100
        message:
          Fix argument count.
        modified:
          mapping3/scheme.py             scheme.py-20060516195850-95181aae6b272f9e
    ------------------------------------------------------------
    revno: 220.76.30
    revision-id: jelmer at samba.org-20081112121503-kdxid1oidzvkorad
    parent: jelmer at samba.org-20081112094604-7mt4ufpttmedth94
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-12 13:15:03 +0100
    message:
      Fix test for item_keys_introduced_by.
    modified:
      tests/test_repository.py       test_repos.py-20060508151940-ddc49a59257ca712
    ------------------------------------------------------------
    revno: 220.76.29
    revision-id: jelmer at samba.org-20081112094604-7mt4ufpttmedth94
    parent: jelmer at samba.org-20081112094022-i0qf08h9at64kk3w
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-12 10:46:04 +0100
    message:
      Merge improvements from spiv's patch.
    modified:
      repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
    ------------------------------------------------------------
    revno: 220.76.28
    revision-id: jelmer at samba.org-20081112094022-i0qf08h9at64kk3w
    parent: jelmer at samba.org-20081111164040-trao8l0gf2jjmzf3
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Wed 2008-11-12 10:40:22 +0100
    message:
      Cope with new argument to abort_write_group]().
    modified:
      AUTHORS                        AUTHORS-20060508114718-4c90c0062645106d
      repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
    ------------------------------------------------------------
    revno: 220.76.27
    revision-id: jelmer at samba.org-20081111164040-trao8l0gf2jjmzf3
    parent: jelmer at samba.org-20081111012849-zu9ag87ue40b5zhe
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-11-11 17:40:40 +0100
    message:
      Mention pre-revprop-change hook when revision properties cna't be changed.
    modified:
      errors.py                      errors.py-20061226172623-w1sbj8ynpo0eojqp-1
    ------------------------------------------------------------
    revno: 220.76.26
    revision-id: jelmer at samba.org-20081111012849-zu9ag87ue40b5zhe
    parent: jelmer at samba.org-20081110142037-1b7gvx1zq21buceu
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-11-11 02:28:49 +0100
    message:
      Add --svn-override-revprops option to svn-push.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      branch.py                      svnbranch.py-20051017135706-11c749eb0dab04a7
      commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
      remote.py                      format.py-20060406233823-b6fa009fe35dfde7
    ------------------------------------------------------------
    revno: 220.76.25
    revision-id: jelmer at samba.org-20081110142037-1b7gvx1zq21buceu
    parent: jelmer at samba.org-20081110021154-l9o267vsk25f8tf5
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-11-10 15:20:37 +0100
    message:
      Don't print backtrace when error occurs while accessing repository root.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      repository.py                  repository.py-20060306123302-1f8c5069b3fe0265
    ------------------------------------------------------------
    revno: 220.76.24
    revision-id: jelmer at samba.org-20081110021154-l9o267vsk25f8tf5
    parent: jelmer at samba.org-20081110011000-y0ojz2os3eatv8ri
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-11-10 03:11:54 +0100
    message:
      Start on 0.4.16.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
      setup.py                       setup.py-20060502115218-86950492da22353f
=== modified file 'AUTHORS'
--- a/AUTHORS	2008-09-21 22:18:14 +0000
+++ b/AUTHORS	2008-11-12 09:40:22 +0000
@@ -10,6 +10,7 @@
 Andrew Bennetts
 Wouter Bolsterlee
 Alexey Borzenkov
+Rocky Burt
 Andrew Cowie
 Aaron Bentley
 Max Bowser

=== modified file 'NEWS'
--- a/NEWS	2008-11-10 01:32:16 +0000
+++ b/NEWS	2008-12-04 15:08:46 +0000
@@ -1,3 +1,23 @@
+bzr-svn 0.4.16	2008-12-06
+
+  BUG FIXES
+
+   * Don't print backtrace when error occurs while accessing repository root.
+     (#296224)
+
+   * Add --svn-override-revprops option to svn-push.
+
+   * Give proper error when tags can't be pushed. (#299490)
+
+   * Set bzr:user-agent revision property, e.g. to allow blacklisting 
+     in the future.
+
+   * Fix removing of file properties. (#304866)
+
+   * Allow target URLs in redirect requests to contain relative URLs. (#303959)
+
+   * Fix compatibility with bzr 1.10.
+
 bzr-svn 0.4.15	2008-11-10
 
   BUG FIXES

=== modified file '__init__.py'
--- a/__init__.py	2008-11-10 01:32:16 +0000
+++ b/__init__.py	2008-12-04 15:08:46 +0000
@@ -46,7 +46,7 @@
 # versions ending in 'exp' mean experimental mappings
 # versions ending in 'dev' mean development version
 # versions ending in 'final' mean release (well tested, etc)
-version_info = (0, 4, 15, 'dev', 0)
+version_info = (0, 4, 16, 'final', 0)
 
 if version_info[3] == 'final':
     version_string = '%d.%d.%d' % version_info[:3]
@@ -54,7 +54,7 @@
     version_string = '%d.%d.%d%s%d' % version_info
 __version__ = version_string
 
-COMPATIBLE_BZR_VERSIONS = [(1, 9, 0)]
+COMPATIBLE_BZR_VERSIONS = [(1, 10, 0)]
 
 def check_subversion_version():
     """Check that Subversion is compatible.
@@ -87,6 +87,11 @@
     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__)
+
+
 def check_rebase_version(min_version):
     """Check what version of bzr-rebase is installed.
 
@@ -358,10 +363,13 @@
             short_name='d',
             type=unicode,
             ),
-            Option("merged", help="Push merged (right hand side) revisions.")]
+            Option("merged", help="Push merged (right hand side) revisions."),
+            Option("svn-override-revprops", type=str, 
+                help="Comma-separated list of svn properties to override (date/author)")
+            ]
 
     def run(self, location=None, revision=None, remember=False, 
-            directory=None, merged=None):
+            directory=None, merged=None, svn_override_revprops=None):
         from bzrlib.bzrdir import BzrDir
         from bzrlib.branch import Branch
         from bzrlib.errors import NotBranchError, BzrCommandError
@@ -380,6 +388,14 @@
                 self.outf.write("Using saved location: %s\n" % display_url)
                 location = stored_loc
 
+        if svn_override_revprops is not None:
+            override_svn_revprops = svn_override_revprops.split(",")
+            if len(set(override_svn_revprops).difference(set(["author", "date"]))) > 0:
+                raise BzrCommandError("Can only override 'author' and 'date' revision properties")
+            override_svn_revprops = [("svn:" + v) for v in override_svn_revprops]
+        else:
+            override_svn_revprops = None
+
         source_branch.lock_read()
         try:
             bzrdir = BzrDir.open(location)
@@ -395,11 +411,13 @@
                 target_branch = bzrdir.open_branch()
                 target_branch.lock_write()
                 try:
-                    target_branch.pull(source_branch, stop_revision=revision_id, _push_merged=merged)
+                    target_branch.pull(source_branch, stop_revision=revision_id, _push_merged=merged,
+                                       _override_svn_revprops=override_svn_revprops)
                 finally:
                     target_branch.unlock()
             except NotBranchError:
-                target_branch = bzrdir.import_branch(source_branch, revision_id, _push_merged=merged)
+                target_branch = bzrdir.import_branch(source_branch, revision_id, _push_merged=merged,
+                                       _override_svn_revprops=override_svn_revprops)
         finally:
             source_branch.unlock()
         # We successfully created the target, remember it

=== modified file 'branch.py'
--- a/branch.py	2008-08-26 04:49:14 +0000
+++ b/branch.py	2008-12-04 15:08:46 +0000
@@ -21,6 +21,7 @@
 from bzrlib.errors import (NoSuchFile, DivergedBranches, NoSuchRevision, 
                            NotBranchError, UnstackableBranchFormat)
 from bzrlib.revision import is_null, ensure_null
+from bzrlib.tag import DisabledTags
 from bzrlib.workingtree import WorkingTree
 
 from bzrlib.plugins.svn import core, wc
@@ -62,13 +63,13 @@
             look at; none for latest.
         """
         self.repository = repository
+        self._format = SvnBranchFormat()
+        self.mapping = self.repository.get_mapping()
         super(SvnBranch, self).__init__()
         assert isinstance(self.repository, SvnRepository)
         self.control_files = FakeControlFiles()
-        self._format = SvnBranchFormat()
         self._lock_mode = None
         self._lock_count = 0
-        self.mapping = self.repository.get_mapping()
         self.layout = self.repository.get_layout()
         self._branch_path = branch_path.strip("/")
         self.base = urlutils.join(self.repository.base, 
@@ -91,7 +92,10 @@
             raise NotSvnBranchPath(branch_path, mapping=self.mapping)
 
     def _make_tags(self):
-        return SubversionTags(self)
+        if self.supports_tags():
+            return SubversionTags(self)
+        else:
+            return DisabledTags(self)
 
     def set_branch_path(self, branch_path):
         """Change the branch path for this branch.
@@ -236,7 +240,7 @@
     def get_config(self):
         return BranchConfig(self)
        
-    def _get_nick(self):
+    def _get_nick(self, local=False, possible_transports=None):
         """Find the nick name for this branch.
 
         :return: Branch nick
@@ -353,7 +357,8 @@
         return self.generate_revision_id(self.get_revnum())
 
     def pull(self, source, overwrite=False, stop_revision=None, 
-             _hook_master=None, run_hooks=True, _push_merged=None):
+             _hook_master=None, run_hooks=True, _push_merged=None,
+             _override_svn_revprops=None):
         """See Branch.pull()."""
         result = PullResult()
         result.source_branch = source
@@ -363,7 +368,8 @@
         try:
             (result.old_revno, result.old_revid) = self.last_revision_info()
             self.update_revisions(source, stop_revision, overwrite, 
-                                  _push_merged=_push_merged)
+                                  _push_merged=_push_merged,
+                                  _override_svn_revprops=_override_svn_revprops)
             result.tag_conflicts = source.tags.merge_to(self.tags, overwrite)
             (result.new_revno, result.new_revid) = self.last_revision_info()
             return result
@@ -402,7 +408,8 @@
         destination.set_last_revision_info(revno, revision_id)
 
     def update_revisions(self, other, stop_revision=None, overwrite=False, 
-                         graph=None, _push_merged=False):
+                         graph=None, _push_merged=False, 
+                         _override_svn_revprops=None):
         """See Branch.update_revisions()."""
         if stop_revision is None:
             stop_revision = ensure_null(other.last_revision())
@@ -427,10 +434,10 @@
         if _push_merged is None:
             _push_merged = self.layout.push_merged_revisions(self.project)
         self._push_missing_revisions(graph, other, other_graph, todo, 
-                                     _push_merged)
+                                     _push_merged, _override_svn_revprops)
 
     def _push_missing_revisions(self, my_graph, other, other_graph, todo, 
-                                push_merged=False):
+                                push_merged=False, _override_svn_revprops=None):
         pb = ui.ui_factory.nested_progress_bar()
         try:
             for revid in todo:
@@ -439,7 +446,7 @@
                 if push_merged:
                     parent_revids = other_graph.get_parent_map([revid])[revid]
                     push_ancestors(self.repository, other.repository, self.layout, self.project, parent_revids, other_graph)
-                push(my_graph, self, other.repository, revid)
+                push(my_graph, self, other.repository, revid, override_svn_revprops=_override_svn_revprops)
                 self._clear_cached_state()
         finally:
             pb.finished()
@@ -503,7 +510,7 @@
         return '%s(%r)' % (self.__class__.__name__, self.base)
 
     def supports_tags(self):
-        return self._format.supports_tags()
+        return self._format.supports_tags() and self.mapping.supports_tags()
 
     __repr__ = __str__
 

=== modified file 'commit.py'
--- a/commit.py	2008-11-10 01:32:16 +0000
+++ b/commit.py	2008-12-04 15:08:46 +0000
@@ -132,7 +132,8 @@
     def __init__(self, repository, branch, parents, config, timestamp, 
                  timezone, committer, revprops, revision_id, old_inv=None,
                  push_metadata=True,
-                 graph=None, texts=None):
+                 graph=None, texts=None, 
+                 override_svn_revprops=None):
         """Instantiate a new SvnCommitBuilder.
 
         :param repository: SvnRepository to commit to.
@@ -156,6 +157,11 @@
         self._text_parents = {}
         self._texts = texts
 
+        if override_svn_revprops is None:
+            self._override_svn_revprops = self._config.get_override_svn_revprops()
+        else:
+            self._override_svn_revprops = override_svn_revprops
+
         # Gather information about revision on top of which the commit is 
         # happening
         if parents == []:
@@ -567,12 +573,11 @@
                result_revision, result_author, 
                    result_date, revid)
 
-        override_svn_revprops = self._config.get_override_svn_revprops()
-        if override_svn_revprops is not None:
+        if self._override_svn_revprops is not None:
             new_revprops = {}
-            if properties.PROP_REVISION_AUTHOR in override_svn_revprops:
+            if properties.PROP_REVISION_AUTHOR in self._override_svn_revprops:
                 new_revprops[properties.PROP_REVISION_AUTHOR] = self._committer.encode("utf-8")
-            if properties.PROP_REVISION_DATE in override_svn_revprops:
+            if properties.PROP_REVISION_DATE in self._override_svn_revprops:
                 new_revprops[properties.PROP_REVISION_DATE] = properties.time_to_cstring(1000000*self._timestamp)
             set_svn_revprops(self.repository.transport, result_revision, new_revprops)
 
@@ -651,7 +656,7 @@
 
 
 def push_new(target_repository, target_branch_path, source, stop_revision,
-             push_metadata=True):
+             push_metadata=True, override_svn_revprops=None):
     """Push a revision into Subversion, creating a new branch.
 
     This will do a new commit in the target branch.
@@ -713,7 +718,7 @@
                 revnum, self.get_branch_path(revnum), 
                 self.repository.get_mapping())
 
-    push(target_repository.get_graph(), ImaginaryBranch(target_repository), source, start_revid, push_metadata=push_metadata)
+    push(target_repository.get_graph(), ImaginaryBranch(target_repository), source, start_revid, push_metadata=push_metadata, override_svn_revprops=override_svn_revprops)
 
 
 def dpush(target, source, stop_revision=None):
@@ -757,7 +762,8 @@
 
 
 def push_revision_tree(graph, target, config, source_repo, base_revid, 
-                       revision_id, rev, push_metadata=True):
+                       revision_id, rev, push_metadata=True,
+                       override_svn_revprops=None):
     old_tree = source_repo.revision_tree(revision_id)
     base_tree = source_repo.revision_tree(base_revid)
 
@@ -773,7 +779,8 @@
                                revision_id, base_tree.inventory, 
                                push_metadata=push_metadata,
                                graph=graph,
-                               texts=source_repo.texts)
+                               texts=source_repo.texts,
+                               override_svn_revprops=override_svn_revprops)
                          
     replay_delta(builder, base_tree, old_tree)
     try:
@@ -791,7 +798,8 @@
     return revid
 
 
-def push(graph, target, source_repo, revision_id, push_metadata=True):
+def push(graph, target, source_repo, revision_id, push_metadata=True, 
+         override_svn_revprops=None):
     """Push a revision into Subversion.
 
     This will do a new commit in the target branch.
@@ -799,6 +807,7 @@
     :param target: Branch to push to
     :param source_repo: Branch to pull the revision from
     :param revision_id: Revision id of the revision to push
+    :param override_svn_revprops: List of Subversion revision properties to override
     :return: revision id of revision that was pushed
     """
     assert isinstance(source_repo, Repository)
@@ -818,7 +827,8 @@
     try:
         revid = push_revision_tree(graph, target, target.get_config(), 
                                    source_repo, base_revid, revision_id, 
-                                   rev, push_metadata=push_metadata)
+                                   rev, push_metadata=push_metadata,
+                                   override_svn_revprops=override_svn_revprops)
     finally:
         source_repo.unlock()
 

=== modified file 'debian/changelog'
--- a/debian/changelog	2008-11-10 01:32:16 +0000
+++ b/debian/changelog	2008-12-04 15:08:46 +0000
@@ -1,3 +1,9 @@
+bzr-svn (0.4.16-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Jelmer Vernooij <jelmer at samba.org>  Thu, 04 Dec 2008 16:08:19 +0100
+
 bzr-svn (0.4.15-1) experimental; urgency=low
 
   * New upstream release.

=== modified file 'debian/control'
--- a/debian/control	2008-11-03 13:57:00 +0000
+++ b/debian/control	2008-12-04 15:08:46 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian Bazaar Maintainers <pkg-bazaar-maint at lists.alioth.debian.org>
 Homepage: http://bazaar-vcs.org/BzrSvn
 Uploaders: Jelmer Vernooij <jelmer at samba.org>, Reinhard Tartler <siretart at tauware.de>, Robert Collins <robertc at robertcollins.net>
-Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), python, debhelper (>= 5.0.37.2), libsvn-dev, python-all-dev, bzr (>= 1.9~), python (>= 2.5) | python-pysqlite2
+Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), python, debhelper (>= 5.0.37.2), libsvn-dev, python-all-dev, bzr (>= 1.10~), python (>= 2.5) | python-pysqlite2
 Standards-Version: 3.8.0
 XS-Python-Version: >= 2.4
 Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-svn/unstable/
@@ -12,7 +12,7 @@
 
 Package: bzr-svn
 Architecture: any
-Depends: bzr (>= 1.9~), bzr (<< 1.10~), ${shlibs:Depends}, ${python:Depends}, python (>= 2.5) | python-pysqlite2
+Depends: bzr (>= 1.10~), bzr (<< 1.11~), ${shlibs:Depends}, ${python:Depends}, python (>= 2.5) | python-pysqlite2
 Enhances: bzr, subversion
 Recommends: bzr-rebase (>= 0.3~)
 XB-Python-Version: ${python:Versions}

=== modified file 'editor.c'
--- a/editor.c	2008-10-30 19:12:11 +0000
+++ b/editor.c	2008-12-03 19:32:32 +0000
@@ -199,7 +199,7 @@
 	c_value.len = vallen;
 
 	RUN_SVN(editor->editor->change_file_prop(editor->baton, name, 
-				&c_value, editor->pool));
+				(c_value.data == NULL)?NULL:&c_value, editor->pool));
 	Py_RETURN_NONE;
 }
 
@@ -370,7 +370,7 @@
 	c_value.len = vallen;
 
 	RUN_SVN(editor->editor->change_dir_prop(editor->baton, name, 
-					&c_value, editor->pool));
+					(c_value.data == NULL)?NULL:&c_value, editor->pool));
 
 	Py_RETURN_NONE;
 }

=== modified file 'errors.py'
--- a/errors.py	2008-11-03 13:57:00 +0000
+++ b/errors.py	2008-12-04 15:08:46 +0000
@@ -95,7 +95,8 @@
 
 
 class RevpropChangeFailed(BzrError):
-    _fmt = """Unable to set revision property %(name)s."""
+    _fmt = """Unable to set revision property %(name)s. 
+Does the repository pre-revprop-change hook allow property changes?"""
 
     def __init__(self, name):
         BzrError.__init__(self)

=== modified file 'format.py'
--- a/format.py	2008-11-10 01:32:16 +0000
+++ b/format.py	2008-12-04 15:08:46 +0000
@@ -79,6 +79,8 @@
                 mutter("Unable to open %r with Subversion: %s", 
                         transport, msg)
                 raise bzr_errors.NotBranchError(path=transport.base)
+        except bzr_errors.InvalidURL:
+                raise bzr_errors.NotBranchError(path=transport.base)
 
         return format
 

=== modified file 'mapping.py'
--- a/mapping.py	2008-11-10 01:32:16 +0000
+++ b/mapping.py	2008-12-04 15:08:46 +0000
@@ -19,7 +19,7 @@
 from bzrlib.errors import InvalidRevisionId
 from bzrlib.trace import mutter
 
-from bzrlib.plugins.svn import errors, properties, version_info
+from bzrlib.plugins.svn import errors, properties, version_info, get_client_string
 import calendar
 import time
 import urllib
@@ -39,6 +39,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'
@@ -419,6 +420,9 @@
     def unprefix(self, branch_path, repos_path):
         raise NotImplementedError(self.unprefix)
 
+    def supports_tags(self):
+        raise NotImplementedError(self.supports_tags)
+
 
 class BzrSvnMappingv1(BzrSvnMapping):
     """This was the initial version of the mappings as used by bzr-svn
@@ -446,6 +450,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def supports_tags(self):
+        return False
+
 
 class BzrSvnMappingv2(BzrSvnMapping):
     """The second version of the mappings as used in the 0.3.x series.
@@ -470,6 +477,9 @@
     def __eq__(self, other):
         return type(self) == type(other)
 
+    def supports_tags(self):
+        return False
+
 
 def parse_fileid_property(text):
     ret = {}
@@ -712,6 +722,7 @@
         if merges != []:
             svn_revprops[SVN_REVPROP_BZR_MERGE] = "".join([x+"\n" for x in merges])
         svn_revprops[SVN_REVPROP_BZR_REVNO] = str(revno)
+        svn_revprops[SVN_REVPROP_BZR_USER_AGENT] = get_client_string()
 
         return (svn_revprops, {})
 

=== modified file 'mapping3/__init__.py'
--- a/mapping3/__init__.py	2008-11-10 01:32:16 +0000
+++ b/mapping3/__init__.py	2008-12-04 15:08:46 +0000
@@ -310,6 +310,13 @@
     def is_tag(self, tag_path):
         return self.scheme.is_tag(tag_path)
 
+    def supports_tags(self):
+        try:
+            self.scheme.get_tag_path(u"foo")
+            return True
+        except NotImplementedError:
+            return False
+
     @classmethod
     def _generate_revision_id(cls, uuid, revnum, path, scheme):
         assert isinstance(revnum, int)

=== modified file 'mapping3/scheme.py'
--- a/mapping3/scheme.py	2008-08-26 20:44:10 +0000
+++ b/mapping3/scheme.py	2008-12-04 15:08:46 +0000
@@ -44,14 +44,14 @@
         """
         raise NotImplementedError
 
-    def get_tag_path(self, name):
+    def get_tag_path(self, name, project=""):
         """Find the path for a tag.
 
         :param name: Tag name.
         """
         raise NotImplementedError
 
-    def get_branch_path(self, name):
+    def get_branch_path(self, name, project=""):
         """Find the path for a named branch.
 
         :param name: Branch name.

=== modified file 'remote.py'
--- a/remote.py	2008-11-03 13:57:00 +0000
+++ b/remote.py	2008-12-04 15:08:46 +0000
@@ -118,7 +118,8 @@
             format = BzrDirFormat.get_default_format()
         return not isinstance(self._format, format.__class__)
 
-    def import_branch(self, source, stop_revision=None, _push_merged=None):
+    def import_branch(self, source, stop_revision=None, _push_merged=None,
+                      _override_svn_revprops=None):
         """Create a new branch in this repository, possibly 
         with the specified history, optionally importing revisions.
         
@@ -140,14 +141,15 @@
                 if repos.transport.check_path(target_branch_path,
                     repos.get_latest_revnum()) != core.NODE_NONE:
                     raise AlreadyBranchError(full_branch_url)
-                push_new(repos, target_branch_path, source.repository, stop_revision)
+                push_new(repos, target_branch_path, source.repository, stop_revision,
+                         override_svn_revprops=_override_svn_revprops)
             finally:
                 repos.unlock()
             branch = self.open_branch()
             branch.lock_write()
             try:
                 branch.pull(source, stop_revision=stop_revision, 
-                            _push_merged=_push_merged)
+                            _push_merged=_push_merged, _override_svn_revprops=_override_svn_revprops)
             finally:
                 branch.unlock()
         finally:

=== modified file 'repository.py'
--- a/repository.py	2008-11-10 01:32:16 +0000
+++ b/repository.py	2008-12-04 15:08:46 +0000
@@ -38,6 +38,7 @@
 from bzrlib.plugins.svn.changes import changes_path, find_prev_location
 from bzrlib.plugins.svn.config import SvnRepositoryConfig
 from bzrlib.plugins.svn.core import SubversionException
+from bzrlib.plugins.svn.errors import convert_svn_error
 from bzrlib.plugins.svn.mapping import (SVN_REVPROP_BZR_SIGNATURE,
                      BzrSvnMapping,
                      get_default_mapping, 
@@ -257,6 +258,7 @@
     def is_write_locked(self):
         return (self._lock_mode == 'w')
 
+    @convert_svn_error
     def get_latest_revnum(self):
         if self._lock_mode in ('r','w') and self._cached_revnum:
             return self._cached_revnum
@@ -266,7 +268,7 @@
     def start_write_group(self):
         pass
 
-    def abort_write_group(self):
+    def abort_write_group(self, suppress_errors=False):
         pass
 
     def commit_write_group(self):
@@ -293,15 +295,14 @@
         yield ("inventory", None, revision_ids)
 
         # signatures
-        revisions_with_signatures = set()
-        for rev_id in revision_ids:
-            try:
-                self.get_signature_text(rev_id)
-            except NoSuchRevision:
-                # not signed.
-                pass
-            else:
-                revisions_with_signatures.add(rev_id)
+        # XXX: Note ATM no callers actually pay attention to this return
+        #      instead they just use the list of revision ids and ignore
+        #      missing sigs. Consider removing this work entirely
+        revisions_with_signatures = set(self.signatures.get_parent_map(
+            [(r,) for r in revision_ids]))
+        revisions_with_signatures = set(
+            [r for (r,) in revisions_with_signatures])
+        revisions_with_signatures.intersection_update(revision_ids)
         yield ("signatures", None, revisions_with_signatures)
 
         yield ("revisions", None, revision_ids)

=== modified file 'setup.py'
--- a/setup.py	2008-11-10 01:32:16 +0000
+++ b/setup.py	2008-12-04 15:08:46 +0000
@@ -292,7 +292,7 @@
 setup(name='bzr-svn',
       description='Support for Subversion branches in Bazaar',
       keywords='plugin bzr svn',
-      version='0.4.15',
+      version='0.4.16',
       url='http://bazaar-vcs.org/BzrForeignBranches/Subversion',
       download_url='http://bazaar-vcs.org/BzrSvn',
       license='GPL',

=== modified file 'tests/test_repository.py'
--- a/tests/test_repository.py	2008-11-10 01:32:16 +0000
+++ b/tests/test_repository.py	2008-12-04 15:08:46 +0000
@@ -1305,7 +1305,7 @@
         self.assertEquals([
             ('file', mapping.generate_file_id(b.repository.uuid, 1, "", u"foo"), set([revid])),
             ('inventory', None, [revid]),
-            ('signatures', None, set([])),
+            ('signatures', None, set([revid])),
             ('revisions', None, [revid])], ch)
 
 

=== modified file 'transport.py'
--- a/transport.py	2008-09-24 16:08:43 +0000
+++ b/transport.py	2008-12-04 15:08:46 +0000
@@ -28,7 +28,7 @@
 from bzrlib.plugins.svn.auth import create_auth_baton
 from bzrlib.plugins.svn.client import get_config
 from bzrlib.plugins.svn.core import SubversionException
-from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_DIRECTORY, ERR_RA_DAV_RELOCATED, ERR_RA_DAV_PATH_NOT_FOUND
+from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_DIRECTORY, ERR_RA_DAV_RELOCATED, ERR_RA_DAV_PATH_NOT_FOUND, ERR_RA_ILLEGAL_URL
 import urlparse
 import urllib
 
@@ -115,9 +115,11 @@
         if num in (ERR_RA_SVN_REPOS_NOT_FOUND,):
             raise NoSvnRepositoryPresent(url=url)
         if num == ERR_BAD_URL:
-            raise InvalidURL(url)
+            raise InvalidURL(url, msg)
         if num == ERR_RA_DAV_PATH_NOT_FOUND:
             raise NoSuchFile(url)
+        if num == ERR_RA_ILLEGAL_URL:
+            raise InvalidURL(url, msg)
         if num == ERR_RA_DAV_RELOCATED:
             # Try to guess the new url
             if "'" in msg:
@@ -126,7 +128,8 @@
                 new_url = msg[msg.index("»")+2:msg.index("«")]
             else:
                 raise AssertionError("Unable to parse error message: %s" % msg)
-            raise RedirectRequested(source=url, target=new_url, 
+            raise RedirectRequested(source=url, 
+                                    target=urlutils.join(url, new_url), 
                                     is_permanent=True)
         raise
 




More information about the bazaar-commits mailing list