Edgewall Software

Changes between Initial Version and Version 1 of TighterSubversionIntegration


Ignore:
Timestamp:
Nov 21, 2004, 11:57:03 AM (20 years ago)
Author:
cboos@…
Comment:

Initial proposal

Legend:

Unmodified
Added
Removed
Modified
  • TighterSubversionIntegration

    v1 v1  
     1= Advocating a Tighter Subversion Integration =
     2
     3== Motivation ==
     4
     5Trac is not a versioning system, but it allows developers to use one effectively.
     6
     7Nevertheless, Trac has its own versioning needs for its data.
     8That would be useful for managing attachments.
     9That's also true for the Wiki page content in the current Trac
     10and that would be true for any Trac object in the the TracObjectModelProposal.
     11
     12If one takes for granted the underlying versioning system,
     13why not use it for that task instead of having to implement
     14an ad-hoc versioning scheme?
     15
     16That would:
     17 * provide better diffs than what we have now
     18 * need a smaller memory footprint (each version of each wiki page
     19   would not have to be stored in its full extent, only the diffs)
     20 * provide versioning for attachments
     21 * enable the users to directly interact with the Trac content,
     22   instead of having only the Trac web interface:
     23   * they could edit the wiki content with a text editor,
     24     as they would do with a normal repository file
     25   * they could do some refactorings on the Wiki content (renamings,
     26     fixing some pervasive typographical error, etc.)
     27   * they could directly add attachments to Trac object
     28
     29Another feature that would be possible is to redirect a Wiki page
     30as being some actual file in the normal repository. For example, a
     31wiki page containing the description of a given software component
     32could actually be placed in the {{{doc}}} subfolder of that
     33component. Keeping it closer to the source increases its chances
     34to stay uptodate.
     35
     36This Wiki redirection would be quite simple to implement:
     37the content would be a TracLinks pointing to a specific file
     38in the repository. Actually, that's similar to the TicketAliases idea (See ticket #xxx).
     39
     40The same for attachments: any file from the repository could be
     41said to be "attached" to a Trac object, instead of having to be
     42uploaded in all cases. In the end, an Attachment and a File would
     43really be the same thing.
     44
     45
     46== Implementation ==
     47
     48There would be essentially 2 ways to implement that integration:
     49 * using a private area in the Subversion repository being trac'ed
     50 * using a private repository
     51
     52=== A private area ===
     53
     54A top-level folder in the repository would be used by trac.
     55This could be {{{/trac}}}, but that would be configurable.
     56
     57There would be no point to deal with a Changeset saying
     58''!WikiPage !AbCdEf modified'', beside the regular !WikiPage edited event,
     59except, of course, if that modification was done outside of Trac,
     60by a direct modification and commit on the Trac files.
     61
     62Deciding whether a changeset must be taken into account or ignored
     63could be done very simply: each revision created by Trac could be
     64remembered as such, in a {{{trac_revision}}} table.
     65
     66The only disadvantage of this approach would be the presence
     67of gaps in the sequence of changesets.
     68
     69
     70=== A private repository ===
     71
     72Alternatively, all the versioning needs of Trac could be fulfilled
     73by the use of a private repository. This would prevent any
     74interference with the main repository.
     75
     76The disadvantage of this approach are:
     77 * The need to differentiate between a !WikiPage in the main
     78   repository and a !WikiPage in Trac's own repository.
     79   One more level of indirection.
     80 * It would require more administrative work to make that repository
     81   directly accessible to clients. That access would be convenient
     82   for directly editing a wiki content with a text editor.