diff -ur subversion-1.4.2.orig/subversion/include/svn_io.h subversion-1.4.2/subversion/include/svn_io.h
--- subversion-1.4.2.orig/subversion/include/svn_io.h	2006-07-13 15:36:51.000000000 +0100
+++ subversion-1.4.2/subversion/include/svn_io.h	2006-11-25 17:02:14.000000000 +0000
@@ -358,6 +358,10 @@
                                         svn_boolean_t ignore_enoent,
                                         apr_pool_t *pool);
 
+svn_error_t *svn_io_set_file_filetype (const char *path,
+                                       const svn_string_t *filetype,
+                                       apr_pool_t *pool);
+
 /** Determine whether a file is executable by the current user.  
  * Set @a *executable to @c TRUE if the file @a path is executable by the 
  * current user, otherwise set it to @c FALSE.  
@@ -368,6 +372,9 @@
                                        const char *path, 
                                        apr_pool_t *pool);
 
+svn_error_t *svn_io_get_file_filetype(svn_string_t **filetype,
+                                      const char *path,
+                                      apr_pool_t *pool);
 
 /** Read a line from @a file into @a buf, but not exceeding @a *limit bytes.
  * Does not include newline, instead '\\0' is put there.
Only in subversion-1.4.2/subversion/include: svn_io.h.orig
diff -ur subversion-1.4.2.orig/subversion/include/svn_props.h subversion-1.4.2/subversion/include/svn_props.h
--- subversion-1.4.2.orig/subversion/include/svn_props.h	2006-08-18 22:43:18.000000000 +0100
+++ subversion-1.4.2/subversion/include/svn_props.h	2006-11-25 17:02:14.000000000 +0000
@@ -197,6 +197,9 @@
 /** Set to either TRUE or FALSE if we want a file to be executable or not. */
 #define SVN_PROP_EXECUTABLE  SVN_PROP_PREFIX "executable"
 
+#define SVN_PROP_FILETYPE  SVN_PROP_PREFIX "riscosfiletype"
+
+
 /** The value to force the executable property to when set */
 #define SVN_PROP_EXECUTABLE_VALUE "*"
 
diff -ur subversion-1.4.2.orig/subversion/include/svn_ra_svn.h subversion-1.4.2/subversion/include/svn_ra_svn.h
--- subversion-1.4.2.orig/subversion/include/svn_ra_svn.h	2006-08-18 23:54:14.000000000 +0100
+++ subversion-1.4.2/subversion/include/svn_ra_svn.h	2006-11-25 17:02:14.000000000 +0000
@@ -143,6 +143,7 @@
 svn_ra_svn_conn_t *svn_ra_svn_create_conn(apr_socket_t *sock,
                                           apr_file_t *in_file,
                                           apr_file_t *out_file,
+                                          void *ssh_handle,
                                           apr_pool_t *pool);
 
 /** Initialize a connection's capabilities to the ones specified in
Only in subversion-1.4.2/subversion/include: svn_ra_svn.h.orig
diff -ur subversion-1.4.2.orig/subversion/libsvn_client/add.c subversion-1.4.2/subversion/libsvn_client/add.c
--- subversion-1.4.2.orig/subversion/libsvn_client/add.c	2006-02-15 21:30:49.000000000 +0000
+++ subversion-1.4.2/subversion/libsvn_client/add.c	2006-11-25 17:02:14.000000000 +0000
@@ -198,6 +198,15 @@
     }
 #endif
 
+    {
+      svn_string_t *filetype;
+      SVN_ERR (svn_io_get_file_filetype (&filetype, path, pool));
+      if (filetype)
+        apr_hash_set (autoprops.properties, SVN_PROP_FILETYPE,
+                      strlen (SVN_PROP_FILETYPE),
+                      filetype);
+    }
+
   *mimetype = autoprops.mimetype;
   return SVN_NO_ERROR;
 }
diff -ur subversion-1.4.2.orig/subversion/libsvn_client/export.c subversion-1.4.2/subversion/libsvn_client/export.c
--- subversion-1.4.2.orig/subversion/libsvn_client/export.c	2006-07-10 18:22:18.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_client/export.c	2006-11-25 17:07:40.000000000 +0000
@@ -103,7 +103,7 @@
   svn_subst_eol_style_t style;
   apr_hash_t *props;
   const char *base;
-  svn_string_t *eol_style, *keywords, *executable, *externals, *special;
+  svn_string_t *eol_style, *keywords, *filetype, *executable, *externals, *special;
   const char *eol = NULL;
   svn_boolean_t local_mod = FALSE;
   apr_time_t tm;
@@ -149,6 +149,8 @@
                           APR_HASH_KEY_STRING);
   executable = apr_hash_get(props, SVN_PROP_EXECUTABLE,
                             APR_HASH_KEY_STRING);
+  filetype = apr_hash_get (props, SVN_PROP_FILETYPE,
+                           APR_HASH_KEY_STRING);
   externals = apr_hash_get(props, SVN_PROP_EXTERNALS,
                            APR_HASH_KEY_STRING);
   special = apr_hash_get(props, SVN_PROP_SPECIAL,
@@ -202,6 +204,9 @@
     SVN_ERR(svn_io_set_file_executable(to, TRUE, 
                                        FALSE, pool));
 
+  if (filetype)
+    SVN_ERR (svn_io_set_file_filetype (to, filetype, pool));
+
   if (! special)
     SVN_ERR(svn_io_set_file_affected_time(tm, to, pool));
 
@@ -431,6 +436,7 @@
   const svn_string_t *eol_style_val;
   const svn_string_t *keywords_val;
   const svn_string_t *executable_val;
+  const svn_string_t *filetype_val;
   svn_boolean_t special;
 
   /* Any keyword vals to be substituted */
