Avoid fetching full branch contents if absolutely necessary.
[jelmer/subvertpy.git] / fileids.py
index a531241e74c8de18745606331d2c6152c1b02f5b..87a1b81af4b82a664fdec780b0898ea83dea9f6d 100644 (file)
@@ -38,6 +38,12 @@ def get_local_changes(paths, branch, mapping, layout, generate_revid,
     :param generate_revid: Function for generating revision id from svn revnum
     :param get_children: Function for obtaining the children of a path
     """
+    if (branch in paths and 
+        paths[branch][0] == 'A' and 
+        paths[branch][1] is None and get_children is None):
+        # Avoid finding all file ids if we're returning unusual 
+        # file ids only (get_children is None)
+        return {}
     new_paths = {}
     for p in sorted(paths.keys(), reverse=False):
         if not changes.path_is_child(branch, p):