diff options
author | W. Trevor King <wking@drexel.edu> | 2010-01-18 08:06:08 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-01-18 08:06:08 -0500 |
commit | ed6e3707a45804a282601ab9ec1ac2b5c8ef47c0 (patch) | |
tree | 10ca67dada6797f096ce00dcbe2d1d4a66ee36a2 | |
parent | 1c42075f6b3ba35bbb32e3ec6549f30024ad7179 (diff) | |
download | bugseverywhere-ed6e3707a45804a282601ab9ec1ac2b5c8ef47c0.tar.gz |
Add .changed() support to VCS
-rw-r--r-- | libbe/storage/vcs/base.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py index 8390cbc..e837780 100644 --- a/libbe/storage/vcs/base.py +++ b/libbe/storage/vcs/base.py @@ -597,6 +597,14 @@ os.listdir(self.get_path("bugs")): """ return None + def _vcs_changed(self, revision): + """ + Return a tuple of lists of ids + (new, modified, removed) + from the specified revision to the current situation. + """ + return ([], [], []) + def version(self): # Cache version string for efficiency. if not hasattr(self, '_version'): @@ -839,6 +847,13 @@ os.listdir(self.get_path("bugs")): raise libbe.storage.base.InvalidRevision(index) return revid + 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 _u_any_in_string(self, list, string): """ Return True if any of the strings in list are in string. |