From ba583f2af95291bf210da819978810dbbb9bfb56 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 18 Jan 2010 09:26:53 -0500 Subject: [PATCH] Ignore paths with _u_path_to_id errors in VCS.changed --- libbe/storage/vcs/base.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py index e837780..1719f06 100644 --- a/libbe/storage/vcs/base.py +++ b/libbe/storage/vcs/base.py @@ -363,7 +363,7 @@ class VCS (libbe.storage.base.VersionedStorage): BugDir to search for an installed Storage backend and initialize it in the root directory. This is a convenience option for supporting tests of versioning functionality - (e.g. .duplicate_bugdir). + (e.g. RevisionedBugDir). Disable encoding manipulation ============================= @@ -849,10 +849,17 @@ os.listdir(self.get_path("bugs")): def changed(self, revision): new,mod,rem = self._vcs_changed(revision) - new = [self._u_path_to_id(p) for p in new] - mod = [self._u_path_to_id(p) for p in mod] - rem = [self._u_path_to_id(p) for p in rem] - return (new, mod, rem) + def paths_to_ids(paths): + for p in paths: + try: + id = self._u_path_to_id(p) + yield id + except (SpacerCollision, InvalidPath): + pass + new_id = list(paths_to_ids(new)) + mod_id = list(paths_to_ids(mod)) + rem_id = list(paths_to_ids(rem)) + return (new_id, mod_id, rem_id) def _u_any_in_string(self, list, string): """ -- 2.26.2