Feature #1371

Entry model

Added by Pierre Paysant-Le Roux almost 14 years ago. Updated about 11 years ago.

Status:NewStart date:2008-06-04
Priority:NormalDue date:
Assignee:-% Done:

0%

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 ?

History

#1 Updated by Pierre Paysant-Le Roux almost 14 years ago

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

#2 Updated by Jean-Philippe Lang almost 14 years ago

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.

#3 Updated by Jean-Philippe Lang almost 14 years ago

Or maybe RepositoryEntry...

#4 Updated by Pierre Paysant-Le Roux almost 14 years ago

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.

#5 Updated by Toshi MARUYAMA about 11 years ago

  • Category set to SCM

Also available in: Atom PDF