Index: vcpx/svn.py
===================================================================
--- vcpx/svn.py	(revision 625)
+++ vcpx/svn.py	(revision 626)
@@ -416,7 +416,8 @@
             return
 
-        cmd = [self.repository.SVN_CMD, "info"]
-        svninfo = ExternalCommand(command=cmd)
-        svninfo.execute(self.repository.repository)
+        # Verify the existence of repository by listing its root
+        cmd = [self.repository.SVN_CMD, "ls"]
+        svnls = ExternalCommand(command=cmd)
+        svnls.execute(self.repository.repository)
 
         if svninfo.exit_status:
Index: vcpx/repository.py
===================================================================
--- vcpx/repository.py	(revision 612)
+++ vcpx/repository.py	(revision 627)
@@ -113,4 +113,16 @@
         self.BZR_CMD = config.get(self.name, 'bzr-command', self.BZR_CMD)
 
+class BzrngRepository(Repository):
+    METADIR = '.bzr'
+
+    def _load(self, config, which):
+        Repository._load(self, config, which)
+        ppath = config.get(self.name, 'python-path')
+        if ppath:
+            from sys import path
+
+            if ppath not in path:
+                path.insert(0, ppath)
+
 
 class CdvRepository(Repository):
Index: vcpx/tests/tailor.py
===================================================================
--- vcpx/tests/tailor.py	(revision 618)
+++ vcpx/tests/tailor.py	(revision 627)
@@ -29,4 +29,9 @@
 source = darcs:tailor
 
+[darcs2bzrng]
+target = bzrng:tailor
+root-directory = /tmp/tailor-tests/darcs2bzrng
+source = darcs:tailor
+
 [darcs2cdv]
 target = cdv:tailor
@@ -56,4 +61,7 @@
 [bzr:tailor]
 bzr-command = /opt/src/bzr.dev/bzr
+
+[bzrng:tailor]
+python-path = /opt/src/bzr.dev
 
 [cdv:tailor]
@@ -127,4 +135,12 @@
         tailorizer()
 
+    def testDarcsToBazaarngNative(self):
+        "Test darcs to BazaarNG (native)"
+
+        tailorizer = Tailorizer('darcs2bzrng', self.config)
+        tailorizer()
+        self.assert_(tailorizer.exists())
+        tailorizer()
+
     def testDarcsToMercurial(self):
         "Test darcs to mercurial"
Index: vcpx/bzrng.py
===================================================================
--- vcpx/bzrng.py	(revision 627)
+++ vcpx/bzrng.py	(revision 627)
@@ -0,0 +1,69 @@
+# -*- mode: python; coding: utf-8 -*-
+# :Progetto: vcpx -- bazaar-ng support using the bzrlib instead of the frontend
+# :Creato:   Fri Aug 19 01:06:08 CEST 2005
+# :Autore:   Johan Rydberg <jrydberg@gnu.org>
+# :Licenza:  GNU General Public License
+#
+
+"""
+This module implements the backends for Bazaar-NG.
+"""
+
+__docformat__ = 'reStructuredText'
+
+from target import SyncronizableTargetWorkingDir, TargetInitializationFailure
+from bzrlib.branch import Branch
+from bzrlib.errors import BzrError
+
+class BzrngWorkingDir(SyncronizableTargetWorkingDir):
+    def _addPathnames(self, entries):
+        # This method may get invoked several times with the same
+        # entries; and Branch.add complains if a file is already
+        # versioned.  So go through the list and sort out entries that
+        # is already versioned, since there is no need to add them.
+        # Do not try to catch any errors from Branch.add, since the
+        # they are _real_ errors.
+        new_entries = []
+        for e in entries:
+            if not self._b.inventory.has_filename(e):
+                new_entries.extend([e])
+
+        if len(new_entries) == 0:
+            return
+        self._b.add(new_entries)
+
+    def _commit(self, date, author, patchname, changelog=None, entries=None):
+        from time import mktime
+
+        # FIXME: maybe we should construct the revision id here instead?
+        #revision_id = "%s-%d" % (author, timestamp)
+        timestamp = int(mktime(date.timetuple()))
+        self._b.commit(changelog, committer=author, specific_files=entries,
+                       verbose=False, timestamp=timestamp)
+
+    def _removePathnames(self, entries):
+        """Remove a sequence of entries"""
+
+        self._b.remove(entries)
+
+    def _renamePathname(self, oldentry, newentry):
+        """Rename an entry"""
+
+        self._b.rename_one(oldentry, newentry)
+
+    def _prepareTargetRepository(self):
+        """
+        Create the base directory if it doesn't exist, and the
+        repository as well in the new working directory.
+        """
+
+        from os.path import join, exists
+        from os import makedirs
+
+        if not exists(self.basedir):
+            makedirs(self.basedir)
+
+        if not exists(join(self.basedir, self.repository.METADIR)):
+            self._b = Branch(self.basedir, init=True, find_root=False)
+        else:
+            self._b = Branch(self.basedir, init=False, find_root=True)
