Ticket #73 (new enhancement)
Add documentation for branches/tags/trunk SVN assumptions
| Reported by: | elegant_dice | Owned by: | lele |
|---|---|---|---|
| Priority: | minor | Milestone: | VersionOne |
| Component: | tailor | Version: | 0.9 |
| Keywords: | Cc: |
Description
I noticed that tailor was attempting to detect trunk, tags, branches directories. When it did detect them, it did not process them as I expected.
Please document what SVN directory structure is required for tailor to import tags as tags, etc. I assume that is the intent of the detection?
thanks Paul
Attachments
Change History
comment:2 in reply to: ↑ 1 Changed 7 years ago by elegant_dice
Replying to lele:
What do you mean with "tailor was attempting to detect trunk, tags, branches directories"?
Tailor doesn't know anything about the structure and conventions used by a SVN repo, and unfortunately tracking Subversion tags is very difficult, because one have to follow a completely different subtree just to notice something were tagged...
Here is a log from tailor. It uses the same config as in ticket #65, except that the line 'module=/trunk/' now reads 'module=/'
22:35:08 [I] Bootstrapping "project" in "/home/paul/fatman/tailor" 22:35:08 [I] /home/paul/fatman/tailor/darcside $ darcs initialize 22:35:08 [I] [Ok] 22:35:08 [I] $ svn ls svn+ssh://two-up.homeip.net/home/svn/regional-repos 22:35:15 [I] [Ok] 22:35:15 [I] $ svn ls svn+ssh://two-up.homeip.net/home/svn 22:35:17 [W] [Status 1] 22:35:17 [I] $ svn log --verbose --xml --stop-on-copy --revision 1:HEAD --limit 1 svn+ssh://two-up.homeip.net/home/svn/regional-repos/trunk/ 22:35:35 [I] [Ok] 22:35:35 [W] Ignoring u'/trunk' since it is not under '/trunk/' 22:35:35 [W] Ignoring u'/branches' since it is not under '/trunk/' 22:35:35 [W] Ignoring u'/tags' since it is not under '/trunk/' *** It looks like it did assume that there would be 'branches' and 'tags' and 'trunk', but i'm not sure what the purpose is for. 22:35:35 [I] $ svn co --quiet --ignore-externals --revision 1 svn+ssh://two-up.homeip.net/home/svn/regional-repos/trunk/ /home/paul/fatman/tai lor/svnside 22:35:43 [I] [Ok]
comment:3 follow-up: ↓ 4 Changed 7 years ago by lele
When tailor bootstraps a new project, the first thing it does is a check to see if the URL given as repository points effectively to the root of the repository, otherwise it won't be able to correctly understand the paths, when parsing them from the svn log. There is an option, trust-root, that prevents this check.
But the fact that it's ignoring some paths indicate that you used /trunk/ as module name in this case too: most probably, the very first revision in the repository builds up the conventional structure of it, so that there is a single "patch" that touches several subtrees, and tailor ignores the entries not belonging to the tracked one. In your case, it ignores all of them, since you are starting from a point below.
But as said, tailor has no notion about the meaning of "/branches" or "/tags" (or "/trunk" even). It just migrate revisions touching files under the point indicated by repository/module.
Since in subversion a branch (or a tag) are just simple copies of subtrees, it has no way of determine the difference and thus recognizing the particular meaning.
To do what you ask, the subversion project could be enriched with other information, such as
repository = svn://some.server/svn module = /productA/trunk/ trunk = /productA/trunk/ tags = /productA/tags/ branches = /productA/branches/
only at that point the backend would be able to recognize tags and branches. But again it would not be simple, for example because a tag may be retroactive (that is svn cp -r 10 /productA/trunk /productA/tags/version10)
comment:4 in reply to: ↑ 3 Changed 7 years ago by elegant_dice
Ok that makes sense. I personally don't need the branches and tags, and I'd suggest to not enhance tailor in this regard since there are apparently several 'standard' ways to structure your SVN tree, so whatever you implement will probably not work for 60% of users who need the feature.
An additional (hopefully easy) question: since Tailor will work its way back up the paths to check for the true repository root, is there any difference in doing:
repository = svn://some.server/svn module = /productA/trunk/
compared to:
repository = svn://some.server/svn/productA/trunk/ module = /
?
comment:5 Changed 7 years ago by lele
Yes, since Tailor applies the principle "explicit is better than implicit", and thus it does not split the URL by itself (IIRC it prints out a suggestion in that case).
But surely it would be easy to add another flag to authorize Tailor to do the split, if this is a problem.
comment:6 Changed 6 years ago by HenryN
The attachment monotone.branches is the config to convert Monotone source tree self to Subversion, it supports tags and branches, works only with the patch svn-target-branches.patch
Please see also the last complete patch on http://www.henrynestler.com/tailor/
Changed 6 years ago by HenryN
-
attachment
svn-tags-propset.patch
added
set author and date after copy tags
Changed 6 years ago by HenryN
-
attachment
monotone.branches
added
example config for using branches tags and trunk (svn as target)

What do you mean with "tailor was attempting to detect trunk, tags, branches directories"?
Tailor doesn't know anything about the structure and conventions used by a SVN repo, and unfortunately tracking Subversion tags is very difficult, because one have to follow a completely different subtree just to notice something were tagged...