You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Mark E. Hamilton" <mh...@sandia.gov> on 2008/05/09 16:23:09 UTC

svn: Commit failed (details follow): 'file' is not under version control

Hi,

I've got a situation with SVN that seems inconsistent. I'm using this 
version of SVN:

sahp7635% svn --version
svn, version 1.5.0 (Release Candidate 4)
    compiled Apr 25 2008, 16:46:48

I have a sparse working directory that contains a file which has been 
ignored, and some sub-directories, some of which were updated and some 
of which were checked out (so my working directory is disjoint so I 
can't just do 'svn commit -m Test'.) I can get the status using a wildcard:

% svn status *
M      ARPACK/ARPACK_sn.xml
M      Nbtools/Jamroot
I      SNTools.project
M      Sierra/Sierra.xml
M      aria/Apps_aria.C

and it ignores the ignored file. However, when I try to commit with the 
same wildcard it fails:

% svn -m Test commit *
svn: Commit failed (details follow):
svn: '/var/scratch2/sierra_svn_votd/SNTools.project' is not under 
version control

I would understand if it whined about a file that was not under version 
control and not marked as ignored, but it seems to me that in this case 
it should ignore this file even for a commit. Not being able to do this 
means that we have to explicitly specify each sub-directory we want to 
commit, which  means that something could be missed. I don't know if 
this behavior is intentional or a bug. Is there a reason why allowing 
this commit would be an unwise thing for SVN to do?

-- 
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Commit failed (details follow): 'file' is not under version control

Posted by "Mark E. Hamilton" <mh...@sandia.gov>.
Mark E. Hamilton wrote:
> Hi,
> 
> I've got a situation with SVN that seems inconsistent.
> 
> I can get the status using a wildcard:
> 
> % svn status *
> M      ARPACK/ARPACK_sn.xml
> M      Nbtools/Jamroot
> I      SNTools.project
> M      Sierra/Sierra.xml
> M      aria/Apps_aria.C
> 
> and it ignores the ignored file. However, when I try to commit with the
> same wildcard it fails:
> 
> % svn -m Test commit *
> svn: Commit failed (details follow):
> svn: '/var/scratch2/sierra_svn_votd/SNTools.project' is not under
> version control


FWIW, 'svn update *' also doesn't choke on the ignored file (though it's 
not clear to me why it reports a revision for it):

% ls
ARPACK/  Nbtools/  SNTools.project  Sierra/  aria/
% svn update *
At revision 40420.
At revision 40420.
At revision 40420.
At revision 40420.
At revision 40420.



-- 
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Commit failed (details follow): 'file' is not under version control

Posted by "Mark E. Hamilton" <mh...@sandia.gov>.
Erik Huelsmann wrote:
> On Fri, May 9, 2008 at 9:15 PM, Mark E. Hamilton <mh...@sandia.gov> wrote:
>>  The 'svn status *' and 'svn update *' both understand these three classes,
>> so  my question is why doesn't 'svn -m Test commit *'? Why doesn't it ignore
>> the ignored files? Is there a situation in which this would be the wrong
>> thing to do?
> 
> It doesn't ignore the ignored files, because ignored files are
> something specific to svn status/ svn add, not to commit. You can
> still explicitly add+commit ignored files. This is what svn is
> complaining about with your wildcarded command: the file is
> unversioned (be it ignored) and you can't commit unversioned files...

Thanks. I understand what you mean; I'm not sure I agree with it, 
though. You can't (or shouldn't be able to) commit ignored files as well.

Basically, what I see happening is that the 'svn:ignore' property (or 
global ignores) is obeyed when the command does not specify the file, 
and ignored when the command does specify the file. Ie, 'svn 
(status|update)' doesn't display the ignored files, 'svn (status|update) 
*' does. Also, if I have ignored files in my working directory and do 
'svn --force add .' it will ignore them, but if I do 'svn add *' it will 
not ignore them. (And, of course, 'svn commit' ignores them and 'svn 
commit *' doesn't.) I read the manual section on ignoring unversioned 
items, and it doesn't really make this clear.

IMO, if a file/directory is ignored it should always be ignored. No 
command should process it (though it's useful for 'svn status *' to show 
them so that users can know they are ignored,) and I'd really like to 
see 'svn commit' ignore them. This would really simplify committing 
disjoint hierarchies with ignored files in the directory.  Any file that 
is ignored (either by svn:ignore or global ignores) could be explicitly 
added using 'svn --no-ignore add some_ignored_file'.

I expect that we can live with they way it is, however. Thanks again.

-- 
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Commit failed (details follow): 'file' is not under version control

Posted by Erik Huelsmann <eh...@gmail.com>.
On Fri, May 9, 2008 at 9:15 PM, Mark E. Hamilton <mh...@sandia.gov> wrote:
> Erik Huelsmann wrote:
>
> >
> >
> > >  I have a sparse working directory that contains a file which has been
> > > ignored, and some sub-directories, some of which were updated and some
> of
> > > which were checked out (so my working directory is disjoint so I can't
> just
> > > do 'svn commit -m Test'.) I can get the status using a wildcard:
> > >
> >
> >
> > The wildcard expands to a list of files including the unversioned
> > file. If you run svn commit without the wildcard, the above should
> > work.
> >
>
>  In any working directory there are three classes of files; revisioned,
> unrevisioned but ignored, and unrevisioned. The first two are known to svn;
> the third are not. In my example everything that the wildcard expands to is
> known to svn; the file it is complaining about is unrevisioned but known
> (due to the svn:ignore property on the working directory.)
>
>  The 'svn status *' and 'svn update *' both understand these three classes,
> so  my question is why doesn't 'svn -m Test commit *'? Why doesn't it ignore
> the ignored files? Is there a situation in which this would be the wrong
> thing to do?

