Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h	(revision 23437)
+++ subversion/include/svn_wc.h	(working copy)
@@ -474,8 +474,10 @@
 /** One external item.  This usually represents one line from an
  * svn:externals description but with the path and URL
  * canonicalized.
+ *
+ * @since New in 1.5.
  */
-typedef struct svn_wc_external_item_t
+typedef struct svn_wc_external_item2_t
 {
   /** The name of the subdirectory into which this external should be
       checked out.  This is relative to the parent directory that
@@ -492,23 +494,55 @@
       svn_opt_revision_head. */
   svn_opt_revision_t revision;
 
-} svn_wc_external_item_t;
+  /** The peg revision to use when checking out.  THe only valid kinds are
+      svn_opt_revision_number, svn_opt_revision_date, and
+      svn_opt_revision_head. */
+  svn_opt_revision_t peg_revision;
 
+} svn_wc_external_item2_t;
 
 /**
  * Return a duplicate of @a item, allocated in @a pool.  No part of the new
  * item will be shared with @a item.
  *
+ * @since New in 1.5.
+ */
+svn_wc_external_item2_t *
+svn_wc_external_item2_dup(const svn_wc_external_item2_t *item,
+                          apr_pool_t *pool);
+
+/**
+ * One external item.  Similar to svn_wc_external_item2_t, except 
+ * @a revision is interpreted as both the operational revision and the
+ * peg revision.
+ *
+ * @deprecated Provided for backward compatibility with the 1.4 API.
+ */
+typedef struct svn_wc_external_item_t
+{
+  const char *target_dir;
+
+  const char *url;
+
+  svn_opt_revision_t revision;
+
+} svn_wc_external_item_t;
+
+/**
+ * Return a duplicate of @a item, allocated in @a pool.  No part of the new
+ * item will be shared with @a item.
+ *
  * @since New in 1.3.
+ *
+ * @deprecated Provided for backward compatibility with the 1.4 API.
  */
 svn_wc_external_item_t *
 svn_wc_external_item_dup(const svn_wc_external_item_t *item,
                          apr_pool_t *pool);
 
-
 /**
  * If @a externals_p is non-null, set @a *externals_p to an array of
- * @c svn_wc_external_item_t * objects based on @a desc.
+ * @c svn_wc_external_item2_t * objects based on @a desc.
  *
  * If the format of @a desc is invalid, don't touch @a *externals_p and
  * return @c SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION.  Thus, if
@@ -522,7 +556,22 @@
  *
  * Use @a parent_directory only in constructing error strings.
  *
+ * @since New in 1.5.
+ */
+svn_error_t *
+svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
+                                    const char *parent_directory,
+                                    const char *desc,
+                                    apr_pool_t *pool);
+
+/**
+ * Similar to svn_wc_parse_externals_description3(), but returns an
+ * array of @c svn_wc_external_item2_t * objects instead of 
+ * @c svn_wc_external_item_t * objects.
+ *
  * @since New in 1.1.
+ *
+ * @deprecated Provided for backward compatibility with the 1.4 API.
  */
 svn_error_t *
 svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
@@ -530,7 +579,6 @@
                                     const char *desc,
                                     apr_pool_t *pool);
 
-
 /**
  * Similar to svn_wc_parse_externals_description2(), but returns the
  * parsed externals in a hash instead of an array.  This function
Index: subversion/libsvn_wc/props.c
===================================================================
--- subversion/libsvn_wc/props.c	(revision 23437)
+++ subversion/libsvn_wc/props.c	(working copy)
@@ -2087,7 +2087,7 @@
 /** Externals **/
 
 svn_error_t *
-svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
+svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
                                     const char *parent_directory,
                                     const char *desc,
                                     apr_pool_t *pool)
@@ -2098,13 +2098,13 @@
     parent_directory : svn_path_local_style(parent_directory, pool);
   
   if (externals_p)
