Changes between Version 9 and Version 10 of VcRefactoring
- Timestamp:
- Feb 7, 2007, 12:26:00 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
VcRefactoring
v9 v10 31 31 == Support for Multiple Repositories == 32 32 33 This will be done for [milestone:0.11]. 34 35 The cache needs to be modified/extended as well. 33 This will most likely have to wait [milestone:0.12]. 34 35 The cache needs to be modified/extended as well, 36 in order to accommodate multiple repositories. 37 36 38 There are several options: 37 39 1. use the cache as it is, merging all the repositories in a kind of virtual repository; … … 40 42 3. use a dedicated db to cache each repository 41 43 42 1. seems the easiest way to go, not sure if it will be the most efficient, though. 44 Option 1. seems the best way to go. 45 Its efficiency depends mainly about how the new cache will be implemented. 46 If we go with path ids, then using one table would be practical, I think. 43 47 44 48 See also: #2086, trac-dev:340 and, more recently, [googlegroups:trac-users:14ca95377e4a53b5 this mail] where I explain how TracLinks will support multiple repositories. 45 49 50 Another important interdependency which comes to mind is the support for multiple projects in a single environment (see this 51 [TracMultipleProjects/SingleEnvironment#ProposedImplementation proposal]). 52 53 In this scenario, each project would have one or more repositories. 54 Those repositories could eventually be ''shared'' between projects. 55 56 Take the following example: 57 - Project A 58 - repository /srv/svn/repo1 (trunk, branches, etc.) 59 - Project B 60 - repository /srv/svn/repo1 (trunk, branches, etc.) 61 - repository /srv/svn/repo2 (trunk, branches, etc.) 62 63 Within a wiki page of project A, `[123]` or `source:trunk/` would have the usual 1-to-1 meaning. The same resources, referenced from within a page belonging to project B could be accessed using InterTrac links: `[A123]` or `A:source:trunk/`. 64 65 Now within project B, referring to `[123]` or `source:trunk/` would be ambiguous, 66 unless a ''default'' repository would be specified (say /srv/svn/repo2). 67 But in general, ''path restriction'' should be used to properly identify the resource: 68 `[123/repo1]`, `source:repo1/trunk/` and `[123/repo2]`, `source:repo2/trunk/`. 69 70 The ''only'' problem with this approach would be to risk some confusion if a repository name is also used as a toplevel folder name of some other repository in the same project. I'm don't think it's a showstopper though, as: 71 - this shouldn't happen often in the first place 72 - if it happens nevertheless, a simple disambiguation rule could be adopted, 73 like always consider that if the first element in the path restriction 74 corresponds to a repository name when multiple repositories are present, 75 then it's used as a repository selector. 76 77 On the data model level, the cache for /srv/svn/repo1 will be shared for projects A and B. We simply need an additional relation table, pairing projects with repositories. 46 78 47 79 == Support for Mercurial-like Version Control System == … … 54 86 * support for SVN: see #2545 55 87 56 Those are the minimal changes needed so that the Mercurial plugin can work at all.88 Those are the minimal changes needed so that the TracMercurial plugin can work at all. 57 89 58 90 59 91 === Advanced Level === 60 92 61 * Support for direct jump to a tag or a branch.62 Done on the branch (r3017); not yet ported to trunk.63 93 * TracRevisionLog should show the branches (a la 64 [http://www.flickr.com/photos/search/tags:mercurial%2Chgk/tagmode:all/ hgk]) 94 [http://www.flickr.com/photos/search/tags:mercurial%2Chgk/tagmode:all/ hgk]). 95 See also #1492. 65 96 * DONE: 66 97 * Support for arbitrary changeset names (e.g. `[tip]` or `[head]`) 67 98 * Support for direct jump to a tag or a branch. 99 Done on the branch (r3017); re-done for 0.11 (now in trunk) 68 100 69 101 === Support for Big Repositories === … … 73 105 the caching anyway. 74 106 75 This is material for Trac [milestone:0.1 1]107 This is material for Trac [milestone:0.12]... 76 108 77 109 == New Repository Cache == … … 80 112 be able to handle this. The idea is to replicate the tree 81 113 changes information that svn stores. This should also work 82 for mercurial or other backends.114 for Mercurial or other backends. 83 115 84 116 The `node_changes` table could even be kept as it is, I think. … … 88 120 that has been modified. 89 121 90 That way, we could efficiently implement `Repository.get_nodes(path, rev)` 91 using the cached information only. 92 `Repository.get_path_history` 93 could also be implemented in a generic and efficient way using that 94 caching scheme. 95 96 ''As a side note, `Repository.get_changes(from,to)` should also 97 be implemented using the cached information in the `revision` 98 table (that would solve the #2353 issue).'' 122 That way, we could implement: 123 - `Repository.get_node(path, rev)` using the cached information only, 124 which would be a dramatic improvement for Mercurial, which has no 125 information about the folder themselves. 126 - Likewise, `Repository.get_path_history` could also be implemented 127 in a generic and efficient way using that caching scheme. 128 - The next/prev history navigation between revisions (or rather, 129 their extended children/parents versions) could also be implemented 130 on top of the cache. 131 - Probably `Node.get_history` as well, not to mention the possibility 132 to find out the ''copy_to'' information (#1445). 133 - `Repository.get_changes(from,to)` should also be implemented 134 using the cached information in the `revision` table 135 (that would solve the #2353 issue). 136 99 137 100 138 Example: … … 148 186 i.e. the latest revision in which its ''change_type'' was not null. 149 187 188 The paths could maybe be represented by hashes of their dirname, 189 and only the filename part would be in clear text (#3676?). 150 190 151 191 … … 153 193 in particular the file size. Using Mercurial:RevlogNG, that 154 194 information would be cheap to get, but revlogng is not yet 155 widely used. 195 widely used. -- ''update: source:sandbox/mercurial-plugin-0.11 uses the new API'' 156 196 157 197 The most flexible approach for storing extra node fields is certainly 158 198 to let each backend create and maintain an additional table, 159 199 e.g. `node_changes_hg` (see also #2733). 200 201 ---- 202 203 See also: [googlegroups:trac-dev:f32afb39eb3bfd87 improving bazaar support], discussed on Trac-Dev