Commits

David Schleimer committed b746d45

stupid: kill some dead and no longer needed code

While I was debugging an unrelated issue with stupid, some of the code
in branches_in_paths confused me, since it was using an undeclared
variable. It looked like an attempt to short-circuit the
file/directory detection before talking to subversion that never quite
got finished. The code is mostly unreachable, and obviously broken,
so I cleaned it up. I also cleaned up some prepatory code that was
getting executed but appeared to only be useful for the
short-circuintg attempt.

Comments (0)

Files changed (1)

hgsubversion/stupid.py

     if not paths_need_discovery:
         return branches
 
-    paths_need_discovery = [(len(p), p) for p in paths_need_discovery]
-    paths_need_discovery.sort()
-    paths_need_discovery = [p[1] for p in paths_need_discovery]
     actually_files = []
     while paths_need_discovery:
         p = paths_need_discovery.pop(0)
         path_could_be_file = True
-        ind = 0
-        while ind < len(paths_need_discovery) and not paths_need_discovery:
-            if op.startswith(p):
-                path_could_be_file = False
-            ind += 1
         if path_could_be_file:
             if checkpath(p, revnum) == 'f':
                 actually_files.append(p)