-    *externals_p = apr_array_make(pool, 1, sizeof(svn_wc_external_item_t *));
+    *externals_p = apr_array_make(pool, 1, sizeof(svn_wc_external_item2_t *));
 
   for (i = 0; i < lines->nelts; i++)
     {
       const char *line = APR_ARRAY_IDX(lines, i, const char *);
       apr_array_header_t *line_parts;
-      svn_wc_external_item_t *item;
+      svn_wc_external_item2_t *item;
 
       if ((! line) || (line[0] == '#'))
         continue;
@@ -2114,6 +2114,7 @@
       line_parts = svn_cstring_split(line, " \t", TRUE, pool);
 
       item = apr_palloc(pool, sizeof(*item));
+      item->revision.kind = svn_opt_revision_unspecified;
 
       if (line_parts->nelts < 2)
         goto parse_error;
@@ -2123,7 +2124,6 @@
           /* No "-r REV" given. */
           item->target_dir = APR_ARRAY_IDX(line_parts, 0, const char *);
           item->url = APR_ARRAY_IDX(line_parts, 1, const char *);
-          item->revision.kind = svn_opt_revision_head;
         }
       else if ((line_parts->nelts == 3) || (line_parts->nelts == 4))
         {
@@ -2197,16 +2197,58 @@
              parent_directory_display);
       }
 
+      SVN_ERR(svn_opt_parse_path(&item->peg_revision, &item->url, item->url,
+                                 pool));
+      svn_opt_resolve_revisions(&item->peg_revision, &item->revision, TRUE,
+                                FALSE);
+    
       item->url = svn_path_canonicalize(item->url, pool);
 
       if (externals_p)