@@ -627,6 +633,9 @@
   else if (strcmp(name, SVN_PROP_EXECUTABLE) == 0)
     fb->executable_val = svn_string_dup(value, fb->pool);
 
+  else if (strcmp (name, SVN_PROP_FILETYPE) == 0)
+    fb->filetype_val = svn_string_dup (value, fb->pool);
+
   /* Try to fill out the baton's keywords-structure too. */
   else if (strcmp(name, SVN_PROP_ENTRY_COMMITTED_REV) == 0)
     fb->revision = apr_pstrdup(fb->pool, value->data);
@@ -724,6 +733,9 @@
   if (fb->executable_val)
     SVN_ERR(svn_io_set_file_executable(fb->path, TRUE, FALSE, pool));
 
+  if (fb->filetype_val)
+    SVN_ERR (svn_io_set_file_filetype (fb->path, fb->filetype_val, pool));
+
   if (fb->date && (! fb->special))
     SVN_ERR(svn_io_set_file_affected_time(fb->date, fb->path, pool));
 
diff -ur subversion-1.4.2.orig/subversion/libsvn_ra_svn/client.c subversion-1.4.2/subversion/libsvn_ra_svn/client.c
--- subversion-1.4.2.orig/subversion/libsvn_ra_svn/client.c	2006-08-18 23:54:14.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_ra_svn/client.c	2006-11-25 17:10:23.000000000 +0000
@@ -43,6 +43,9 @@
 
 #include "ra_svn.h"
 
+// RISC OS SSH support functions
+extern char *svn_ssh_init(const char **args, void **handle);
+
 typedef struct {
   apr_pool_t *pool;
   svn_ra_svn_conn_t *conn;
@@ -521,7 +524,7 @@
       || apr_file_open_stdout(&out_file, pool))
     return;
 
-  conn = svn_ra_svn_create_conn(NULL, in_file, out_file, pool);
+  conn = svn_ra_svn_create_conn(NULL, in_file, out_file, NULL, pool);
   err = svn_error_wrap_apr(status, _("Error in child process: %s"), desc);
   svn_error_clear(svn_ra_svn_write_cmd_failure(conn, pool, err));
   svn_error_clear(svn_ra_svn_flush(conn, pool));
