[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn_load_dirs: improving rename matching vs. svnsync

From: <Martin_at_Cleaver.org>
Date: Tue, 5 Aug 2008 23:03:48 -0400

Hi,
    I've been using svn_load_dirs.pl to import onto a local vendor branch a
copy of a vendor's code remotely held in a SVN repository.

I note that the process is to import an "svn export", which then presents to
the users the problem ofestablishing "svn mv" history. Going through the
matching process is a tedious process and one that, if skipped, looks like
local changes wouldn't get propagated to the upstream file renamed but not
identified as such (the patch would remain and die on the old filename that
was "deleted").

I'm imagining two approaches:
 1) improve the matching capability
 2) use a real upstream history

Improving matching would include: 1) present a list of "likely matches".
This would comprise looking at filenames in the Deleted Added list and
re-listing them so that the initial list is sorted by basename. So here, 2 &
7 would be sorted next to each other as they share the phrase
"dbx-admin-key.js".
Next md5's can be used to match by file content. Between them a lot of
inter-directory moves could be caught.

     Deleted Added
   0 wp-admin/categories.js______________ wp-includes/atomlib.php
   1 wp-admin/custom-fields.js___________ wp-admin/includes/bookmark.php
   2 wp-admin/dbx-admin-key.js___________ wp-admin/import/btt.php
   3 wp-admin/edit-comments.js___________ wp-includes/canonical.php
   4 wp-admin/install-rtl.css____________ wp-admin/js/categories.js
   5 wp-admin/install.css________________ wp-admin/includes/comment.php
   6 wp-includes/js/tinymce/license.html_ wp-admin/js/custom-fields.js
   7 wp-admin/templates.php______________ wp-admin/js/dbx-admin-key.js
   8 wp-admin/theme-editor.php___________ wp-admin/js/edit-comments.js
   9 wp-admin/upgrade-schema.php_________ wp-admin/edit-link-categories.php
  10 wp-admin/upload-rtl.css_____________ wp-admin/edit-link-category-form.php
  11 wp-admin/upload.css_________________ wp-admin/edit-post-rows.php
  12 wp-admin/upload.js__________________ wp-admin/includes/file.php
  13 wp-admin/users.js___________________ wp-admin/includes/image.php
  14 wp-admin/widgets.css________________ wp-admin/includes/import.php
  15 wp-admin/xfn.js_____________________ wp-admin/css/install.css
  16 ____________________________________ wp-admin/import/jkw.php
  17 ____________________________________ wp-admin/js/link-cat.js
  18 ____________________________________ wp-admin/link-category.php
  19 ____________________________________ wp-admin/images/logo-ghost.png
  20 ____________________________________ wp-admin/includes/misc.php
  21 ____________________________________ wp-admin/includes/mu.php
Continue printing (Y/n)? n
Enter two indexes for each column to rename, (R)elist, or (F)inish: 2 7

Renaming wp-admin/dbx-admin-key.js to wp-admin/js/dbx-admin-key.js.
Running /usr/bin/svn mv wp-admin/dbx-admin-key.js wp-admin/js/dbx-admin-key.js

Better than this though, why export only to re-import? "svnsync" seems to
copy directory from one repository to another. Why not import the history of
revisions on the vendor's tags branch?

I did so some searches on the mailing list but I couldn't see any duplicate
of my question.
http://subversion.tigris.org/servlets/SearchList?list=users&searchText=svnsync+svn_load_dirs.pl&defaultField=body&Search=Search

(How about using a wiki instead of the mailing list? I found the svn vendor
branch documentation just terrible for a newbie)

Thanks,
   Martin

--
Martin_at_Cleaver.org
+1 416-786-6752 (GMT-5)
Received on 2008-08-06 18:21:20 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.