Index: subversion/libsvn_wc/props.c
===================================================================
--- subversion/libsvn_wc/props.c	(revision 13300)
+++ subversion/libsvn_wc/props.c	(working copy)
@@ -1061,7 +1061,7 @@
         }
       else if (strcmp (name, SVN_PROP_KEYWORDS) == 0)
         {
-          new_value = svn_stringbuf_create_from_string (value, pool);
+          new_value = svn_subst_canonicalize_keywords (value, pool);
           svn_stringbuf_strip_whitespace (new_value);
         }
     }
Index: subversion/libsvn_subr/subst.c
===================================================================
--- subversion/libsvn_subr/subst.c	(revision 13300)
+++ subversion/libsvn_subr/subst.c	(working copy)
@@ -47,6 +47,28 @@
  */
 #define SVN_SUBST__SPECIAL_LINK_STR "link"
 
+/* Structure to be used for canonicalization of svn:keywords */
+typedef struct canon_table_s
+{
+  char prop_value[SVN_KEYWORD_MAX_LEN]; /* the keyword */
+  int canon_index; /* the corresponding canonical form */
+  int canon_flag;
+} canon_table_t;
+canon_table_t canon_table[] = 
+  {
+     { SVN_KEYWORD_REVISION_LONG,   2, 0x0001 },
+     { SVN_KEYWORD_REVISION_SHORT,  2, 0x0001 },
+     { SVN_KEYWORD_REVISION_MEDIUM, 2, 0x0001 },
+     { SVN_KEYWORD_DATE_LONG,       4, 0x0002 },
+     { SVN_KEYWORD_DATE_SHORT,      4, 0x0002 },
+     { SVN_KEYWORD_AUTHOR_LONG,     6, 0x0004 },
+     { SVN_KEYWORD_AUTHOR_SHORT,    6, 0x0004 },
+     { SVN_KEYWORD_URL_SHORT,       7, 0x0008 },
+     { SVN_KEYWORD_URL_LONG,        7, 0x0008 },
+     { SVN_KEYWORD_ID,              9, 0x0010 }
+  };
+int sizeof_canon_table = sizeof(canon_table)/sizeof(canon_table_t) ;
+
 void 
 svn_subst_eol_style_from_value (svn_subst_eol_style_t *style,
                                 const char **eol,
@@ -118,6 +140,55 @@
   return SVN_NO_ERROR;
 }
 
+/* Canonicalize the @a value var, assuming that it contains 
+   a sequence of svn:keywords. */
+svn_stringbuf_t *
+svn_subst_canonicalize_keywords (const svn_string_t *value,
+                                 apr_pool_t *pool)
+{
+  apr_array_header_t *keyword_tokens;
+  svn_stringbuf_t *canonicalized_value = NULL ;
+  int flags = 0 ;
+  int i, j;
+
+  /* tokenize the input */
+  keyword_tokens = svn_cstring_split (value->data, " \t\v\n\b\r\f",
+                                      TRUE /* chop */, pool);
+
+  /* for all the tokens */
+  for (i = 0; i < keyword_tokens->nelts; ++i)
+    {
+      const char *keyword = APR_ARRAY_IDX (keyword_tokens, i, const char *);
+
+      for (j = 0; j < sizeof_canon_table; j++)
+        {
+          /* see if a equivalent standard form exists */
+          if ((! strcasecmp (canon_table[j].prop_value, keyword))
+              && (! (flags & canon_table[j].canon_flag )))
+            {
+              /* If so, canonicalize and prepare output */
+              if (!canonicalized_value)
+                canonicalized_value = svn_stringbuf_create (
+                                                  canon_table[canon_table[j].canon_index].prop_value,
+                                                  pool);
+              else
+                {
+                    svn_stringbuf_appendcstr (
+                                   canonicalized_value, 
+                                   " ");
+                    svn_stringbuf_appendcstr (
+                                   canonicalized_value, 
+                                   canon_table[canon_table[j].canon_index].prop_value);
+                }
+              flags |=  canon_table[j].canon_flag ;
+              break; /* goto the next token from the input */
+            }
+        }
+    }
+
+  return canonicalized_value ;
+}
+
 svn_error_t *
 svn_subst_build_keywords (svn_subst_keywords_t *kw,
                           const char *keywords_val,
Index: subversion/tests/clients/cmdline/prop_tests.py
===================================================================
--- subversion/tests/clients/cmdline/prop_tests.py	(revision 13300)
+++ subversion/tests/clients/cmdline/prop_tests.py	(working copy)
@@ -857,8 +857,8 @@
              ['foo http://foo.com/repos'+os.linesep])
 
   # Check svn:keywords
-  check_prop('svn:keywords', iota_path, ['Rev Date'])
-  check_prop('svn:keywords', mu_path, ['Rev  Date'])
+  check_prop('svn:keywords', iota_path, ['Revision Date'])
+  check_prop('svn:keywords', mu_path, ['Revision Date'])
 
   # Check svn:executable
   check_prop('svn:executable', iota_path, ['*'])
Index: subversion/tests/clients/cmdline/trans_tests.py
===================================================================
--- subversion/tests/clients/cmdline/trans_tests.py	(revision 13300)
+++ subversion/tests/clients/cmdline/trans_tests.py	(working copy)
@@ -714,7 +714,58 @@
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
+ 
+#----------------------------------------------------------------------
+#      Testing for canonicalized input to svn:keywords
+#      Propset a case-different keyword and check if 
+#      expansion works
+def canonicalize_keywords_prop(sbox):
+  "test canonocalization of the svn:keywords input"
+
+  given_input =     [
+                     "lastchangedrevision",
+                     "revision",
+                     "rev",
+                     "lastchangedby",
+                     "author",
+                     "headurl",
+                     "url",
+                     "lastchangeddate",
+                     "date",
+                     "id",
+                     "lastchangedrevision author LastChangedBy"
+                    ]
+  expected_output = [
+                     ["Revision\n"],
+                     ["Revision\n"],
+                     ["Revision\n"],
+                     ["Author\n"],
+                     ["Author\n"],
+                     ["URL\n"],
+                     ["URL\n"],
+                     ["Date\n"],
+                     ["Date\n"],
+                     ["Id\n"],
+                     ["Revision Author\n"]
+                    ]
+			
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # The bug didn't occur if there were multiple files in the
+  # directory, so setup an empty directory.
+  iota_path = os.path.join(wc_dir, 'iota')
   
+  for ctr in range(len(expected_output)):
+    svntest.actions.run_and_verify_svn(None, None, [], 'propset',
+                                       "svn:keywords", 
+                                       given_input[ctr],
+                                       iota_path)
+    svntest.actions.run_and_verify_svn(None,  expected_output[ctr], [], 'propget',
+                                       "svn:keywords", 
+                                       iota_path)
+
+
 ########################################################################
 # Run the tests
 
@@ -732,6 +783,7 @@
               copy_propset_commit,
               propset_commit_checkout_nocrash,
               propset_revert_noerror, 
+              canonicalize_keywords_prop, 
              ]
 
 if __name__ == '__main__':