@@ -531,45 +534,18 @@
 static svn_error_t *make_tunnel(const char **args, svn_ra_svn_conn_t **conn,
                                 apr_pool_t *pool)
 {
-  apr_status_t status;
-  apr_proc_t *proc;
-  apr_procattr_t *attr;
-
-  status = apr_procattr_create(&attr, pool);
-  if (status == APR_SUCCESS)
-    status = apr_procattr_io_set(attr, 1, 1, 0);
-  if (status == APR_SUCCESS)
-    status = apr_procattr_cmdtype_set(attr, APR_PROGRAM_PATH);
-  if (status == APR_SUCCESS)
-    status = apr_procattr_child_errfn_set(attr, handle_child_process_error);
-  proc = apr_palloc(pool, sizeof(*proc));
-  if (status == APR_SUCCESS)
-    status = apr_proc_create(proc, *args, args, NULL, attr, pool);
-  if (status != APR_SUCCESS)
-    return svn_error_wrap_apr(status, _("Can't create tunnel"));
+  void *handle;
+  char *err;
 
-  /* Arrange for the tunnel agent to get a SIGKILL on pool
-   * cleanup.  This is a little extreme, but the alternatives
-   * weren't working out:
-   *   - Closing the pipes and waiting for the process to die
-   *     was prone to mysterious hangs which are difficult to
-   *     diagnose (e.g. svnserve dumps core due to unrelated bug;
-   *     sshd goes into zombie state; ssh connection is never
-   *     closed; ssh never terminates).
-   *   - Killing the tunnel agent with SIGTERM leads to unsightly
-   *     stderr output from ssh.
-   */
-  apr_pool_note_subprocess(pool, proc, APR_KILL_ALWAYS);
+  /* On RISC OS we use modified io routines to call our ssh ones */
+  err = svn_ssh_init(args, &handle);
 
-  /* APR pipe objects inherit by default.  But we don't want the
-   * tunnel agent's pipes held open by future child processes
-   * (such as other ra_svn sessions), so turn that off. */
-  apr_file_inherit_unset(proc->in);
-  apr_file_inherit_unset(proc->out);
+  if (err)
+    return svn_error_createf(SVN_ERR_RA_NOT_AUTHORIZED, NULL, 
+                             "Unable to start SSH: %s", err);
 
   /* Guard against dotfile output to stdout on the server. */
-  *conn = svn_ra_svn_create_conn(NULL, proc->out, proc->in, pool);
-  (*conn)->proc = proc;
+  *conn = svn_ra_svn_create_conn(NULL, NULL, NULL, handle, pool);
   SVN_ERR(svn_ra_svn_skip_leading_garbage(*conn, pool));
   return SVN_NO_ERROR;
 }
@@ -615,7 +591,7 @@
   else
     {
       SVN_ERR(make_connection(uri->hostname, uri->port, &sock, pool));
-      conn = svn_ra_svn_create_conn(sock, NULL, NULL, pool);
+      conn = svn_ra_svn_create_conn(sock, NULL, NULL, NULL, pool);
     }
 
   /* Read server's greeting. */
diff -ur subversion-1.4.2.orig/subversion/libsvn_ra_svn/marshal.c subversion-1.4.2/subversion/libsvn_ra_svn/marshal.c
--- subversion-1.4.2.orig/subversion/libsvn_ra_svn/marshal.c	2006-02-15 21:30:49.000000000 +0000
+++ subversion-1.4.2/subversion/libsvn_ra_svn/marshal.c	2006-11-25 17:02:14.000000000 +0000
@@ -40,19 +40,26 @@
 
 #define svn_iswhitespace(c) ((c) == ' ' || (c) == '\n')
 
