         (error "can not resolve conflicts at this point"))))
 
 ;; --------------------------------------------------------------------------------
+;; svnadmin interface
+;; --------------------------------------------------------------------------------
+(defun svn-admin-create (dir)
+  "Run svnadmin create DIR."
+  (interactive (list (expand-file-name
+                      (svn-read-directory-name "Create a svn repository at: "
+                                               svn-admin-default-create-directory nil nil))))
+  (shell-command-to-string (concat "svnadmin create " dir))
+  (setq svn-admin-last-repository-dir (concat "file://" dir))
+  (message "Svn repository created at %s" dir)
+  (run-hooks 'svn-admin-create-hook))
+
+;; - Import an empty directory
+;;   cd to an empty directory
+;;   svn import -m "Initial import" . file:///home/stefan/svn_repos/WaldiConfig/trunk
+(defun svn-admin-create-trunk-directory ()
+  "Import an empty trunk directory to `svn-admin-last-repository-dir'.
+Set `svn-admin-last-repository-dir' to the new created trunk url."
+  (interactive)
+  (let ((empty-temp-dir-name (make-temp-name svn-status-temp-dir)))
+    (make-directory empty-temp-dir-name t)
+    (setq svn-admin-last-repository-dir (concat svn-admin-last-repository-dir "/trunk"))
+    (svn-run nil t 'import "import" "-m" "Created trunk directory"
+                             empty-temp-dir-name svn-admin-last-repository-dir)
+    (delete-directory empty-temp-dir-name)))
+
+(defun svn-admin-start-import ()
+  "Start to import the current working directory in a subversion repository.
+The user is asked to perform the following two steps:
+1. Create a local repository
+2. Add a trunk directory to that repository
+
+After that step the empty base directory (either the root directory or
+the trunk directory of the selected repository) is checked out in the current
+working directory."
+  (interactive)
+  (if (y-or-n-p "Create local repository? ")
+      (progn
+        (call-interactively 'svn-admin-create)
+        (when (y-or-n-p "Add a trunk directory? ")
+          (svn-admin-create-trunk-directory)))
+    (setq svn-admin-last-repository-dir (read-string "Repository Url: ")))
+  (svn-checkout svn-admin-last-repository-dir "."))
+
+;; --------------------------------------------------------------------------------
 ;; svn status profiling
 ;; --------------------------------------------------------------------------------
 ;;; Note about profiling psvn:

(defvar svn-transient-buffers)
(defvar svn-ediff-windows)
(defvar svn-ediff-result)

;; Emacs 21 defines these in ediff-init.el but it seems more robust
;; to just declare the variables here than try to load that file.

        if (listp item) nconc (svn-status-flatten-list item)
        else collect item))

;;;###autoload
(defun svn-checkout (repos-url path)
  "Run svn checkout REPOS-URL PATH."
  (interactive (list (read-string "Checkout from repository Url: ")
                     (svn-read-directory-name "Checkout to directory: ")))
  (svn-run t t 'checkout "checkout" repos-url (expand-file-name path)))

;;;###autoload (defalias 'svn-examine 'svn-status)
(defalias 'svn-examine 'svn-status)
