[svk-devel] smerge/pull with renames

Jason Dillon jason at planet57.com
Sun Mar 18 20:52:05 EDT 2007

I'm trying to see if svk2 is properly handling updates when  
directories/files have been renamed.  And from what I can tell its not.

'svk pull' does not seem to have a --track-rename flag, so have to  
use smerge, which is okay I guess... though IMO push/pull should  
support the flag to handle renames.

To test, I created a simple svktest module:


Which just contains:

         test.txt (containing "Something terribly interesting")

I've got this checked out via:

      svn co https://svn.apache.org/repos/asf/geronimo/sandbox/ 
jdillon/svktest svktest-orig

I setup a mirror:

     svk https://svn.apache.org/repos/asf/geronimo/sandbox/jdillon/ 
svktest/ //mirrors/svktest
     svk sync //mirrors/svktest

And then made a local copy:

     svk cp //mirrors/svktest //svktest

And checked it out:

     svk //svktest svktest-local

Then I renamed test-module in svktest-local:

     svk mv test-module test-module2
     svk ci -m "rename"

And then altered the text in svktest-orig/test-module/test.txt:

     echo "Something terribly interesting... or maybe not so" > test- 
     svn ci -m "alter text"

And then tried to smerge the changes with --track-rename:

     svk sm --track-rename //mirrors/svktest //svktest

Auto-merging (6674, 6677) /mirrors/svktest to /svktest (base /mirrors/ 
Waiting for editor...
Collecting renames, this might take a while.
U   test-module/test.txt - test-module2/test.txt
New merge ticket: 13f79535-47bb-0310-9956-ffa450edef68:/geronimo/ 
Committed revision 6678.

But this did not appear to update the text at at all:

     cat svktest-local/test-module2/test.txt

Something terribly interesting

     cat svktest-orig/test-module/test.txt

Something terribly interesting... or maybe not so

It appears that after I 'svk smerge --track-rename', that 'svk pull'  
fetched the latest update to test.txt.

Though trying to repeat this again and now I can't get svk to update  
the file at all.

     echo "Something terribly interesting!" > svktest-orig/test- 
     (cd svktest-orig; svn ci -m "alter text")

Try to pull:

     cd svktest-local
     svk pull

Syncing https://svn.apache.org/repos/asf/geronimo/sandbox/jdillon/ 
Retrieving log information from 519763 to 519765
Auto-merging (6677, 6679) /mirrors/svktest to /svktest (base /mirrors/ 
     test-module - skipped
     test-module/test.txt - skipped
Empty merge.
Syncing //svktest(/svktest) in /Users/jason/ws/geronimo/svktest-local  
to 6679

Or try to smerge --track-rename:

     cd svktest-local
     svk sm --track-rename //mirrors/svktest //svktest

Auto-merging (6677, 6679) /mirrors/svktest to /svktest (base /mirrors/ 
Waiting for editor...
Log message not modified: a)bort, e)dit, c)ommit?c
Collecting renames, this might take a while.
     test-module/test.txt - skipped
Empty merge.

I also tried to `svk pull` again after the `svk sm --track-rename`  
(which worked the very first time), but so far its not updating the  
test.txt file.  The svk version still has "Something terribly  
interesting... or maybe not so", when it should have been updated to  
"Something terribly interesting!".

  * * *

I'm using svk/trunk built sometime last week.  I did notice a few  
changes to that tree today, but I've yet to rebuild and test them,  
svn up updated:

A    t/07smerge-rename2.t
U    lib/SVK/Editor/Copy.pm
U    lib/SVK/Help/Index.pod
U    lib/SVK/Path/Checkout.pm
U    lib/SVK/Merge.pm
U    bin/svk
U   .
Updated to revision 2349.

I dunno, there might be fixed to rename support in here (the "t/ 
07smerge-rename2.t" makes me think there might be).  I will update  
and try this again... but I'm wondering if the above test is valid?

I really want to use svk2 to allow me to reorganize a source tree,  
while being able to continuously pull in the latest changes made to  
the current organization.  Then once the reorg is finished, simply  
smerge back to the source branch, which should have all of the  
changes where were made to the tree during the reorg.

I know this is possible with perforce, and I'm really hoping that  
svk2 will work in the exact same way.

Are there any known issues with --track-rename?  And has anyone  
actually used svk2 in this matter to reorg trees while keeping the  
reorg tree updated from latest changes?


More information about the svk-devel mailing list