Rev 1710: Properly convert errors raised when starting a commit. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Mon Sep 8 22:40:54 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1710
revision-id: jelmer at samba.org-20080908214051-el0k75rw1uzv20ha
parent: jelmer at samba.org-20080907205923-r531loa8e0nqdmjc
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2008-09-08 23:40:51 +0200
message:
Properly convert errors raised when starting a commit.
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
commit.py commit.py-20060607190346-qvq128wgfubhhgm2-1
tags.py tags.py-20080822211316-scblu3akdvu0b64c-1
=== modified file 'NEWS'
--- a/NEWS 2008-09-07 20:59:23 +0000
+++ b/NEWS 2008-09-08 21:40:51 +0000
@@ -10,6 +10,8 @@
* Avoid NoneType error when no revisions to push in "bzr dpush". (#267484)
+ * Properly convert errors raised when starting a commit. (#267899)
+
bzr-svn 0.4.12 2008-09-01
BUG FIXES
=== modified file 'commit.py'
--- a/commit.py 2008-09-07 20:59:23 +0000
+++ b/commit.py 2008-09-08 21:40:51 +0000
@@ -30,7 +30,7 @@
from bzrlib.plugins.svn import core, properties
from bzrlib.plugins.svn.core import SubversionException
from bzrlib.plugins.svn.delta import send_stream
-from bzrlib.plugins.svn.errors import ChangesRootLHSHistory, MissingPrefix, RevpropChangeFailed, ERR_FS_TXN_OUT_OF_DATE
+from bzrlib.plugins.svn.errors import ChangesRootLHSHistory, MissingPrefix, RevpropChangeFailed, ERR_FS_TXN_OUT_OF_DATE, convert_svn_error
from bzrlib.plugins.svn.svk import (
generate_svk_feature, serialize_svk_features,
parse_svk_features, SVN_PROP_SVK_MERGE)
@@ -499,7 +499,7 @@
conn = self.repository.transport.get_connection()
assert self.supports_custom_revprops or self._svn_revprops.keys() == [properties.PROP_REVISION_LOG], \
"revprops: %r" % self._svn_revprops.keys()
- self.editor = conn.get_commit_editor(
+ self.editor = convert_svn_error(conn.get_commit_editor)(
self._svn_revprops, done, None, False)
try:
root = self.editor.open_root(self.base_revnum)
=== modified file 'tags.py'
--- a/tags.py 2008-08-27 17:39:12 +0000
+++ b/tags.py 2008-09-08 21:40:51 +0000
@@ -18,7 +18,7 @@
from bzrlib.tag import BasicTags
from bzrlib.trace import mutter
-from bzrlib.plugins.svn import commit, core, properties
+from bzrlib.plugins.svn import commit, core, errors as svn_errors, properties
class SubversionTags(BasicTags):
def __init__(self, branch):
@@ -35,7 +35,7 @@
return
conn = self.repository.transport.get_connection()
try:
- ci = conn.get_commit_editor({properties.PROP_REVISION_LOG: "Add tags base directory."})
+ ci = svn_errors.convert_svn_error(conn.get_commit_editor)({properties.PROP_REVISION_LOG: "Add tags base directory."})
try:
root = ci.open_root()
name = None
@@ -76,7 +76,7 @@
conn = self.repository.transport.get_connection(parent)
deletefirst = (conn.check_path(urlutils.basename(path), self.repository.get_latest_revnum()) != core.NODE_NONE)
try:
- ci = conn.get_commit_editor({properties.PROP_REVISION_LOG: "Add tag %s" % tag_name.encode("utf-8")})
+ ci = svn_errors.convert_svn_error(conn.get_commit_editor)({properties.PROP_REVISION_LOG: "Add tag %s" % tag_name.encode("utf-8")})
try:
root = ci.open_root()
if deletefirst:
@@ -120,7 +120,7 @@
try:
if conn.check_path(urlutils.basename(path), self.repository.get_latest_revnum()) != core.NODE_DIR:
raise NoSuchTag(tag_name)
- ci = conn.get_commit_editor({properties.PROP_REVISION_LOG: "Remove tag %s" % tag_name.encode("utf-8")})
+ ci = svn_errors.convert_svn_error(conn.get_commit_editor)({properties.PROP_REVISION_LOG: "Remove tag %s" % tag_name.encode("utf-8")})
try:
root = ci.open_root()
root.delete_entry(urlutils.basename(path))
More information about the bazaar-commits
mailing list