It doesn't ignore the ignored files, because ignored files are
something specific to svn status/ svn add, not to commit. You can
still explicitly add+commit ignored files. This is what svn is
complaining about with your wildcarded command: the file is
unversioned (be it ignored) and you can't commit unversioned files...

Bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Commit failed (details follow): 'file' is not under version control

Posted by "Mark E. Hamilton" <mh...@sandia.gov>.
Erik Huelsmann wrote:
>>  I have a sparse working directory that contains a file which has been
>> ignored, and some sub-directories, some of which were updated and some of
>> which were checked out (so my working directory is disjoint so I can't just
>> do 'svn commit -m Test'.) I can get the status using a wildcard:
> 
> The wildcard expands to a list of files including the unversioned
> file. If you run svn commit without the wildcard, the above should
> work.

In any working directory there are three classes of files; revisioned, 
unrevisioned but ignored, and unrevisioned. The first two are known to 
svn; the third are not. In my example everything that the wildcard 
expands to is known to svn; the file it is complaining about is 
unrevisioned but known (due to the svn:ignore property on the working 
directory.)

The 'svn status *' and 'svn update *' both understand these three 
classes, so  my question is why doesn't 'svn -m Test commit *'? Why 
doesn't it ignore the ignored files? Is there a situation in which this 
would be the wrong thing to do?

The 'svn commit' command w/o the wildcard won't work because my working 
copy is disjoint; some of the directories (Sierra, Nbtools, aria) were 
retrieved from the repository with a 'svn update', and some (ARPACK) 
were retrieved a 'svn checkout'. Since the ARPACK directory is disjoint, 
it would be ignored by 'svn -m Test commit'.

When I explicitly name all four directories on the command line, as in

svn -m Test commit ARPACK Nbtools Sierra aria

they are committed correctly in a single transaction. Doing it this way 
is a solution, of course, but this is just a simple test case. When our 
developers have many more directories in their working directory, having 
to specify each one on the command line could be tedious. Wildcards 
exist for making dealing with groups of large files easy.

However, to ensure the disjoint child was not causing the problem I 
created a new working directory, checked out the trunk using 
--depth=empty and only updated two sub-directories. I still get the same 
error (though as you pointed out in this case 'svn commit' w/o the 
wildcard would have worked)

% svn status *
I      SNTools.project
M      Sierra/Sierra.xml
M      Sierra/Sierra_sn.xml
M      aria/Apps_aria.C

% svn update *
At revision 40421.
At revision 40421.
At revision 40421.
At revision 40421.

% svn -m Test commit *
svn: Commit failed (details follow):
svn: '/var/scratch2/sierra_svn_votd/SNTools.project' is not under 
version control


-- 
----------------
Mark E. Hamilton
Orion International Technologies, Inc.
Sandia National Laboratory, NM.
505-844-7666


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn: Commit failed (details follow): 'file' is not under version control

Posted by Erik Huelsmann <eh...@gmail.com>.
On Fri, May 9, 2008 at 6:23 PM, Mark E. Hamilton <mh...@sandia.gov> wrote:
> Hi,
>
>  I've got a situation with SVN that seems inconsistent. I'm using this
> version of SVN:
>
>  sahp7635% svn --version
>  svn, version 1.5.0 (Release Candidate 4)
>    compiled Apr 25 2008, 16:46:48
>
>  I have a sparse working directory that contains a file which has been
> ignored, and some sub-directories, some of which were updated and some of
> which were checked out (so my working directory is disjoint so I can't just
> do 'svn commit -m Test'.) I can get the status using a wildcard:
>
>  % svn status *
>  M      ARPACK/ARPACK_sn.xml
>  M      Nbtools/Jamroot
>  I      SNTools.project
>  M      Sierra/Sierra.xml
>  M      aria/Apps_aria.C
>
>  and it ignores the ignored file. However, when I try to commit with the
> same wildcard it fails:
>
>  % svn -m Test commit *
>  svn: Commit failed (details follow):
>  svn: '/var/scratch2/sierra_svn_votd/SNTools.project' is not under version
> control

The wildcard expands to a list of files including the unversioned
file. If you run svn commit without the wildcard, the above should
work.


HTH,


Erik.

>  I would understand if it whined about a file that was not under version
> control and not marked as ignored, but it seems to me that in this case it
> should ignore this file even for a commit. Not being able to do this means
> that we have to explicitly specify each sub-directory we want to commit,
> which  means that something could be missed. I don't know if this behavior
> is intentional or a bug. Is there a reason why allowing this commit would be
> an unwise thing for SVN to do?
>
>  --
>  ----------------
>  Mark E. Hamilton
>  Orion International Technologies, Inc.
>  Sandia National Laboratory, NM.
>  505-844-7666
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>  For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org