Folks,

Here's a patch that properly handles import from (at least) SVN
repository into Git, where svn records a modify operation on a
directory.

Git invokes update-index, which does not work on directories,
resulting in an error.

This patch eliminates directories from the list before calling
update-index, the same way like the git target author(s) already
did on two other places.

Regards,
-docelic

--- tailor-0.9.28/vcpx/repository/git/target.py	2007-04-25 19:31:38.000000000 +0200
+++ tailor/vcpx/repository/git/target.py	2007-07-01 14:39:43.000000000 +0200
@@ -46,8 +46,13 @@
         Records a sequence of filesystem objects as updated.
         """
 
-        # can we assume we don't have directories in the list ?
-        self.repository.runCommand(['update-index'] + names)
+        from os.path import join, isdir
+
+        # can we assume we don't have directories in the list ?  Nope.
+
+        notdirs = [n for n in names if not isdir(join(self.repository.basedir, n))]
+        if notdirs:
+            self.repository.runCommand(['update-index'] + notdirs)
 
     def __parse_author(self, author):
         """
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to