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

import in the face of extensive name changes

From: Ross Boylan <ross_at_biostat.ucsf.edu>
Date: 2004-10-06 00:57:03 CEST

I have a new version of some "vendor" code. There are extensive changes
in naming, starting with some of the top level directories. There are
also changes in the names of some files, in a regular way (e.g., fooXX
-> fooYY). Is there a good way to handle this?

I tried svn_load_dirs, but it gave me 191 difference items. After
indicating the first pair that matched, I concluded I would go nuts
before finishing this exercise, and said finish.

Unhappy with that, I figured I'd skip the history completely, and tried
a fresh import.
$ svn import boost http://localhost/svn/vendor/Ottosen/current -m "Boost
review version of 9/24/04, imported anew because of many name changes"
svn: MKCOL of
/svn/!svn/wrk/66573cdc-bae5-0310-b22f-8d6a6307ff3b/vendor/Ottosen/current/boost: 405 Method Not Allowed (http://localhost)
I assume this is failing because
http://localhost/svn/vendor/Ottosen/current already exists.

I guess I actually have the new library in place and could just
proceed. (Except that the CVS dirs, which I thought would get nuked,
weren't. I realized that when I read the docs :().

I got a slight urge to try adding some features to svn_load_dirs, which
I am attempting to suppress with this request for information. Let me
give you some questions about what I did, and then my thoughts for
enhancement.

Questions:
1) If I tell the script to rename directories, will the files underneath
that have the same names automatically get matched up? (This would
still leave the fooXX->fooYY problem, but that's smaller).
2) Can I give the script more than one rename pair at a time?

Ideas:
1) Add a -r option to allow using something other than the head revision
as a reference point. (Yes, I did all this before studying the fine
README and its advice to backup the repository).
2) Add a general file renaming option, somewhat like the -p option there
currently. The referenced file would have perl rewrite expressions, one
per line. It would apply each in turn to an old file name before trying
to match up with new file names.

Aside from the fact that, like all "little" projects this is probably
not quite so little (the script is almost 2000 lines, and perl is not my
native tounge), I suspect 2) may raise some subtle sequencing issues if
serveral parts of a path get rewritten. For example,
 boost/ptr_container/ptr_container.hpp becomes
 boost/smart_container/smart_container.hpp
and it probably matters whether I rename the directory or the file
first.

Thanks for any insight you can offer.

-- 
Ross Boylan                                      wk:  (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4          ross@biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840                     hm:  (415) 550-1062
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 6 00:57:33 2004

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.