Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h	(revision 14982)
+++ subversion/include/svn_wc.h	(working copy)
@@ -2974,6 +2974,18 @@
                                          apr_hash_t *config,
                                          apr_pool_t *pool);
 
+/** Get the list of ignore patterns from the @c svn_config_t's in the 
+ * @a config hash and the local ignore patterns from the directory
+ * in @a adm_access. The default and local ignore patterns are stored in
+ * @a *patterns. Allocate @a *patterns and its contents in @pool.
+ *
+ * @since New in 1.3.
+ */
+svn_error_t *svn_wc_get_ignores (apr_array_header_t **patterns,
+                                 apr_hash_t *config,
+                                 svn_wc_adm_access_t *adm_access,
+                                 apr_pool_t *pool);
+
 
 /** Add @a lock to the working copy for @a path.  @a adm_access must contain
  * a write lock for @a path.  If @a path is read-only, due to locking
Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c	(revision 14982)
+++ subversion/libsvn_wc/status.c	(working copy)
@@ -520,7 +520,7 @@
    None of the arguments may be NULL.
 */
 static svn_error_t *
-collect_ignore_patterns (apr_array_header_t *patterns,
+collect_ignore_patterns (apr_array_header_t **patterns,
                          apr_array_header_t *ignores,
                          svn_wc_adm_access_t *adm_access,
                          apr_pool_t *pool)
@@ -528,11 +528,12 @@
   int i;
   const svn_string_t *value;
 
+  *patterns = apr_array_make (pool, 1, sizeof (const char *));
   /* Copy default ignores into the local PATTERNS array. */
   for (i = 0; i < ignores->nelts; i++)
     {
       const char *ignore = APR_ARRAY_IDX (ignores, i, const char *);
-      APR_ARRAY_PUSH (patterns, const char *) = ignore;
+      APR_ARRAY_PUSH (*patterns, const char *) = ignore;
     }
 
   /* Then add any svn:ignore globs to the PATTERNS array. */
@@ -540,7 +541,7 @@
                             svn_wc_adm_access_path (adm_access), adm_access,
                             pool));
   if (value != NULL)
-    svn_cstring_split_append (patterns, value->data, "\n\r", FALSE, pool);
+    svn_cstring_split_append (*patterns, value->data, "\n\r", FALSE, pool);
 
   return SVN_NO_ERROR;   
 } 
@@ -768,11 +769,8 @@
   /* Unless specified, add default ignore regular expressions and try
      to add any svn:ignore properties from the parent directory. */
   if (ignores)
-    {
-      patterns = apr_array_make (subpool, 1, sizeof (const char *));
-      SVN_ERR (collect_ignore_patterns (patterns, ignores, 
-                                        adm_access, subpool));
-    }
+    SVN_ERR (collect_ignore_patterns (&patterns, ignores, 
+                                      adm_access, subpool));
 
   /* If "this dir" has "svn:externals" property set on it, store its
      name and value in traversal_info.  Also, we want to track the
@@ -1988,3 +1986,18 @@
   /* Return the new hotness. */
   return new_stat;
 }
+
+svn_error_t *
+svn_wc_get_ignores (apr_array_header_t **patterns,
+                    apr_hash_t *config,
+                    svn_wc_adm_access_t *adm_access,
+                    apr_pool_t *pool)
+{
+  apr_array_header_t *default_ignores;
+
+  SVN_ERR (svn_wc_get_default_ignores (&default_ignores, config, pool));
+  SVN_ERR (collect_ignore_patterns (patterns, default_ignores, adm_access, 
+                                    pool));
+
+  return SVN_NO_ERROR;
+}
Index: subversion/libsvn_client/add.c
===================================================================
--- subversion/libsvn_client/add.c	(revision 14982)
+++ subversion/libsvn_client/add.c	(working copy)
@@ -293,7 +293,7 @@
 
   SVN_ERR (svn_wc_adm_retrieve (&dir_access, adm_access, dirname, pool));
 
-  SVN_ERR (svn_wc_get_default_ignores (&ignores, ctx->config, pool));
+  SVN_ERR (svn_wc_get_ignores (&ignores, ctx->config, adm_access, pool));
 
   /* Create a subpool for iterative memory control. */
   subpool = svn_pool_create (pool);
Index: subversion/tests/clients/cmdline/basic_tests.py
===================================================================
--- subversion/tests/clients/cmdline/basic_tests.py	(revision 14982)
+++ subversion/tests/clients/cmdline/basic_tests.py	(working copy)
@@ -1440,6 +1440,30 @@
 
 
 #----------------------------------------------------------------------
+def basic_add_local_ignores(sbox):
+  'ignore files matching local ignores in added dirs'
+
+  #Issue #2243 
+  #svn add command not keying off svn:ignore value
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  dir_path = os.path.join(wc_dir, 'dir')
+  file_path = os.path.join(dir_path, 'app.lock')
+
+  os.mkdir(dir_path, 0755)
+  open(file_path, 'w')
+
+  svntest.main.run_svn(None, 'propset', 'svn:ignore', '*.lock', wc_dir) 
+  output, err = svntest.actions.run_and_verify_svn(
+    "No output where some expected", SVNAnyOutput, None,
+    'add', dir_path)
+
+  for line in output:
+    # If we see app.lock in the add output, fail the test.
+    if re.match(r'^A\s+.*.lock$', line):
+      raise svntest.actions.SVNUnexpectedOutput
+#----------------------------------------------------------------------
 def uri_syntax(sbox):
   'make sure URI syntaxes are parsed correctly'
 
@@ -1537,6 +1561,7 @@
               uri_syntax,
               basic_checkout_file,
               basic_info,
+              basic_add_local_ignores,
               ### todo: more tests needed:
               ### test "svn rm http://some_url"
               ### not sure this file is the right place, though.


