Exemplo n.º 1
0
    def add_history(self, path, revision, pool):
        # If filtering, only add the path and revision to the histories
        # list if they were actually changed in this revision (where
        # change means the path itself was changed, or one of its parents
        # was copied).  This is useful for omitting bubble-up directory
        # changes.
        if not self.oldest_rev:
            self.oldest_rev = revision
        else:
            assert revision < self.oldest_rev

        if not self.show_all_logs:
            rev_root = fs.revision_root(self.fs_ptr, revision)
            paths = list(fs.paths_changed2(rev_root).keys())
            if path not in paths:
                # Look for a copied parent
                test_path = path
                found = 0
                while 1:
                    off = test_path.rfind("/")
                    if off < 0:
                        break
                    test_path = test_path[0:off]
                    if test_path in paths:
                        copyfrom_rev, copyfrom_path = fs.copied_from(
                            rev_root, test_path)
                        if copyfrom_rev >= 0 and copyfrom_path:
                            found = 1
                            break
                if not found:
                    return
        self.histories.append([revision, _cleanup_path(path)])
        if self.limit and len(self.histories) == self.limit:
            raise core.SubversionException("", core.SVN_ERR_CEASE_INVOCATION)
Exemplo n.º 2
0
 def history_lookup(path, rev, pool):
     revs.append(rev)
     raise core.SubversionException(
         apr_err=core.SVN_ERR_CEASE_INVOCATION,
         message="Hi from history_lookup")