+// RISC OS SSH support functions
+extern svn_boolean_t ssh_poll(void *handle);
+extern apr_status_t ssh_send(void *handle, const char *data, apr_size_t *count);
+extern apr_status_t ssh_recv(void *handle, char *data, apr_size_t *count);
+
 /* --- CONNECTION INITIALIZATION --- */
 
 svn_ra_svn_conn_t *svn_ra_svn_create_conn(apr_socket_t *sock,
                                           apr_file_t *in_file,
                                           apr_file_t *out_file,
+                                          void *ssh_handle,
                                           apr_pool_t *pool)
 {
   svn_ra_svn_conn_t *conn = apr_palloc(pool, sizeof(*conn));
 
-  assert((sock && !in_file && !out_file) || (!sock && in_file && out_file));
+  //assert((sock && !in_file && !out_file) || (!sock && in_file && out_file));
   conn->sock = sock;
   conn->in_file = in_file;
   conn->out_file = out_file;
+  conn->ssh_handle = ssh_handle;
   conn->read_ptr = conn->read_buf;
   conn->read_end = conn->read_buf;
   conn->write_pos = 0;
@@ -100,8 +107,10 @@
   conn->block_baton = baton;
   if (conn->sock)
     apr_socket_timeout_set(conn->sock, interval);
-  else
+  else if (conn->out_file)
     apr_file_pipe_timeout_set(conn->out_file, interval);
+  else
+    ssh_timeout_set(conn->ssh_handle, interval);
 }
 
 svn_boolean_t svn_ra_svn__input_waiting(svn_ra_svn_conn_t *conn,
@@ -110,6 +119,9 @@
   apr_pollfd_t pfd;
   int n;
 
+  if (conn->ssh_handle)
+      return ssh_poll(conn->ssh_handle);
+
   if (conn->sock)
     {
       pfd.desc_type = APR_POLL_SOCKET;
@@ -160,8 +172,10 @@
       count = end - data;
       if (conn->sock)
         status = apr_socket_send(conn->sock, data, &count);
-      else
+      else if (conn->out_file)
         status = apr_file_write(conn->out_file, data, &count);
+      else
+        status = ssh_send(conn->ssh_handle, data, &count);
       if (status)
         return svn_error_wrap_apr(status, _("Can't write to connection"));
       if (count == 0)
@@ -251,8 +265,10 @@
     apr_socket_timeout_set(conn->sock, -1);
   if (conn->sock)
     status = apr_socket_recv(conn->sock, data, len);
-  else
+  else if (conn->in_file)
     status = apr_file_read(conn->in_file, data, len);
+  else
+    status = ssh_recv(conn->ssh_handle, data, len);
   if (conn->sock && conn->block_handler)
     apr_socket_timeout_set(conn->sock, 0);
   if (status && !APR_STATUS_IS_EOF(status))
@@ -363,7 +379,7 @@
 }
 
 /* --- WRITING DATA ITEMS --- */
- 
+
 svn_error_t *svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
                                      apr_uint64_t number)
 {
diff -ur subversion-1.4.2.orig/subversion/libsvn_ra_svn/ra_svn.h subversion-1.4.2/subversion/libsvn_ra_svn/ra_svn.h
--- subversion-1.4.2.orig/subversion/libsvn_ra_svn/ra_svn.h	2006-08-18 23:54:14.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_ra_svn/ra_svn.h	2006-11-25 17:02:14.000000000 +0000
@@ -43,6 +43,7 @@
   apr_file_t *in_file;
   apr_file_t *out_file;
   apr_proc_t *proc;       /* Used by client.c when sock is NULL */
+  void *ssh_handle;	  /* used in RISC OS for SSH connections */
   char read_buf[4096];
   char *read_ptr;
   char *read_end;
diff -ur subversion-1.4.2.orig/subversion/libsvn_subr/io.c subversion-1.4.2/subversion/libsvn_subr/io.c
--- subversion-1.4.2.orig/subversion/libsvn_subr/io.c	2006-10-06 19:58:37.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_subr/io.c	2006-11-25 17:02:14.000000000 +0000
@@ -25,6 +25,8 @@
 #include <unistd.h>
 #endif
 
+#include <unixlib/local.h>
+
 #ifndef APR_STATUS_IS_EPERM
 #ifdef EPERM
 #define APR_STATUS_IS_EPERM(s)   ((s) == EPERM)
@@ -766,6 +768,7 @@
     {
       apr_file_t *s;
       apr_finfo_t finfo;
+      svn_string_t *filetype;
 
       SVN_ERR(svn_io_file_open(&s, src, APR_READ, APR_OS_DEFAULT, pool));
       SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_PROT, s, pool));
@@ -786,6 +789,10 @@
             (apr_err, _("Can't set permissions on '%s'"),
              svn_path_local_style(dst_tmp, pool));
         }
+
+      SVN_ERR (svn_io_get_file_filetype(&filetype, src_apr, pool));
+      SVN_ERR (svn_io_set_file_filetype(dst_tmp_apr, filetype, pool));
+
     }
 #endif /* ! WIN32 */
 
@@ -1422,13 +1429,35 @@
 #endif
 }
 
