Hello,
we are using externals to include common functionality (via source code) to our
projects. So we have the following structure:
CommonRepo (http://mysvn/common):
- source files
ProjectXRepo (http://mysvn/projectx):
projectX
- project specific source files
imports (has externals property)
common
- source files from common
Now we have two competing requirements:
1) We need to be able to develop common files as part of a project
2) We need to be able to reproduce old states of the projects exactly as the
were, when the state was commited
From which i concluded:
1) We can use externals for this, filesystem links/file copies are error-prone
and cumbersome
2) Externals have to be fixed to a specific revision
This should in fact be enough to always have consistent states in the project
repository, but sadly i can make the following mistakes without anyone noticing:
a) I can update the externals folder (imports/common), this operation ignores
that it had been fixed to a revision. (i think the reason is, that the fixed
revision is only known to the parental project, and an update does not check
whether it is applied to an externals folder)
b) I can make changes inside the externals folder, commit them (and generate
a new revision in the CommonRepo) without the parent project noticing it.
(commit says: no files have been changed)
c) After b) i can make changes in the project itself, commit them, without
getting any information that my local state is inconsistent.
These inconsistent states can only be detected on the client-side, from the
perspective of the server, everything is fine. Setting externals to tags instead
of revisions doesn't help, since it will subvert my first requirement. (and is
very uncomfortable for the developer)
The following enhancements to TortoiseSVN would make this scenario work:
- Prevent updates of externals-directories, or the fixed revision on the parent
directory by the new revision number, so the project directory has a "change"
- Commits to externals-directories have to replace the fixed revision on the
parent directory too
- Commiting changes in a project that has externals should check for consistency:
* are all externals on a fixed revision?
* are those externals realy on this revision on the harddisk?
Does this make sense, or am i mistaken in some point? I think with these
enhancements usage of externals could become secure.
Kind regards,
Janosch Scharlipp
P.S: In the end, i additionally need to make sure on server side, that these
checks have been performed, so this information should be somehow part of the
commits meta-data ("externals have been checked for consistency").
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2981216
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-07-09 19:17:11 CEST