You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Christian Andersson <ch...@cs.lth.se> on 2002/08/06 12:08:12 UTC
Strict long transactions?
Consider a repository head revision
dir/foo.c
dir/bar.c
and two users Alice and Bob. Alice changes foo.c and commits, creating a new
version of the repository. At the same time Bob changes bar.c and tries to
commit just after Alice.
In CVS using local filesystem repository, Bob's commit is rejected, thanks to
the strict long transaction model. However, when using the network
implementation of CVS, Bob's commit is accepted, without an update. The CVS
developers seem to have chosen this solution by design --- a choice that I
think is wrong.
Subversion seems always to accept Bob's commit without a prior update, and I
therefore have a few questions:
1. Am I wrong?
If no,
2. Is this behavior a bug, or is it intentional?
If intentional
3. Why?
--
Ch
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Russ Allbery <rr...@stanford.edu>.
Christian Andersson <ch...@cs.lth.se> writes:
> Consider a repository head revision
> dir/foo.c
> dir/bar.c
> and two users Alice and Bob. Alice changes foo.c and commits, creating a
> new version of the repository. At the same time Bob changes bar.c and
> tries to commit just after Alice.
> In CVS using local filesystem repository, Bob's commit is rejected,
> thanks to the strict long transaction model.
I use CVS exclusively with local file system repositories, across several
different versions of CVS, and I've never seen the behavior that you
describe.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Christian Andersson <ch...@cs.lth.se>.
On Tuesday 06 August 2002 18:31, Karl Fogel wrote:
> Aiyyaaaaaaaaaa :-).
Interesting... :-)
> You probably don't know it, but about once a month, someone (usually
> new to the project) brings this up, and we always say the same thing:
>
> We're not going to do this before 1.0. We don't know if we're going
> to do it after 1.0. Personally, I think if people want to update,
> they should run "svn update". It's not that hard :-). But raise the
> topic up again after 1.0 if you want.
Things are easy in an ideal world...
> The fact that such support is "usually implemented in those large,
> extremely expensive, commercial tools" is not an argument. What would
> be persuasive would be a tale of how you (or someone you know) got
> bitten by not having the long transaction model.
Yes, the argument sucks, I really regret writing it! What I perhaps meant was
that the commercial (Thanks, for correcting my spelling, BTW) tools that I
know of (except that abominable MS contrib), actually leaves decisions about
the commit policy to the user (the manager of the repository), which I
believe is quite good. (Rational ClearCase is one example, although the
general complexity of that system --- and certainly its price --- makes it
unusable for small projects. Still, believe it or not, many large companies
at least own it, and are desperately trying to understand how to use it.)
Policies differ as I said, although perhaps not that much in the so called
"open-source community", since until now, CVS has dictated the rules in most
of the cases.
The most persuasive argument I can come up with right now is, again, that I
think that the users' freedom of choice, regarding things such as commit
policies in their projects, would be well worth trying to satisfy. Just as
the way Subversion supports, for example, 3-way diffing/merging for those
users that want to use it. The fact that this topic is brought up once a
month does also imply that there are people other than me who want this
feature.
What I'm personally into right now, is finding a replacement for CVS in
student software engineering projects, which takes place every year at the
Lund Institute of Technology.
At our Department of Computer Science, where I work, we're interested in
research on agile process models in general, specifically with some focus on
software configuration management. We have a group of researchers and a
professor with long experience in this area.
We have used different tools, free and commercial, for versioning during the
years of the project course that I mentioned. All of them, of course, have
their respective advantages and drawbacks. Things we have specifically been
lacking in CVS are the strict long transactions (for the reasons I tried to
describe in my last contrib to the list) _and_ features among all of which
Subversion certainly comes up with the right solutions, as far as we believe.
I'm sorry if I'm tedious in my formulations.
> By the way, I just tested your claim about CVS in local mode...
> ... and it is not true with CVS 1.11p1 with local repository. Bob was
> able to commit without updating.
Yes, he is if he explicitly commits just "his" file using 'cvs ci bar.c', an
action that should also be forbidden in the LT model, as far as I see it. But
'cvs ci' inside dir/ is rejected in CVS 1.11.1p1, which is the version I
assume you meant.
--
Ch
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ah -- I can get the same behavior, but only when I don't specify the
target of the second commit. Nice to know, in case it ever comes up
again, though it would probably be considered a bug by the CVS
maintainers at this point.
Anyway, this is getting farther from Subversion, so I'll not post more
on it.
-K
Greg Hudson <gh...@MIT.EDU> writes:
> I expected Christian to be wrong as well, but I got a surprising result
> with CVS 1.10. (Dunno if the version difference is an issue.) I found
> that if I did a "cvs ci" with no arguments, I got an up-to-date check
> failure, but I could still do a "cvs ci bar", of course. Here is my
> command history:
>
> 1 14:26 setenv CVSROOT /tmp/repos
> 2 14:27 cvs init
> 3 14:27 mkdir $CVSROOT/dir
> 4 14:27 cd /tmp
> 5 14:27 cvs co dir
> 6 14:27 cd dir
> 7 14:27 touch foo bar
> 8 14:27 cvs add foo bar
> 9 14:27 cvs ci -m ''
> 10 14:27 cd ..
> 11 14:27 cvs co -d dir2 dir
> 12 14:27 cd dir
> 13 14:27 echo foo > foo
> 14 14:27 cd ../dir2
> 15 14:27 echo bar > bar
> 16 14:27 cd ../dir
> 17 14:27 cvs ci -m ''
> 18 14:28 cd ../dir2
> 19 14:28 cvs ci -m ''
> 20 14:28 cvs ci -m '' bar
> 21 14:29 cvs --version
>
> Command 19 yielded an error, while command 20 succeeded.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Russ Allbery <rr...@stanford.edu>.
Greg Hudson <gh...@MIT.EDU> writes:
> I expected Christian to be wrong as well, but I got a surprising result
> with CVS 1.10. (Dunno if the version difference is an issue.) I found
> that if I did a "cvs ci" with no arguments, I got an up-to-date check
> failure, but I could still do a "cvs ci bar", of course.
Yes, cvs ci attempts to commit every file in the current directory, and
therefore performs up-to-date checks on all of them. (It then silently
discards from the commit all files that are both up-to-date and have no
local changes.)
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2002-08-06 at 12:31, Karl Fogel wrote:
> By the way, I just tested your claim about CVS in local mode:
> ... and it is not true with CVS 1.11p1 with local repository. Bob was
> able to commit without updating.
I expected Christian to be wrong as well, but I got a surprising result
with CVS 1.10. (Dunno if the version difference is an issue.) I found
that if I did a "cvs ci" with no arguments, I got an up-to-date check
failure, but I could still do a "cvs ci bar", of course. Here is my
command history:
1 14:26 setenv CVSROOT /tmp/repos
2 14:27 cvs init
3 14:27 mkdir $CVSROOT/dir
4 14:27 cd /tmp
5 14:27 cvs co dir
6 14:27 cd dir
7 14:27 touch foo bar
8 14:27 cvs add foo bar
9 14:27 cvs ci -m ''
10 14:27 cd ..
11 14:27 cvs co -d dir2 dir
12 14:27 cd dir
13 14:27 echo foo > foo
14 14:27 cd ../dir2
15 14:27 echo bar > bar
16 14:27 cd ../dir
17 14:27 cvs ci -m ''
18 14:28 cd ../dir2
19 14:28 cvs ci -m ''
20 14:28 cvs ci -m '' bar
21 14:29 cvs --version
Command 19 yielded an error, while command 20 succeeded.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Christian Andersson <ch...@cs.lth.se> writes:
> With the above motivation, I think it would be a mistake not at least to
> _support_ such a commit strategy or policy in the Subversion tool, in the
> other way or another. Such support is usually implemented in those large,
> extremely expensive, commersial tools on the market. A agree that a good CVS
> compatibility way of doing it, is disabling it by default. It's good if
> people can retain fine control over the states of their working copies, but
> it's also nice with fine control over the state of the repository.
Aiyyaaaaaaaaaa :-).
You probably don't know it, but about once a month, someone (usually
new to the project) brings this up, and we always say the same thing:
We're not going to do this before 1.0. We don't know if we're going
to do it after 1.0. Personally, I think if people want to update,
they should run "svn update". It's not that hard :-). But raise the
topic up again after 1.0 if you want.
The fact that such support is "usually implemented in those large,
extremely expensive, commercial tools" is not an argument. What would
be persuasive would be a tale of how you (or someone you know) got
bitten by not having the long transaction model.
By the way, I just tested your claim about CVS in local mode:
> Consider a repository head revision
>
> dir/foo.c
> dir/bar.c
>
> and two users Alice and Bob. Alice changes foo.c and commits, creating a new
> version of the repository. At the same time Bob changes bar.c and tries to
> commit just after Alice.
>
> In CVS using local filesystem repository, Bob's commit is rejected,
> thanks to the strict long transaction model. However, when using the
> network implementation of CVS, Bob's commit is accepted, without an
> update. The CVS developers seem to have chosen this solution by
> design --- a choice that I think is wrong.
... and it is not true with CVS 1.11p1 with local repository. Bob was
able to commit without updating.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Christian Andersson <ch...@cs.lth.se>.
On Tuesday 06 August 2002 17:01, Karl Fogel wrote:
> If CVS local really behaves the way you describe, it's a bug. But I
> find it hard to believe that no one would have noticed this by now.
The reason that few people may have noticed this in CVS, could be that CVS is
usually used with a remote repository, where the behavior is different from
the local repository situation. Maybe it's a bug that the long transaction
model shows up by default in the latter case, but using the commitinfo
concept of CVS, this behavior can be configured, although it is quite
difficult.
> Both to be compatible with CVS, and because we think it's useful to
> not enforce strict updating, so people can retain fine control over
> the state of their working copy while still being able to commit. In
> practice, few problems seem to arise from this model (since it's the
> CVS model too, there's a *lot* of practice to draw on).
I don't think it's useful to enforce _anything_ regarding the integration
management. Different sites use different policies. Let's say, for example,
that a team likes to work under the invariant of a compilable/testable
repository at any time. (I beleive this is a common situation.) Since the
files of a software module are not usually completely independent (for
compilability/testability), only the long transaction model fully supports
the policy of making all integration in the working copy, where compilability
and testability can be verified. In CVS / Subversion, repository correctness
under the above invariant can not be guaranteed. Two persons can obviously
make changes to different files, still be able both to compile and test in
their respective sandboxes, but this may not be the case after the second
commit, if their changes happen to be "conflicting". But the second commit is
still legal from the Version Control System point of view.
With the above motivation, I think it would be a mistake not at least to
_support_ such a commit strategy or policy in the Subversion tool, in the
other way or another. Such support is usually implemented in those large,
extremely expensive, commersial tools on the market. A agree that a good CVS
compatibility way of doing it, is disabling it by default. It's good if
people can retain fine control over the states of their working copies, but
it's also nice with fine control over the state of the repository.
--
Ch
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Strict long transactions?
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Christian Andersson <ch...@cs.lth.se> writes:
> Subversion seems always to accept Bob's commit without a prior update, and I
> therefore have a few questions:
>
> 1. Am I wrong?
Yes.
If CVS local really behaves the way you describe, it's a bug. But I
find it hard to believe that no one would have noticed this by now.
> If no,
> 2. Is this behavior a bug, or is it intentional?
Intentional.
> If intentional
> 3. Why?
Both to be compatible with CVS, and because we think it's useful to
not enforce strict updating, so people can retain fine control over
the state of their working copy while still being able to commit. In
practice, few problems seem to arise from this model (since it's the
CVS model too, there's a *lot* of practice to draw on).
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org