+svn_error_t *
+svn_io_set_file_filetype (const char *path,
+                          const svn_string_t *filetype,
+                          apr_pool_t *pool)
+{
+  if (!getenv ("svn$filetypeext"))
+    {
+      int filetype_val = 0xfff;
+      const char *path_apr;
+      char buf[_POSIX_PATH_MAX];
+
+      SVN_ERR (svn_path_cstring_from_utf8 (&path_apr, path, pool));
+
+      if (filetype && filetype->len > 0)
+      	filetype_val = 0xfff & strtol(filetype->data, NULL, 16);
+
+      __object_set_attrs (path_apr, buf, sizeof (buf), filetype_val, __ATTR_NOTSPECIFIED);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 
 svn_error_t *
 svn_io_is_file_executable(svn_boolean_t *executable, 
                           const char *path, 
                           apr_pool_t *pool)
 {
-#if defined(APR_HAS_USER) && !defined(WIN32)
+#if defined(APR_HAS_USER) && !defined(WIN32) && !defined(__riscos__)
   apr_finfo_t file_info;
   apr_status_t apr_err;
   apr_uid_t uid;
@@ -1462,6 +1491,38 @@
   return SVN_NO_ERROR;
 }
 
+
+svn_error_t *
+svn_io_get_file_filetype(svn_string_t **filetype,
+                          const char *path,
+                          apr_pool_t *pool)
+{
+
+  if (getenv("svn$filetypeext"))
+    {
+      *filetype = NULL;
+    }
+  else
+    {
+      const char *path_apr;
+      char buf[_POSIX_PATH_MAX];
+      int filetype_val;
+
+      SVN_ERR (svn_path_cstring_from_utf8 (&path_apr, path, pool));
+
+      __object_get_attrs (path_apr, buf, sizeof (buf), NULL, &filetype_val, NULL, NULL, NULL, NULL);
+
+      if (filetype_val == __RISCOSIFY_FILETYPE_NOTFOUND)
+        filetype_val = 0xfff;
+
+      *filetype = svn_string_createf (pool, "%.3X", filetype_val);
+
+    }
+
+  return SVN_NO_ERROR;
+}
+
+
 
 /*** File locking. ***/
 /* Clear all outstanding locks on ARG, an open apr_file_t *. */
@@ -1722,7 +1783,7 @@
  See http://subversion.tigris.org/issues/show_bug.cgi?id=1896 for more
  discussion.
 */
-#if defined(__APPLE__) && defined(__MACH__)
+#if defined(__riscos__) || (defined(__APPLE__) && defined(__MACH__))
 #define MACOSX_REWINDDIR_HACK(dir, path)                                      \
   do                                                                          \
     {                                                                         \
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/adm_crawler.c subversion-1.4.2/subversion/libsvn_wc/adm_crawler.c
--- subversion-1.4.2.orig/subversion/libsvn_wc/adm_crawler.c	2006-07-11 15:27:09.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_wc/adm_crawler.c	2006-11-25 17:12:41.000000000 +0000
@@ -83,6 +83,7 @@
 
   /* If necessary, tweak the new working file's executable bit. */
   SVN_ERR(svn_wc__maybe_set_executable(NULL, file_path, adm_access, pool));
+  SVN_ERR (svn_wc__maybe_set_filetype (NULL, file_path, adm_access, pool));
 
   /* Remove any text conflict */
   SVN_ERR(svn_wc_resolved_conflict2(file_path, adm_access, TRUE, FALSE,
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/log.c subversion-1.4.2/subversion/libsvn_wc/log.c
--- subversion-1.4.2.orig/subversion/libsvn_wc/log.c	2006-07-11 12:08:27.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_wc/log.c	2006-11-25 17:38:51.000000000 +0000
@@ -304,6 +304,9 @@
         SVN_ERR(svn_wc__maybe_set_executable(NULL, full_dest_path,
                                              adm_access, pool));
 
+        SVN_ERR(svn_wc__maybe_set_filetype (NULL, full_dest_path, adm_access,
+                                            pool));
+
         return SVN_NO_ERROR;
       }
     case svn_wc__xfer_cp_and_detranslate:
@@ -469,6 +472,10 @@
         *overwrote_working = TRUE;
     }
 
+  SVN_ERR (svn_wc__maybe_set_filetype (&did_set, filepath, adm_access, pool));
+  if (did_set)
+    *overwrote_working = TRUE;
+
   /* Install the new text base if one is waiting. */
   if (kind == svn_node_file)  /* tmp_text_base exists */
     SVN_ERR(svn_wc__sync_text_base(filepath, pool));
@@ -640,6 +647,9 @@
   SVN_ERR(svn_wc__maybe_set_executable(NULL, full_path, loggy->adm_access,
                                       loggy->pool));
 
+  SVN_ERR(svn_wc__maybe_set_filetype(NULL, full_path, loggy->adm_access,
+                                     loggy->pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -957,7 +967,7 @@
   int is_this_dir = (strcmp(name, SVN_WC_ENTRY_THIS_DIR) == 0);
   const char *rev = svn_xml_get_attr_value(SVN_WC__LOG_ATTR_REVISION, atts);
   svn_boolean_t wc_root, overwrote_working = FALSE, remove_executable = FALSE;
-  svn_boolean_t set_read_write = FALSE;
+  svn_boolean_t set_read_write = FALSE, change_filetype = FALSE;
   const char *full_path;
   const char *pdir, *base_name;
   apr_hash_t *entries;
@@ -966,6 +976,7 @@
   apr_time_t text_time = 0; /* By default, don't override old stamp. */
   svn_node_kind_t kind;
   svn_wc_adm_access_t *adm_access;
+  const svn_string_t *filetype;
 
   /* Determine the actual full path of the affected item. */
   if (! is_this_dir)
@@ -1279,9 +1290,13 @@
                     && (propchange->value == NULL))
                   {
                     remove_executable = TRUE;
-                    break;
                   }
-              }                
+                if (! strcmp (propchange->name, SVN_PROP_FILETYPE))
+                  {
+                    filetype = svn_string_dup (propchange->value, pool);
+                    change_filetype = TRUE;
+                  }
+              }
 
             for (i = 0; i < propchanges->nelts; i++)
               {
@@ -1438,7 +1453,6 @@
   return SVN_NO_ERROR;
 }
 
-
 /* See documentation for SVN_WC__LOG_MODIFY_WCPROP. */
 static svn_error_t *
 log_do_modify_wcprop(struct log_runner *loggy,
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/merge.c subversion-1.4.2/subversion/libsvn_wc/merge.c
--- subversion-1.4.2.orig/subversion/libsvn_wc/merge.c	2006-08-22 19:26:22.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_wc/merge.c	2006-11-25 17:02:14.000000000 +0000
@@ -387,6 +387,9 @@
                                                 adm_access, log_merge_target,
                                                 pool));
 
+      SVN_ERR (svn_wc__maybe_set_filetype (NULL, merge_target, adm_access,
+                                           pool));
+
     }
 
   return SVN_NO_ERROR;
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/props.c subversion-1.4.2/subversion/libsvn_wc/props.c
--- subversion-1.4.2.orig/subversion/libsvn_wc/props.c	2006-07-03 09:51:44.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_wc/props.c	2006-11-25 17:39:33.000000000 +0000
@@ -1390,6 +1390,7 @@
                                   SVN_PROP_EXTERNALS,
                                   NULL };
   const char *dir_prohibit[] = { SVN_PROP_EXECUTABLE,
+                                 SVN_PROP_FILETYPE,
                                  SVN_PROP_KEYWORDS,
                                  SVN_PROP_EOL_STYLE,
                                  SVN_PROP_MIME_TYPE,
@@ -1592,6 +1593,11 @@
         }
     }
 
