Project

General

Profile

Actions

Feature #1371

open

Entry model

Feature #1371: Entry model

Added by Pierre Paysant-Le Roux over 18 years ago. Updated over 15 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Resolution:

Description

I am working on integrating Ferret in Redmine. I wan't to be able to index all relevant models and there is no problem with that point. I also want to be able to index the content of files in the repositories.

I think that the proper way to do that is to have a model that represents an entry in the repository (similar to Redmine::Scm::Entry). This model could be created and maintained when syncing the changesets and linked with Changes.

Here is how my model looks like :

+--------------------+         +----------------+
|    Entry           |         |   Change       |
+--------------------+         +----------------+
|  name              |         |  entry_id      |
|  content_type      +---------+                |
|  removed           |         |                |
|  source_revision   |         |                |
|  source_id         |         |                |
|  parent_id         |         |                |
+--------------------+         +----------------+

The source references the entry it is copied from if needed.

Was there discussions about such a model ? Is this interesting Redmine devs for other needs like attaching metadatas or discusions to an entry ?

Updated by Pierre Paysant-Le Roux over 18 years ago Actions #1

Sorry, it's not a defect but a feature...

Updated by Jean-Philippe Lang over 18 years ago Actions #2

Pierre, does your entry model reprent a file or a file at a given revision ?
Also, the term Entry can represent many things, so I would propose to name this model ScmEntry or something like this.

Updated by Jean-Philippe Lang over 18 years ago Actions #3

Or maybe RepositoryEntry...

Updated by Pierre Paysant-Le Roux over 18 years ago Actions #4

Jean-Philippe Lang wrote:

Pierre, does your entry model reprent a file or a file at a given revision ?
Also, the term Entry can represent many things, so I would propose to name this model ScmEntry or something like this.

My first idea was to represent a file. A RepositoryEntry is created when a file is added in the repository. Each time the file is modified, the Change model references the corresponding RepositoryEntry.

If a file is created from a copy, the RepositoryEntry references it trough source_id.

When a file is removed, the corresponding RepositoryEntry is removed (or marked as removed).

Maintaining this representation of the repository results in lots of calculation when retrieving changesets.

Updated by Toshi MARUYAMA over 15 years ago Actions #5

  • Category set to SCM
Actions

Also available in: PDF Atom