#132: Monotone -> Svn drops changes while remove or delete other files
---------------------+------------------------------------------------------
  Reporter:  HenryN  |       Owner:  lele
      Type:  defect  |      Status:  new 
  Priority:  major   |   Milestone:      
 Component:  mtn     |     Version:  0.9 
Resolution:          |    Keywords:      
---------------------+------------------------------------------------------
Comment (by HenryN):

 ''Script test-mtn-rename.sh can not attach. Server sayed "internal error".
 So, included as text here...''
 {{{
 #!/bin/sh -v
 # File: test-mtn-svn-rename.sh
 #
 # Test for 'rename' and 'drop' files.
 # Test from Monotone to Subversion, than do it back to Monotone.
 #
 # Problem:
 # The changes on file are missing, if any other file was 'removed' or
 'renamed'.
 # Output from 'Monotote diff' sems be good. See *.diff and *.log, files
 have
 # created from the same command, as found in Tailor's verbose log.
 #
 # Tailor version 0.9.28
 # Monotone Version 0.35
 # svn, Version 1.3.0 (r17949).
 #
 # With only the date patch (4.mtn-date.patch):
 # Step  Monotone side           Subversion side         Back to Monotone
 # 0.                            initial injection       initial from Svn
 # 1.    Add 3 files             -missing-
 # 2.    Change file1            File1 added             File1 added
 #       Delete file2            -no info about file2-
 #                               File3 added             File3 added
 # 3.    Change file1            -missing-
 #       Rename file3 to 4       Rename file3/4          Rename file3/4
 #
 # Step 1: Complete missing.
 # Step 2: Information about file2 was hidden (because rev 0 has no file2).
 # Step 3: Changes on file1 are not in svn, but it's in the subdir
 'mtnside',
 #         The rsync has worked, but the command to svn has no set to
 commit
 #         changes on file1.
 #
 #
 # With more patches (5.mtn-initial-revision.patch and 4.mtn-date.patch):
 # Step  Monotone side           Subversion side         Back to Monotone
 # 0.                            initial injection       initial from Svn
 # 1.    Add 3 files             Add 3 files             Add 3 files
 # 2.    Change file1            -missing-
 #       Delete file2            Delete file2            Delete file2
 # 3.    Change file1            -missing-
 #       Rename file3 to 4       Rename file3/4          Rename file3/4
 #
 # In the step 2. and 3. the change on file1.txt was totaly loosed. The
 file1
 # contains the first initial commit "foo1" from step 1 in all revisions.
 #
 # Henry(*)Bigfoot.de

 # tested with monotone 0.35
 # Needed for 'mtn log' on locale non EN.
 export LANG=C

 # Path to patched tailor
 # export PATH=$HOME/src/tailor-0.9.28-1:$PATH

 # Cleanup the used tempdirectory. Create a new directory and work there.
 rm -rf testdir
 mkdir testdir
 cd testdir

 # Create a new data base with a branch
 mtn --db test1.mtn db init
 mtn --db=test1.mtn --branch=A setup monotone-work

 # Create 3 files, rename, drop and change some
 cd monotone-work
 echo "foo1" > file1.txt
 echo "foo2" > file2.txt
 echo "foo3" > file3.txt
 mtn add file*.txt
 mtn commit --message "initial commit 3 files"

 echo "file1 changed, file2 dropped" > file1.txt
 mtn drop file2.txt
 mtn commit --message "file2 droped from revision"

 echo "file3 renamed into file4" > file1.txt
 mtn rename file3.txt file4.txt
 mtn commit --message "file3 renamed into file4"
 cd ..

 # create first config for tailor
 cat <<EOF >test-mtn-svn-forward.conf
 [DEFAULT]
 # use-propset = True
 verbose = True

 [project]
 root-directory = $PWD/rootdir
 source = monotone:source
 target = svn:target

 [monotone:source]
 repository = $PWD/test1.mtn
 module = A
 subdir = mtnside

 [svn:target]
 repository = file://$PWD/svnrepository
 module = A
 subdir = svnside
 EOF

 # Convert from Monotone to Subversion
 tailor -c test-mtn-svn-forward.conf

 # create a second config for tailor
 cat <<EOF >test-mtn-svn-backward.conf
 [DEFAULT]
 use-propset = True
 verbose = True

 [project]
 root-directory = $PWD/rootdir-back
 target = monotone:target
 source = svn:source

 [monotone:target]
 repository = $PWD/test2.mtn
 module = A
 subdir = mtnside
 # Please setup yours here...
 # keyid = henry(*)bigfoot.de

 [svn:source]
 repository = file://$PWD/svnrepository
 module = A
 subdir = svnside
 EOF

 # Convert back from Subversion to Monotone
 tailor -c test-mtn-svn-backward.conf

 # Create a log to see into:
 mtn --db=test1.mtn log --from `mtn --db=test1.mtn automate heads A` --no-
 graph > test1.log
 mtn --db=test2.mtn log --from `mtn --db=test2.mtn automate heads A` --no-
 graph > test2.log

 cd ..
 }}}

-- 
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/132#comment:1>
Tailor <http://progetti.arstecnica.it/tailor>
An inter-VCs changeset exchanger
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to