-        APR_ARRAY_PUSH(*externals_p, svn_wc_external_item_t *) = item;
+        APR_ARRAY_PUSH(*externals_p, svn_wc_external_item2_t *) = item;
     }
 
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
+                                    const char *parent_directory,
+                                    const char *desc,
+                                    apr_pool_t *pool)
+{
+  apr_array_header_t *list;
+  apr_pool_t *subpool = svn_pool_create(pool);
+  int i;
 
+  SVN_ERR(svn_wc_parse_externals_description3(externals_p ? &list : NULL,
+                                              parent_directory, desc, subpool));
+
+  if (externals_p)
+    {
+      *externals_p = apr_array_make(pool, list->nelts,
+                                    sizeof(svn_wc_external_item_t *));
+      for (i = 0; i < list->nelts; i++)
+        {
+          svn_wc_external_item2_t *item2 = APR_ARRAY_IDX(list, i,
+                                             svn_wc_external_item2_t *);
+          svn_wc_external_item_t *item = apr_palloc(pool, sizeof (*item));
+
+          if (item->target_dir)
+            item->target_dir = apr_pstrdup(pool, item2->target_dir);
+          if (item->url)
+            item->url = apr_pstrdup(pool, item2->url);
+          item->revision = item2->revision;
+
+          APR_ARRAY_PUSH(*externals_p, svn_wc_external_item_t *) = item;
+        }
+    }
+
+  svn_pool_destroy(subpool);
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_wc_parse_externals_description(apr_hash_t **externals_p,
                                    const char *parent_directory,
Index: subversion/libsvn_wc/util.c
===================================================================
--- subversion/libsvn_wc/util.c	(revision 23437)
+++ subversion/libsvn_wc/util.c	(working copy)
@@ -177,6 +177,22 @@
   return new_item;
 }
 
+svn_wc_external_item2_t *
+svn_wc_external_item2_dup(const svn_wc_external_item2_t *item, apr_pool_t *pool)
+{
+  svn_wc_external_item2_t *new_item = apr_palloc(pool, sizeof(*new_item));
+
+  *new_item = *item;
+
+  if (new_item->target_dir)
+    new_item->target_dir = apr_pstrdup(pool, new_item->target_dir);
+
+  if (new_item->url)
+    new_item->url = apr_pstrdup(pool, new_item->url);
+
+  return new_item;
+}
+
 void svn_wc__compat_call_notify_func(void *baton,
                                      const svn_wc_notify_t *n,
                                      apr_pool_t *pool)
Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c	(revision 23437)
+++ subversion/libsvn_wc/status.c	(working copy)
@@ -841,13 +841,13 @@
 
           /* Now, parse the thing, and copy the parsed results into
              our "global" externals hash. */
-          SVN_ERR(svn_wc_parse_externals_description2(&ext_items, path,
+          SVN_ERR(svn_wc_parse_externals_description3(&ext_items, path,
                                                       prop_val->data, pool));
           for (i = 0; ext_items && i < ext_items->nelts; i++)
             {
-              svn_wc_external_item_t *item;
+              svn_wc_external_item2_t *item;
 
-              item = APR_ARRAY_IDX(ext_items, i, svn_wc_external_item_t *);
+              item = APR_ARRAY_IDX(ext_items, i, svn_wc_external_item2_t *);
               apr_hash_set(eb->externals, svn_path_join(path,
                                                         item->target_dir,
                                                         pool),
Index: subversion/libsvn_client/externals.c
===================================================================
--- subversion/libsvn_client/externals.c	(revision 23437)
+++ subversion/libsvn_client/externals.c	(working copy)
@@ -68,13 +68,15 @@
    we could get away with an "update -r" on the external, instead of
    a re-checkout. */
 static svn_boolean_t
-compare_external_items(svn_wc_external_item_t *new_item,
-                       svn_wc_external_item_t *old_item)
+compare_external_items(svn_wc_external_item2_t *new_item,
+                       svn_wc_external_item2_t *old_item)
 {
   if ((strcmp(new_item->target_dir, old_item->target_dir) != 0)
       || (strcmp(new_item->url, old_item->url) != 0)
       || (! svn_client__compare_revisions(&(new_item->revision),
-                                          &(old_item->revision))))
+                                          &(old_item->revision)))
+      || (! svn_client__compare_revisions(&(new_item->peg_revision),
+                                          &(old_item->peg_revision))))
     return FALSE;
     
   /* Else. */
@@ -161,6 +163,7 @@
 switch_external(const char *path,
                 const char *url,
                 const svn_opt_revision_t *revision,
+                const svn_opt_revision_t *peg_revision,
                 svn_boolean_t *timestamp_sleep,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool)
@@ -269,7 +272,7 @@
     }
 
   /* ... Hello, new hotness. */
-  SVN_ERR(svn_client__checkout_internal(NULL, url, path, revision, revision,
+  SVN_ERR(svn_client__checkout_internal(NULL, url, path, peg_revision, revision,
                                         TRUE, FALSE, FALSE, timestamp_sleep,
                                         ctx, pool));
 
@@ -284,7 +287,7 @@
                             void *baton)
 {
   struct handle_external_item_change_baton *ib = baton;
-  svn_wc_external_item_t *old_item, *new_item;
+  svn_wc_external_item2_t *old_item, *new_item;
   const char *parent;
   const char *path = svn_path_join(ib->parent_dir,
                                    (const char *) key, ib->pool);
@@ -356,14 +359,14 @@
            directory above it did, which means the user would have
            already had to force these creations to occur. */
         SVN_ERR(svn_client_export3(NULL, new_item->url, path,
+                                   &(new_item->peg_revision),
                                    &(new_item->revision),
-                                   &(new_item->revision),
                                    TRUE, FALSE, TRUE, NULL,
                                    ib->ctx, ib->pool));
       else
         SVN_ERR(svn_client__checkout_internal(NULL, new_item->url, path,
+                                              &(new_item->peg_revision),
                                               &(new_item->revision),
-                                              &(new_item->revision),
                                               TRUE, FALSE, FALSE,
                                               ib->timestamp_sleep,
                                               ib->ctx, ib->pool));
@@ -415,6 +418,7 @@
          the external really is a WC pointing to the correct
          URL/revision. */
       SVN_ERR(switch_external(path, new_item->url, &(new_item->revision),
+                              &(new_item->peg_revision),
                               ib->timestamp_sleep, ib->ctx, ib->pool));
     }
 
@@ -457,16 +461,16 @@
   apr_array_header_t *old_desc, *new_desc;
   apr_hash_t *old_desc_hash, *new_desc_hash;
   int i;
-  svn_wc_external_item_t *item;
+  svn_wc_external_item2_t *item;
 
   if ((old_desc_text = apr_hash_get(cb->externals_old, key, klen)))
-    SVN_ERR(svn_wc_parse_externals_description2(&old_desc, key,
+    SVN_ERR(svn_wc_parse_externals_description3(&old_desc, key,
                                                 old_desc_text, cb->pool));
   else
     old_desc = NULL;
 
   if ((new_desc_text = apr_hash_get(cb->externals_new, key, klen)))
-    SVN_ERR(svn_wc_parse_externals_description2(&new_desc, key,
+    SVN_ERR(svn_wc_parse_externals_description3(&new_desc, key,
                                                 new_desc_text, cb->pool));
   else
     new_desc = NULL;
@@ -478,7 +482,7 @@
      efficiently generate a diff for them. */
   for (i = 0; old_desc && (i < old_desc->nelts); i++)
     {
-      item = APR_ARRAY_IDX(old_desc, i, svn_wc_external_item_t *);
+      item = APR_ARRAY_IDX(old_desc, i, svn_wc_external_item2_t *);
 
       apr_hash_set(old_desc_hash, item->target_dir,
                    APR_HASH_KEY_STRING, item);
@@ -486,7 +490,7 @@
   
   for (i = 0; new_desc && (i < new_desc->nelts); i++)
     {
-      item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item_t *);
+      item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item2_t *);
 
       apr_hash_set(new_desc_hash, item->target_dir,
                    APR_HASH_KEY_STRING, item);
@@ -507,7 +511,7 @@
 
   for (i = 0; old_desc && (i < old_desc->nelts); i++)
     {
-      item = APR_ARRAY_IDX(old_desc, i, svn_wc_external_item_t *);
+      item = APR_ARRAY_IDX(old_desc, i, svn_wc_external_item2_t *);
 
       if (apr_hash_get(new_desc_hash, item->target_dir, APR_HASH_KEY_STRING))
         SVN_ERR(handle_external_item_change(item->target_dir,
@@ -520,7 +524,7 @@
     }
   for (i = 0; new_desc && (i < new_desc->nelts); i++)
     {
-      item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item_t *);
+      item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item2_t *);
       if (! apr_hash_get(old_desc_hash, item->target_dir, APR_HASH_KEY_STRING))
         SVN_ERR(handle_external_item_change(item->target_dir,
                                             APR_HASH_KEY_STRING,
@@ -627,7 +631,7 @@
 
       /* Parse the svn:externals property value.  This results in a
          hash mapping subdirectories to externals structures. */
-      SVN_ERR(svn_wc_parse_externals_description2(&exts, path, 
+      SVN_ERR(svn_wc_parse_externals_description3(&exts, path, 
                                                   propval, subpool));
 
       /* Make a sub-pool of SUBPOOL. */
@@ -637,12 +641,12 @@
       for (i = 0; exts && (i < exts->nelts); i++)
         {
           const char *fullpath;
-          svn_wc_external_item_t *external;
+          svn_wc_external_item2_t *external;
           svn_node_kind_t kind;
 
           svn_pool_clear(iterpool);
 
-          external = APR_ARRAY_IDX(exts, i, svn_wc_external_item_t *);
+          external = APR_ARRAY_IDX(exts, i, svn_wc_external_item2_t *);
           fullpath = svn_path_join(path, external->target_dir, iterpool);
 
           /* If the external target directory doesn't exist on disk,
Index: subversion/tests/cmdline/externals_tests.py
===================================================================
--- subversion/tests/cmdline/externals_tests.py	(revision 23437)
+++ subversion/tests/cmdline/externals_tests.py	(working copy)
@@ -57,11 +57,11 @@
   The arrangement of the externals in the first repository is:
 
      /A/C/     ==>  exdir_G       <scheme>:///<other_repos>/A/D/G
-                    exdir_H  -r 1 <scheme>:///<other_repos>/A/D/H
+                    exdir_H@1     <scheme>:///<other_repos>/A/D/H
 
      /A/D/     ==>  exdir_A          <scheme>:///<other_repos>/A
                     exdir_A/G        <scheme>:///<other_repos>/A/D/G
-                    exdir_A/H  -r 3  <scheme>:///<other_repos>/A/D/H
+                    exdir_A/H@3      <scheme>:///<other_repos>/A/D/H
                     x/y/z/blah       <scheme>:///<other_repos>/A/B
 
   NOTE: Before calling this, use externals_test_cleanup(SBOX) to
@@ -130,8 +130,8 @@
 
   # Set up the externals properties on A/B/ and A/D/.
   externals_desc = \
-           "exdir_G       " + other_repo_url + "/A/D/G" + "\n" + \
-           "exdir_H  -r 1 " + other_repo_url + "/A/D/H" + "\n"
+           "exdir_G       " + other_repo_url + "/A/D/G"   + "\n" + \
+           "exdir_H       " + other_repo_url + "/A/D/H@1" + "\n"
 
   tmp_f = os.tempnam(wc_init_dir, 'tmp')
   svntest.main.file_append(tmp_f, externals_desc)
@@ -142,13 +142,13 @@
   os.remove(tmp_f)
 
   externals_desc = \
-           "exdir_A           " + other_repo_url + "/A"      + \
-           "\n"                                              + \
-           "exdir_A/G/        " + other_repo_url + "/A/D/G/" + \
-           "\n"                                              + \
-           "exdir_A/H   -r 1  " + other_repo_url + "/A/D/H"  + \
-           "\n"                                              + \
-           "x/y/z/blah        " + other_repo_url + "/A/B"    + \
+           "exdir_A           " + other_repo_url + "/A"        + \
+           "\n"                                                + \
+           "exdir_A/G/        " + other_repo_url + "/A/D/G/"   + \
+           "\n"                                                + \
+           "exdir_A/H         " + other_repo_url + "/A/D/H@1"  + \
+           "\n"                                                + \
+           "x/y/z/blah        " + other_repo_url + "/A/B"      + \
            "\n"
 
   svntest.main.file_append(tmp_f, externals_desc)
@@ -286,15 +286,15 @@
   # Add one new external item to the property on A/D.  The new item is
   # "exdir_E", deliberately added in the middle not at the end.
   new_externals_desc = \
-           "exdir_A           " + other_repo_url + "/A"     + \
-           "\n"                                             + \
-           "exdir_A/G         " + other_repo_url + "/A/D/G" + \
-           "\n"                                             + \
-           "exdir_E           " + other_repo_url + "/A/B/E" + \
-           "\n"                                             + \
-           "exdir_A/H   -r 1  " + other_repo_url + "/A/D/H" + \
-           "\n"                                             + \
-           "x/y/z/blah        " + other_repo_url + "/A/B/E" + \
+           "exdir_A           " + other_repo_url + "/A"       + \
+           "\n"                                               + \
+           "exdir_A/G         " + other_repo_url + "/A/D/G"   + \
+           "\n"                                               + \
+           "exdir_E           " + other_repo_url + "/A/B/E"   + \
+           "\n"                                               + \
+           "exdir_A/H         " + other_repo_url + "/A/D/H@1" + \
+           "\n"                                               + \
+           "x/y/z/blah        " + other_repo_url + "/A/B/E"   + \
            "\n"
 
   # Set and commit the property
@@ -348,11 +348,11 @@
   #    A/D/exdir_A/H/...                     A/D/exdir_A/H/...
 
   new_externals_desc = \
-           "exdir_A/G         " + other_repo_url + "/A/D/G" + \
-           "\n"                                             + \
-           "exdir_A/H   -r 1  " + other_repo_url + "/A/D/H" + \
-           "\n"                                             + \
-           "x/y/z/blah        " + other_repo_url + "/A/B/E" + \
+           "exdir_A/G         " + other_repo_url + "/A/D/G"   + \
+           "\n"                                               + \
+           "exdir_A/H         " + other_repo_url + "/A/D/H@1" + \
+           "\n"                                               + \
+           "x/y/z/blah        " + other_repo_url + "/A/B/E"   + \
            "\n"
 
   # Set and commit the property
@@ -406,13 +406,13 @@
   # URL.  Since no changes were made to the old checked-out external,
   # we should get a clean replace.
   new_externals_desc = \
-           "exdir_A           " + other_repo_url + "/A"     + \
-           "\n"                                             + \
-           "exdir_A/G         " + other_repo_url + "/A/D/G" + \
-           "\n"                                             + \
-           "exdir_A/H   -r 1  " + other_repo_url + "/A/D/H" + \
-           "\n"                                             + \
-           "x/y/z/blah        " + other_repo_url + "/A/B/F" + \
+           "exdir_A           " + other_repo_url + "/A"       + \
+           "\n"                                               + \
+           "exdir_A/G         " + other_repo_url + "/A/D/G"   + \
+           "\n"                                               + \
+           "exdir_A/H         " + other_repo_url + "/A/D/H@1" + \
+           "\n"                                               + \
+           "x/y/z/blah        " + other_repo_url + "/A/B/F"   + \
            "\n"
 
   # Set and commit the property
@@ -465,13 +465,13 @@
   # URL.  There are some local mods under the old checked-out external,
   # so the old dir should be saved under a new name.
   new_externals_desc = \
-           "exdir_A           " + other_repo_url + "/A"     + \
-           "\n"                                             + \
-           "exdir_A/G         " + other_repo_url + "/A/D/G" + \
-           "\n"                                             + \
-           "exdir_A/H   -r 1  " + other_repo_url + "/A/D/H" + \
-           "\n"                                             + \
-           "x/y/z/blah        " + other_repo_url + "/A/B/F" + \
+           "exdir_A           " + other_repo_url + "/A"       + \
+           "\n"                                               + \
+           "exdir_A/G         " + other_repo_url + "/A/D/G"   + \
+           "\n"                                               + \
+           "exdir_A/H         " + other_repo_url + "/A/D/H@1" + \
+           "\n"                                               + \
+           "x/y/z/blah        " + other_repo_url + "/A/B/F"   + \
            "\n"
 
   # Set and commit the property
@@ -598,9 +598,9 @@
   # Add one more external item
   B_path = os.path.join(wc_dir, "A/B")
   externals_desc = \
-          "exdir_G       " + other_repo_url + "/A/D/G" + "\n" + \
-          "exdir_H  -r 1 " + other_repo_url + "/A/D/H" + "\n" + \
-          "exdir_Z       " + other_repo_url + "/A/D/H" + "\n"
+          "exdir_G       " + other_repo_url + "/A/D/G"   + "\n" + \
+          "exdir_H       " + other_repo_url + "/A/D/H@1" + "\n" + \
+          "exdir_Z       " + other_repo_url + "/A/D/H"   + "\n"
 
   tmp_f = os.tempnam()
   svntest.main.file_append(tmp_f, externals_desc)
@@ -715,8 +715,46 @@
     raise svntest.Failure("Unexpected contents for rev 1 of " +
                           exdir_H_omega_path)
 
+#----------------------------------------------------------------------
 
+def external_with_peg_and_op_revision(sbox):
+  "use a peg revision to specify an external module"
 
+  externals_test_setup(sbox)
+  wc_dir         = sbox.wc_dir
+  
+  repo_dir       = sbox.repo_dir
+  repo_url       = sbox.repo_url
+  other_repo_url = repo_url + ".other"
+
+  # Checkout a working copy.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'checkout',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     repo_url, wc_dir)
+
+  # Set an external property using peg revision syntax.
+  new_externals_desc = \
+           "exdir_A/H  -r 1  " + other_repo_url + "/A/D/H@4" + \
+           "\n"
+
+  # Set and commit the property.
+  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+
+  # Update other working copy, see if we get the right change.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+  external_chi_path = os.path.join(wc_dir, 'A', 'D', 'exdir_A', 'H', 'chi')
+  fp = open(external_chi_path, 'r')
+  lines = fp.readlines()
+  if not ((len(lines) == 1)
+          and (lines[0] == "This is the file 'chi'.\n")):
+    raise svntest.Failure("Unexpected contents for externally modified " +
+                          external_chi_path)
+  fp.close()
+
+
 ########################################################################
 # Run the tests
 
@@ -732,6 +770,7 @@
               modify_and_update_receive_new_external,
               disallow_dot_or_dotdot_directory_reference,
               export_with_externals,
+              external_with_peg_and_op_revision,
              ]
 
 if __name__ == '__main__':

