Peter Schuller <peter.schuller@infidyne.com> writes:
> Hmm. I think I just realized what it really is that I am looking for. I
> want to be able to commit *a set of changes*. That is, I want to be able
> to create a set of logical commits/diffs in the repository separately
> from the main tree. I want to be able to work against this "scratch"
> version of the repository. Sort of like views for tables in relational
> databases, except in this case it's a view of the repository.
What you are describing is exactly what the "branch" concept means.
> When I'm done, I don't just want to commit my current code like normal.
> I want to commit my view. I.e., I want to logically "commit the
> commits".
>
> Imagine something like:
>
> ... working in a checked out directory ...
> svn changeview experimental
> ... do variouis stuff, commit changes, etc:
> svn commit -m '* Did something'
> svn commit -m '* Did something else'
> ... decide to commit to the main view:
> svn changeview main
> svn commitview experimental
In Subversion-speak, this would be:
svn copy -m 'make experimental branch' \
http//.../trunk http://.../branches/experimental
... remember the revision number we just created here as REV ...
svn switch http://.../branches/experimental
... do various stuff, commit changes, etc:
svn commit -m '* Did something'
svn commit -m '* Did something else'
... decide to commit to the main view:
svn switch http://.../trunk
svn merge -r REV:HEAD http://.../branches/experimental
svn commit -m '* Merging in experimental changes'
> I suppose it could also be considered transactions in the relational DB
> sense. I.e., you start a transaction (or int his case possibly "attach"
> to an existing transaction), make variouis changes and then commit the
> whole thing as one logical unit.
>
> The result of an "svn log" after the above should show each individual
> "sub-revision" with "did something" and "did something else".
>
> Am I making sense?
Sure. In the case above :
`svn log http://.../trunk' - show changes to the trunk only (including merge)
`svn log http://.../branches/experimental' - show experimental changes.
`svn log http://.../ - show all changes.
> ------------------
> My initial E-Mail:
> ------------------
> I have an idea w.r.t. the handling of logs (i.e. commit comments). It
> may have been discussed before; haven't been on the list for that long.
>
> The issue concerns branching. It is farily common to want to develop
> in one branch and then merge it back into the head branch on occasion.
> There is one problem with this; it makes changes more difficult to
> track[1]. Why? Because when merging changes from a branch you provide a
> log message for the merge, as a unit. You loose the messages logged
> when the changes to the branch being merged was done.
I do:
svn log --strict http://.../branches/experimental | grep -e 'Rev: '
which shows me all the revisions committed to the branch. When I
commit my merge, I simply note those revision numbers (except the
oldest one, which was where the branch was created) in the log
message. Granted, that is a policy thing, not something Subversion
does for me. But we day plan to have Subversion remember this sort of
thing for you later.
Note that you can always `svn rm http://.../branches/experimental'
without losing any data after your merge/commit. That way you can
re-use the /experimental branch name later and wah-lah, you have a
clean view of the trunk at whatever revision you so desire.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 25 03:02:29 2002