On Fri, 2004-01-02 at 00:20, Garret Wilson wrote:
> Well, let's say I do the following on an empty repository:
>
> *Example 1*
> type [cat] "Hello World!" >> foo.txt
> svn status
>
> I would probably get something like this:
>
> ! foo.txt
>
> which means that there is a file, foo.txt, in the tree that has not yet
> been added to the repository.
Correct, although you've got your codes mixed up. "unversioned" files
are shown as
? foo.txt
An exclamation point means the file is under version control, but has
gone missing (perhaps the user ran a normal 'rm' on it, instead of 'svn
rm'.)
>
> If I instead have a repository that already contains a foo.txt and I do
> the following:
>
> *Example 2*
> svn ren foo.txt bar.txt
> type [cat] "Hello World!" >> foo.txt
> svn status
>
> I would think that the *new* foo.txt in Example 2 has the same
> relationship to the repository as does the foo.txt in Example 1---that
> is, it is a file in the tree that has not yet been added to the
> repository.
You are correct, it does. But the problem here is that 'svn status' now
has *two* pieces of information to report about 'foo.txt':
1. the "old" foo.txt, which is still under version control, has been
deleted from the visible working copy and is scheduled for deletion from
the repository. 'svn status' shows this as "D foo.txt"
2. an "new" foo.txt, not yet under version control, is sitting in
your working copy. 'svn status' normally shows this as "? foo.txt".
The problem is that 'svn status' can't show both facts at the same
time. It has a set of precedence rules, and "D foo.txt" is more
important. After you do the commit, the schedule-deletion is finished,
so 'svn status' goes back to showing you the second piece of
information: "? foo.txt"
> As "svn status" tells all the scheduled actions, I suppose it would list:
>
> D foo.txt
> A bar.txt
> ! foo.txt
Nope, 'svn status' only describes a path once. Maybe someday this will
change.
> Before commiting, I always want to make sure I've added all files to the
> repository. With the current "svn status" functionality, I can never
> know from the "svn status" output if all files in the directory have
> been scheduled for addition to the repository before commit.
Good point! Of course, if you ran
$ svn rm foo.txt
$ echo "newfile" >> foo.txt
$ svn add foo.txt
... then you'd see 'svn status' report foo.txt as "scheduled for
replacement", i.e. "R foo.txt".
But at the moment, I guess you're right... it's kinda bad that the "D
foo.txt" is effectively masking the description of the new, unversioned
file.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 2 16:10:41 2004