diff hg_delta_editor.py @ 38:9ee7ce0505eb

Fixes so that I can clone the melange repository successfully. Fixes a bug that caused running out of file handles if there were a lot of ra calls.
author Augie Fackler <durin42@gmail.com>
date Sun, 26 Oct 2008 13:55:57 -0500
parents 50d55c3e0d85
children b3c7b844b782
line wrap: on
line diff
--- a/hg_delta_editor.py
+++ b/hg_delta_editor.py
@@ -167,6 +167,7 @@ class HgChangeReceiver(delta.Editor):
             if p and p[0] == '/':
                 p = p[1:]
             return p, br
+        return None, None
         raise Exception,'Things went boom: ' + path
 
     def set_current_rev(self, rev):
@@ -496,7 +497,8 @@ class HgChangeReceiver(delta.Editor):
         self.base_revision = None
         if path in self.deleted_files:
             del self.deleted_files[path]
-        if self._is_path_valid(path):
+        if (self._is_path_valid(path) and 
+            self._path_and_branch_for_path(path)[0]):
             self.current_file = path
             self.should_edit_most_recent_plaintext = False
             if copyfrom_path: