diff svnwrap/svn_swig_wrapper.py @ 175:2412800b1258

Support svn:externals changes via .hgsvnexternals updates
author Patrick Mezard <pmezard@gmail.com>
date Fri, 02 Jan 2009 15:54:05 -0600
parents 84fbf1469a31
children 3f1e8a5ec9dd
line wrap: on
line diff
--- a/svnwrap/svn_swig_wrapper.py
+++ b/svnwrap/svn_swig_wrapper.py
@@ -319,14 +319,21 @@ class SubversionRepo(object):
                 bat = editor.open_root(edit_baton, base_revision, self.pool)
                 batons.append(bat)
                 return bat
-            if path in addeddirs:
-                bat = editor.add_directory(path, parent, None, -1, pool)
-                batons.append(bat)
-                return bat
             if path in deleteddirs:
                 bat = editor.delete_entry(path, base_revision, parent, pool)
                 batons.append(bat)
                 return bat
+            if path not in file_data:
+                if path in addeddirs:
+                    bat = editor.add_directory(path, parent, None, -1, pool)
+                else:
+                    bat = editor.open_directory(path, parent, base_revision, pool)
+                batons.append(bat)
+                props = properties.get(path, {})
+                if 'svn:externals' in props:
+                    value = props['svn:externals']
+                    editor.change_dir_prop(bat, 'svn:externals', value, pool)
+                return bat
             base_text, new_text, action = file_data[path]
             compute_delta = True
             if action == 'modify':