----- Original Message ----
From: Tailor <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Sunday, January 13, 2008 4:56:43 PM
Subject: Re: [Tailor] #146: git->svn conversion fails due to incorrectly adding 
files to SVN repos


#146: git->svn conversion fails due to incorrectly adding files to SVN
 repos
---------------------+------------------------------------------------------
  Reporter:  bkor    |       Owner:  lele      
      Type:  defect  |      Status:  new       
  Priority:  major   |   Milestone:  VersionOne
 Component:  tailor  |     Version:  0.9       
Resolution:          |    Keywords:            
---------------------+------------------------------------------------------

Comment(by bkor):

 More readable error message:

 {{{
 22:11:24 [I] /home/olav/src/tailor/output $ svn mv --quiet --force src
 /swfdec-thumbnailer.schemas.in
 thumbnailer/swfdec-thumbnailer.schemas.in
 2>&1
 22:11:25 [W] [Status 1]
 Error stream:
 svn: 'src/swfdec-thumbnailer.schemas.in' is not under version control
 22:11:25 [E] Failure replaying: Revision:
 e69e0dd1319e1003a30ef936fc6c6fdefcb8c6b7
 Date: 2007-10-16 14:16:07+03:00
 Author: Pekka Lampila <[EMAIL PROTECTED]>
 Entries: Makefile.am(UPD), configure.ac(UPD),
 m4/as-compiler-flag.m4(DEL),
 po/POTFILES.in(UPD),
 thumbnailer/Makefile.am(REN from src/Makefile.am), thumbnailer/swfdec-
 thumbnailer.c(REN
 from src/swfdec-thumbnailer.c), thumbnailer/swfdec-
 thumbnailer.schemas.in(REN from
 src/swfdec-thumbnailer.schemas.in)
 Log: Rename src to thumbnailer
 Traceback (most recent call last):
   File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 117, in
 replayChangeset
     self._replayChangeset(changeset)
   File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 320, in
 _replayChangeset
     action(group)
   File "/usr/lib/python2.5/site-packages/vcpx/target.py", line 489, in
 _renameEntries
     self._renamePathname(e.old_name, e.name)
   File "/usr/lib/python2.5/site-packages/vcpx/repository/svn.py", line
 780, in _renamePathname
     err.read()))
 ChangesetApplicationFailure: /home/olav/src/tailor/output $ svn mv
 --quiet
 --force src/swfdec-thumbnailer.schemas.in thumbnailer/swfdec-
 thumbnailer.schemas.in 2>&1 returned status 1 saying
 svn: 'src/swfdec-thumbnailer.schemas.in' is not under version control

 22:11:25 [C] Couldn't replay changeset
 22:11:25 [C] Upstream change application failed
 Failure applying upstream changes: /home/olav/src/tailor/output $ svn
 mv
 --quiet --force src/swfdec-thumbnailer.schemas.in thumbnailer/swfdec-
 thumbnailer.schemas.in 2>&1 returned status 1 saying
 svn: 'src/swfdec-thumbnailer.schemas.in' is not under version control
 }}}


 And the changeset #9 part which is the source of the failure:

 {{{
 22:11:18 [I] Changeset #9
 22:11:18 [I] Changeset "09a4609f3619e4516cd9a2f5b924d80cdb457995"
 22:11:18 [I] Log message: Forgot to add some files
 22:11:18 [I] /home/olav/src/tailor/output $ git merge -n --no-commit
 fastforward HEAD 09a4609f3619e4516cd9a2f5b924d80cdb457995
 22:11:18 [I] [Ok]
 Output stream:
 Updating 2d9256b..09a4609
 Fast forward
 22:11:18 [I] /home/olav/src/tailor/output $ svn add --quiet --no-auto-
 props --non-recursive po/LINGUAS po/POTFILES.in src/swfdec-
 thumbnailer.schemas.in
 svn: 'po' is not a working copy
 svn: Can't open file 'po/.svn/entries': No such file or directory
 22:11:18 [W] [Status 1]
 22:11:18 [I] /home/olav/src/tailor/output $ svn commit --file
 /home/olav/tmp/tailorf5RAk4svn . 2>&1
 22:11:18 [I] [Ok]
 22:11:18 [W] svn did not find anything to commit
 }}}

-- 
Ticket URL: <http://progetti.arstecnica.it/tailor/ticket/146#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


I believe I encountered this same bug when attempting to restore a crashed 
central subversion server from my local git repo. The attached patch works for 
me.

(I attempted do update ticket #146 on your Trac system, but in spite of my 
being registered, I cannot modifiy this ticket.)

Regards,
Scott Karns



      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
diff --git a/vcpx/repository/svn.py b/vcpx/repository/svn.py
index 719ef45..9fdd4d8 100644
--- a/vcpx/repository/svn.py
+++ b/vcpx/repository/svn.py
@@ -598,40 +598,11 @@ class SvnWorkingDir(UpdatableSourceWorkingDir, SynchronizableTargetWorkingDir):
     def _addPathnames(self, names):
         """
         Add some new filesystem objects.
-
-        For each pathname with multiple path components, return the
-        list comprising the path broken up into its leftmost path
-        prefixes, e.g., ['trackedDir/untrackedDir/untrackedFile']
-        becomes ['trackedDir', 'trackedDir/untrackedDir',
-        'trackedDir/untrackedDir/untrackedFile']
-
-        This is done since subversion will not add untracked objects
-        in an untracked directory without first 'adding' the untracked
-        directory.
         """
 
-        from os.path import split
-
-        added = []
-        explodedNames = []
-        for pn in names:
-            prefixes = []
-            prefix = split(pn)[0]
-            while prefix:
-                if not prefix in added:
-                    prefixes.append(prefix)
-                    added.append(prefix)
-                prefix = split(prefix)[0]
-
-            if prefixes:
-                prefixes.reverse()
-                explodedNames.extend(prefixes)
-
-            explodedNames.append(pn)
-
         cmd = self.repository.command("add", "--quiet", "--no-auto-props",
                                       "--non-recursive")
-        ExternalCommand(cwd=self.repository.basedir, command=cmd).execute(explodedNames)
+        ExternalCommand(cwd=self.repository.basedir, command=cmd).execute(names)
 
     def _propsetRevision(self, out, command, date, author):
 
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to