subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1627521 - /subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
Date Thu, 25 Sep 2014 11:37:08 GMT
Author: julianfoad
Date: Thu Sep 25 11:37:08 2014
New Revision: 1627521

URL: http://svn.apache.org/r1627521
Log:
On the 'move-tracking-2' branch: Store metadata in rev-prop in current revision,
rather on revision 0.

Although some of the metadata need not be per-revision, the path mappings
belong to a specific revision.

* subversion/svnmover/svnmover.c
  (fetch_repos_info, store_repos_info): Use the head revision, not r0.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

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=1627521&r1=1627520&r2=1627521&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Sep 25 11:37:08
2014
@@ -865,11 +865,14 @@ fetch_repos_info(svn_branch_repos_t **re
 {
   svn_branch_repos_t *repos
     = svn_branch_repos_create(ra_session, editor, result_pool);
+  svn_revnum_t youngest_rev;
   svn_string_t *value;
   svn_stream_t *stream;
 
   /* Read initial state from repository */
-  SVN_ERR(svn_ra_rev_prop(ra_session, 0, "svn-br-info", &value, scratch_pool));
+  SVN_ERR(svn_ra_get_latest_revnum(ra_session, &youngest_rev, scratch_pool));
+  SVN_ERR(svn_ra_rev_prop(ra_session, youngest_rev, "svn-br-info", &value,
+                          scratch_pool));
   if (! value)
     {
       value = svn_string_create(default_repos_info, scratch_pool);
@@ -997,12 +1000,15 @@ store_repos_info(svn_branch_repos_t *rep
 {
   svn_stringbuf_t *buf = svn_stringbuf_create_empty(scratch_pool);
   svn_stream_t *stream = svn_stream_from_stringbuf(buf, scratch_pool);
+  svn_revnum_t youngest_rev;
 
   SVN_ERR(write_repos_info(stream, repos, scratch_pool));
 
   SVN_ERR(svn_stream_close(stream));
   /*SVN_DBG(("store_repos_info: %s", buf->data));*/
-  SVN_ERR(svn_ra_change_rev_prop2(repos->ra_session, 0, "svn-br-info",
+  SVN_ERR(svn_ra_get_latest_revnum(repos->ra_session, &youngest_rev,
+                                   scratch_pool));
+  SVN_ERR(svn_ra_change_rev_prop2(repos->ra_session, youngest_rev, "svn-br-info",
                                   NULL, svn_stringbuf__morph_into_string(buf),
                                   scratch_pool));
 



Mime
View raw message