You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/10/01 16:38:45 UTC
svn commit: r1706266 - in /subversion/branches/move-tracking-2/subversion:
include/private/ libsvn_delta/ libsvn_ra/ svnmover/ tests/cmdline/svntest/
Author: julianfoad
Date: Thu Oct 1 14:38:44 2015
New Revision: 1706266
URL: http://svn.apache.org/viewvc?rev=1706266&view=rev
Log:
On the 'move-tracking-2' branch: Record where branches were branched from.
* subversion/include/private/svn_branch.h,
subversion/libsvn_delta/branch.c
(svn_branch_rev_bid_t,
svn_branch_rev_bid_create,
svn_branch_rev_bid_dup): New.
(svn_branch_state_t,
svn_branch_state_create,
svn_branch_add_new_branch,
svn_branch_subtree_t): Add a 'predecessor' field.
(svn_branch_get_subtree): Fill in the 'predecessor' field.
(svn_branch_instantiate_subtree): Pass on the predecessor when creating
any nested branches.
(parse_branch_line,
svn_branch_state_parse,
svn_branch_state_serialize): Read and write the branch predecessor info.
(svn_branch_revision_root_serialize): Finalize the predecessor 'rev' field
by converting '-1' to the committed revision number.
* subversion/include/private/svn_editor3e.h,
subversion/libsvn_delta/editor3e.c
(svn_editor3_open_branch,
svn_editor3_open_branch_t): Add a 'predecessor' field.
(wrap_open_branch,
change_detection_open_branch): Adjust accordingly.
* subversion/libsvn_delta/compat3e.c
(editor3_open_branch,
editor3_branch): Pass on the predecessor when creating a new branch.
* subversion/libsvn_ra/ra_loader.c
(svn_branch_get_mutable_state): Update all the 'predecessor' info to point
to the base revision instead of to that revision's predecessor.
* subversion/svnmover/svnmover.c
(svn_branch_replay): Pass on the predecessor when creating a new branch.
(mk_branch): Pass null for the predecessor of the new branch.
* subversion/tests/cmdline/svntest/wc.py
(re_parse_eid_branch,
State.from_eids): Adjust the regex for matching the branch metadata.
Modified:
subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h
subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h
subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c
subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c
subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c
subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/wc.py
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_branch.h Thu Oct 1 14:38:44 2015
@@ -115,6 +115,8 @@ typedef struct svn_branch_el_rev_id_t sv
typedef struct svn_branch_rev_bid_eid_t svn_branch_rev_bid_eid_t;
+typedef struct svn_branch_rev_bid_t svn_branch_rev_bid_t;
+
typedef struct svn_branch_state_t svn_branch_state_t;
/* Per-repository branching info.
@@ -235,6 +237,10 @@ struct svn_branch_state_t
{
/* --- Identity of this object --- */
+ /* The previous location in the lifeline of this branch. */
+ /* (REV = -1 means "in this txn") */
+ svn_branch_rev_bid_t *predecessor;
+
/* The EID of its pathwise root element. */
int root_eid;
@@ -264,7 +270,8 @@ struct svn_branch_state_t
* element).
*/
svn_branch_state_t *
-svn_branch_state_create(int root_eid,
+svn_branch_state_create(svn_branch_rev_bid_t *predecessor,
+ int root_eid,
svn_branch_revision_root_t *rev_root,
svn_branch_state_t *outer_branch,
int outer_eid,
@@ -329,6 +336,7 @@ svn_branch_id_unnest(const char **outer_
*/
svn_branch_state_t *
svn_branch_add_new_branch(svn_branch_revision_root_t *rev_root,
+ svn_branch_rev_bid_t *predecessor,
svn_branch_state_t *outer_branch,
int outer_eid,
int root_eid,
@@ -393,6 +401,16 @@ struct svn_branch_rev_bid_eid_t
};
+/* Revision-branch id. */
+struct svn_branch_rev_bid_t
+{
+ /* Revision. SVN_INVALID_REVNUM means 'in this transaction', not 'head'. */
+ svn_revnum_t rev;
+ /* The branch id in revision REV. */
+ const char *bid;
+
+};
+
/* Return a new el_rev_id object constructed with *shallow* copies of BRANCH,
* EID and REV, allocated in RESULT_POOL.
*/
@@ -410,12 +428,19 @@ svn_branch_rev_bid_eid_create(svn_revnum
const char *branch_id,
int eid,
apr_pool_t *result_pool);
+svn_branch_rev_bid_t *
+svn_branch_rev_bid_create(svn_revnum_t rev,
+ const char *branch_id,
+ apr_pool_t *result_pool);
/* Return a new id object constructed with a deep copy of OLD_ID,
* allocated in RESULT_POOL. */
svn_branch_rev_bid_eid_t *
svn_branch_rev_bid_eid_dup(const svn_branch_rev_bid_eid_t *old_id,
apr_pool_t *result_pool);
+svn_branch_rev_bid_t *
+svn_branch_rev_bid_dup(const svn_branch_rev_bid_t *old_id,
+ apr_pool_t *result_pool);
/* The content (parent, name and payload) of an element-revision.
* In other words, an el-rev node in a (mixed-rev) directory-tree.
@@ -474,6 +499,8 @@ svn_branch_el_rev_content_equal(const sv
*/
typedef struct svn_branch_subtree_t
{
+ svn_branch_rev_bid_t *predecessor;
+
/* EID -> svn_branch_el_rev_content_t mapping. */
apr_hash_t *e_map;
Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_editor3e.h Thu Oct 1 14:38:44 2015
@@ -595,6 +595,9 @@ svn_editor3_new_eid(svn_editor3_t *edito
* this method conceptually returns a "branch editor" for the designated
* branch.
*
+ * When adding a new branch, PREDECESSOR and ROOT_EID are used; when
+ * finding an existing branch they must match it (else throw an error).
+ *
* ### Should we take a single branch-id parameter instead of taking
* (outer-bid, outer-eid) and returning the new branch-id?
*
@@ -605,14 +608,11 @@ svn_editor3_new_eid(svn_editor3_t *edito
* outer-branch-id conceptually identifies "this branch" that we're
* editing and could be represented instead by a different value of
* the "editor" parameter; and the subbranch must be an immediate child.
- *
- * ### Only the 'add' case needs the subbranch root EID.
- * In the 'add' case will we want to take a 'branched from' param,
- * and can we have that in the combined method too?
*/
svn_error_t *
svn_editor3_open_branch(svn_editor3_t *editor,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
@@ -865,6 +865,7 @@ typedef svn_error_t *(*svn_editor3_cb_ne
typedef svn_error_t *(*svn_editor3_cb_open_branch_t)(
void *baton,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch.c Thu Oct 1 14:38:44 2015
@@ -218,7 +218,8 @@ assert_branch_state_invariants(const svn
}
svn_branch_state_t *
-svn_branch_state_create(int root_eid,
+svn_branch_state_create(svn_branch_rev_bid_t *predecessor,
+ int root_eid,
svn_branch_revision_root_t *rev_root,
svn_branch_state_t *outer_branch,
int outer_eid,
@@ -226,6 +227,7 @@ svn_branch_state_create(int root_eid,
{
svn_branch_state_t *b = apr_pcalloc(result_pool, sizeof(*b));
+ b->predecessor = svn_branch_rev_bid_dup(predecessor, result_pool);
b->root_eid = root_eid;
b->rev_root = rev_root;
b->e_map = apr_hash_make(result_pool);
@@ -277,6 +279,32 @@ svn_branch_rev_bid_eid_dup(const svn_bra
return id;
}
+svn_branch_rev_bid_t *
+svn_branch_rev_bid_create(svn_revnum_t rev,
+ const char *branch_id,
+ apr_pool_t *result_pool)
+{
+ svn_branch_rev_bid_t *id = apr_palloc(result_pool, sizeof(*id));
+
+ id->bid = branch_id;
+ id->rev = rev;
+ return id;
+}
+
+svn_branch_rev_bid_t *
+svn_branch_rev_bid_dup(const svn_branch_rev_bid_t *old_id,
+ apr_pool_t *result_pool)
+{
+ svn_branch_rev_bid_t *id;
+
+ if (! old_id)
+ return NULL;
+
+ id = apr_pmemdup(result_pool, old_id, sizeof(*id));
+ id->bid = apr_pstrdup(result_pool, old_id->bid);
+ return id;
+}
+
svn_branch_el_rev_content_t *
svn_branch_el_rev_content_create(svn_branch_eid_t parent_eid,
const char *name,
@@ -510,6 +538,8 @@ svn_branch_get_subtree(const svn_branch_
new_subtree = svn_branch_subtree_create(branch->e_map, eid,
result_pool);
+ new_subtree->predecessor = svn_branch_rev_bid_dup(branch->predecessor,
+ result_pool);
/* Purge orphans */
map_purge_orphans(new_subtree->e_map, new_subtree->root_eid, result_pool);
@@ -856,6 +886,7 @@ svn_branch_instantiate_subtree(svn_branc
/* branch this subbranch into NEW_BRANCH (recursing) */
new_branch = svn_branch_add_new_branch(to_branch->rev_root,
+ this_subtree->predecessor,
to_branch, this_outer_eid,
this_subtree->root_eid,
bi->iterpool);
@@ -904,6 +935,7 @@ svn_branch_get_subbranch_at_eid(svn_bran
svn_branch_state_t *
svn_branch_add_new_branch(svn_branch_revision_root_t *rev_root,
+ svn_branch_rev_bid_t *predecessor,
svn_branch_state_t *outer_branch,
int outer_eid,
int root_eid,
@@ -917,7 +949,7 @@ svn_branch_add_new_branch(svn_branch_rev
if (! outer_branch)
outer_eid = rev_root->root_branches->nelts;
- new_branch = svn_branch_state_create(root_eid, rev_root,
+ new_branch = svn_branch_state_create(predecessor, root_eid, rev_root,
outer_branch, outer_eid,
rev_root->branches->pool);
@@ -1008,20 +1040,33 @@ static svn_error_t *
parse_branch_line(char *bid_p,
int *root_eid_p,
int *num_eids_p,
+ svn_branch_rev_bid_t **predecessor,
svn_stream_t *stream,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_stringbuf_t *line;
svn_boolean_t eof;
int n;
+ svn_revnum_t pred_rev;
+ char pred_bid[1000];
/* Read a line */
SVN_ERR(svn_stream_readline(stream, &line, "\n", &eof, scratch_pool));
SVN_ERR_ASSERT(!eof);
- n = sscanf(line->data, "%s root-eid %d num-eids %d",
- bid_p, root_eid_p, num_eids_p);
- SVN_ERR_ASSERT(n >= 3); /* C std is unclear on whether '%n' counts */
+ n = sscanf(line->data, "%s root-eid %d num-eids %d from r%ld.%s",
+ bid_p, root_eid_p, num_eids_p, &pred_rev, pred_bid);
+ SVN_ERR_ASSERT(n == 3 || n == 5);
+
+ if (n == 5)
+ {
+ *predecessor = svn_branch_rev_bid_create(pred_rev, pred_bid, result_pool);
+ }
+ else
+ {
+ *predecessor = NULL;
+ }
return SVN_NO_ERROR;
}
@@ -1105,13 +1150,14 @@ svn_branch_state_parse(svn_branch_state_
{
char bid[1000];
int root_eid, num_eids;
+ svn_branch_rev_bid_t *predecessor;
svn_branch_state_t *branch_state;
svn_branch_state_t *outer_branch;
int outer_eid;
int i;
- SVN_ERR(parse_branch_line(bid, &root_eid, &num_eids,
- stream, scratch_pool));
+ SVN_ERR(parse_branch_line(bid, &root_eid, &num_eids, &predecessor,
+ stream, scratch_pool, scratch_pool));
/* Find the outer branch and outer EID */
{
@@ -1127,7 +1173,7 @@ svn_branch_state_parse(svn_branch_state_
else
outer_branch = NULL;
}
- branch_state = svn_branch_state_create(root_eid, rev_root,
+ branch_state = svn_branch_state_create(predecessor, root_eid, rev_root,
outer_branch, outer_eid,
result_pool);
@@ -1236,12 +1282,22 @@ svn_branch_state_serialize(svn_stream_t
const char *branch_root_rrpath = svn_branch_get_root_rrpath(branch,
scratch_pool);
SVN_ITER_T(svn_branch_el_rev_content_t) *hi;
+ const char *predecessor_str = "";
+
+ if (branch->predecessor)
+ {
+ assert(SVN_IS_VALID_REVNUM(branch->predecessor->rev));
+ predecessor_str = apr_psprintf(scratch_pool, " from r%ld.%s",
+ branch->predecessor->rev,
+ branch->predecessor->bid);
+ }
SVN_ERR(svn_stream_printf(stream, scratch_pool,
- "%s root-eid %d num-eids %d # at /%s\n",
+ "%s root-eid %d num-eids %d%s # at /%s\n",
svn_branch_get_id(branch, scratch_pool),
branch->root_eid,
apr_hash_count(branch->e_map),
+ predecessor_str,
branch_root_rrpath));
map_purge_orphans(branch->e_map, branch->root_eid, scratch_pool);
@@ -1282,7 +1338,16 @@ svn_branch_revision_root_serialize(svn_s
rev_root->branches->nelts));
for (SVN_ARRAY_ITER(bi, rev_root->branches, scratch_pool))
- SVN_ERR(svn_branch_state_serialize(stream, bi->val, bi->iterpool));
+ {
+ svn_branch_state_t *branch = bi->val;
+
+ if (branch->predecessor && branch->predecessor->rev < 0)
+ {
+ branch->predecessor->rev = rev_root->rev;
+ }
+
+ SVN_ERR(svn_branch_state_serialize(stream, bi->val, bi->iterpool));
+ }
return SVN_NO_ERROR;
}
Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3e.c Thu Oct 1 14:38:44 2015
@@ -1178,6 +1178,7 @@ editor3_new_eid(void *baton,
static svn_error_t *
editor3_open_branch(void *baton,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
@@ -1196,12 +1197,18 @@ editor3_open_branch(void *baton,
*new_branch_id_p,
scratch_pool);
if (new_branch)
- return SVN_NO_ERROR;
+ {
+ SVN_ERR_ASSERT(predecessor->rev == new_branch->predecessor->rev);
+ SVN_ERR_ASSERT(strcmp(predecessor->bid, new_branch->predecessor->bid) == 0);
+ SVN_ERR_ASSERT(root_eid == new_branch->root_eid);
+ return SVN_NO_ERROR;
+ }
if (outer_branch_id)
outer_branch = svn_branch_revision_root_get_branch_by_id(
eb->edited_rev_root, outer_branch_id, scratch_pool);
new_branch = svn_branch_add_new_branch(eb->edited_rev_root,
+ predecessor,
outer_branch, outer_eid,
root_eid, scratch_pool);
*new_branch_id_p = svn_branch_get_id(new_branch, result_pool);
@@ -1219,6 +1226,7 @@ editor3_branch(void *baton,
apr_pool_t *scratch_pool)
{
ev3_from_delta_baton_t *eb = baton;
+ svn_branch_rev_bid_t *predecessor;
svn_branch_state_t *new_branch;
svn_branch_state_t *outer_branch = NULL;
svn_branch_state_t *from_branch;
@@ -1239,7 +1247,9 @@ editor3_branch(void *baton,
if (outer_branch_id)
outer_branch = svn_branch_revision_root_get_branch_by_id(
eb->edited_rev_root, outer_branch_id, scratch_pool);
+ predecessor = svn_branch_rev_bid_create(from->rev, from->bid, scratch_pool);
new_branch = svn_branch_add_new_branch(eb->edited_rev_root,
+ predecessor,
outer_branch, outer_eid,
from->eid, scratch_pool);
Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/editor3e.c Thu Oct 1 14:38:44 2015
@@ -206,6 +206,7 @@ svn_editor3_new_eid(svn_editor3_t *edito
svn_error_t *
svn_editor3_open_branch(svn_editor3_t *editor,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
@@ -217,7 +218,8 @@ svn_editor3_open_branch(svn_editor3_t *e
SVN_ERR_ASSERT(VALID_EID(root_eid));
DO_CALLBACK(editor, cb_open_branch,
- 5(&new_branch_id, outer_branch_id, outer_eid, root_eid,
+ 6(&new_branch_id,
+ predecessor, outer_branch_id, outer_eid, root_eid,
result_pool));
/* We allow the output pointer to be null, here, so that implementations
@@ -461,6 +463,7 @@ wrap_new_eid(void *baton,
static svn_error_t *
wrap_open_branch(void *baton,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
@@ -472,9 +475,10 @@ wrap_open_branch(void *baton,
/*dbg(eb, scratch_pool, "%s : open_branch(...)",
eid_str(eid, scratch_pool), ...);*/
SVN_ERR(svn_editor3_open_branch(eb->wrapped_editor,
- new_branch_id_p,
- outer_branch_id, outer_eid, root_eid,
- result_pool));
+ new_branch_id_p,
+ predecessor,
+ outer_branch_id, outer_eid, root_eid,
+ result_pool));
return SVN_NO_ERROR;
}
@@ -691,6 +695,7 @@ change_detection_new_eid(void *baton,
static svn_error_t *
change_detection_open_branch(void *baton,
const char **new_branch_id_p,
+ svn_branch_rev_bid_t *predecessor,
const char *outer_branch_id,
int outer_eid,
int root_eid,
@@ -701,6 +706,7 @@ change_detection_open_branch(void *baton
SVN_ERR(svn_editor3_open_branch(eb->wrapped_editor,
new_branch_id_p,
+ predecessor,
outer_branch_id, outer_eid, root_eid,
result_pool));
return SVN_NO_ERROR;
Modified: subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c Thu Oct 1 14:38:44 2015
@@ -769,14 +769,33 @@ svn_branch_get_mutable_state(svn_branch_
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
+ svn_branch_revision_root_t *txn;
+ int i;
+
SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(base_revision));
- SVN_ERR(svn_branch_revision_fetch_info(rev_root_p,
+ SVN_ERR(svn_branch_revision_fetch_info(&txn,
repos, ra_session, branch_info_dir,
base_revision,
result_pool, scratch_pool));
- (*rev_root_p)->base_rev = (*rev_root_p)->rev;
- (*rev_root_p)->rev = SVN_INVALID_REVNUM;
+ SVN_ERR_ASSERT(txn->rev == base_revision);
+
+ /* Update all the 'predecessor' info to point to the BASE_REVISION instead
+ of to that revision's predecessor. */
+ txn->base_rev = base_revision;
+ txn->rev = SVN_INVALID_REVNUM;
+
+ for (i = 0; i < txn->branches->nelts; i++)
+ {
+ svn_branch_state_t *b = APR_ARRAY_IDX(txn->branches, i, void *);
+
+ b->predecessor
+ = svn_branch_rev_bid_create(base_revision,
+ svn_branch_get_id(b, scratch_pool),
+ result_pool);
+ }
+
+ *rev_root_p = txn;
return SVN_NO_ERROR;
}
Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Oct 1 14:38:44 2015
@@ -388,6 +388,7 @@ svn_branch_replay(svn_editor3_t *editor,
if (this_s_right)
{
SVN_ERR(svn_editor3_open_branch(editor, &edit_subbranch_id,
+ this_s_right->predecessor,
edit_branch_id, this_eid,
this_s_right->root_eid,
scratch_pool));
@@ -2312,6 +2313,7 @@ mk_branch(const char **new_branch_id_p,
SVN_ERR(svn_editor3_new_eid(editor, &new_inner_eid));
SVN_ERR(svn_editor3_open_branch(editor, &new_branch_id,
+ NULL /*predecessor*/,
outer_branch_id, new_outer_eid,
new_inner_eid, scratch_pool));
SVN_ERR(svn_editor3_alter(editor,
Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/wc.py?rev=1706266&r1=1706265&r2=1706266&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/wc.py Thu Oct 1 14:38:44 2015
@@ -120,7 +120,7 @@ _re_parse_commit = re.compile('^(\w+( \
_re_parse_eid_header = re.compile('^r(-1|[0-9]+): eids ([0-9]+) ([0-9]+) '
'branches ([0-9]+)$')
# B0.2 root-eid 3 # at /X
-_re_parse_eid_branch = re.compile('^B([0-9.]+) root-eid ([0-9]+) num-eids ([0-9]+) # at /(.*)$')
+_re_parse_eid_branch = re.compile('^B([0-9.]+) root-eid ([0-9]+) num-eids ([0-9]+)( from [^ ]*)? # at /(.*)$')
# e4: normal 6 C
_re_parse_eid_ele = re.compile('^e([0-9]+): (none|normal|subbranch) '
'(-1|[0-9]+) (.*)$')
@@ -838,7 +838,7 @@ class State:
if match2:
parent_branch_eid = branches[match2.group(1)]
root_eid = match.group(2)
- path = match.group(4)
+ path = match.group(5)
branch = [branch_eid, parent_branch_eid, root_eid, path]
branches[branch[0]] = branch