+  if (entry->kind == svn_node_file && strcmp (name, SVN_PROP_FILETYPE) == 0)
+    {
+        SVN_ERR (svn_io_set_file_filetype (path, value, pool));
+    }
+
   if (entry->kind == svn_node_file && strcmp(name, SVN_PROP_NEEDS_LOCK) == 0)
     {
       /* If the svn:needs-lock property was set to NULL, set the file
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/translate.c subversion-1.4.2/subversion/libsvn_wc/translate.c
--- subversion-1.4.2.orig/subversion/libsvn_wc/translate.c	2006-08-03 00:24:25.000000000 +0100
+++ subversion-1.4.2/subversion/libsvn_wc/translate.c	2006-11-25 17:02:14.000000000 +0000
@@ -283,3 +283,25 @@
 
   return SVN_NO_ERROR;
 }
+
+svn_error_t *
+svn_wc__maybe_set_filetype (svn_boolean_t *did_set,
+                              const char *path,
+                              svn_wc_adm_access_t *adm_access,
+                              apr_pool_t *pool)
+{
+  const svn_string_t *propval;
+  SVN_ERR (svn_wc_prop_get (&propval, SVN_PROP_FILETYPE, path, adm_access,
+                            pool));
+
+  if (propval != NULL)
+    {
+      SVN_ERR (svn_io_set_file_filetype (path, propval, pool));
+      if (did_set)
+        *did_set = TRUE;
+    }
+  else if (did_set)
+    *did_set = FALSE;
+
+  return SVN_NO_ERROR;
+}
Only in subversion-1.4.2/subversion/libsvn_wc: translate.c.orig
diff -ur subversion-1.4.2.orig/subversion/libsvn_wc/translate.h subversion-1.4.2/subversion/libsvn_wc/translate.h
--- subversion-1.4.2.orig/subversion/libsvn_wc/translate.h	2006-02-15 21:30:49.000000000 +0000
+++ subversion-1.4.2/subversion/libsvn_wc/translate.h	2006-11-25 17:16:10.000000000 +0000
@@ -103,6 +103,12 @@
                              svn_wc_adm_access_t *adm_access,
                              apr_pool_t *pool);
 
+svn_error_t *
+svn_wc__maybe_set_filetype (svn_boolean_t *did_set,
+                            const char *path,
+                            svn_wc_adm_access_t *adm_access,
+                            apr_pool_t *pool);
+
 /* If the SVN_PROP_NEEDS_LOCK property is present and there is no
    lock token for the file in the working copy, set PATH to
    read-only. If DID_SET is non-null, then set *DID_SET to TRUE if
diff -ur subversion-1.4.2.orig/subversion/svn/main.c subversion-1.4.2/subversion/svn/main.c
--- subversion-1.4.2.orig/subversion/svn/main.c	2006-08-14 21:47:44.000000000 +0100
+++ subversion-1.4.2/subversion/svn/main.c	2006-11-25 17:02:14.000000000 +0000
@@ -48,6 +48,15 @@
 
 #include "svn_private_config.h"
 
+#ifdef __riscos__
+
+#include <unixlib/local.h>
+
+int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS;
+int __feature_imagefs_is_file = 1;
+
+#endif
+
 
 /*** Option Processing ***/
 
@@ -837,6 +846,11 @@
   if (svn_cmdline_init("svn", stderr) != EXIT_SUCCESS)
     return EXIT_FAILURE;
 
+#ifdef __riscos__
+  if (getenv("svn$filetypeext"))
+    __riscosify_control |= __RISCOSIFY_FILETYPE_EXT | __RISCOSIFY_FILETYPE_NOT_SET;
+#endif
+
   /* Create our top-level pool.  Use a seperate mutexless allocator,
    * given this application is single threaded.
    */
diff -ur subversion-1.4.2.orig/subversion/svnserve/main.c subversion-1.4.2/subversion/svnserve/main.c
--- subversion-1.4.2.orig/subversion/svnserve/main.c	2006-07-12 18:07:21.000000000 +0100
+++ subversion-1.4.2/subversion/svnserve/main.c	2006-11-25 17:17:39.000000000 +0000
@@ -487,7 +487,7 @@
           exit(1);
         }
                                 
-      conn = svn_ra_svn_create_conn(NULL, in_file, out_file, pool);
+      conn = svn_ra_svn_create_conn(NULL, in_file, out_file, NULL, pool);
       svn_error_clear(serve(conn, &params, pool));
       exit(0);
     }
@@ -668,7 +668,7 @@
           exit(1);
         }
 
-      conn = svn_ra_svn_create_conn(usock, NULL, NULL, connection_pool);
+      conn = svn_ra_svn_create_conn(usock, NULL, NULL, NULL, connection_pool);
 
       if (run_mode == run_mode_listen_once)
         {
