On 07 Dec 2001 12:40:38 -0600
cmpilato@collab.net wrote:
> Mo DeJong <supermo@bayarea.net> writes:
>
> > % svn rm bar.c
> > D bar.c
> > % ls
> > bar.c foo.c
> >
> > Now, why is bar.c still there? Why does the client fail to remove
> > the file?
>
> Update does this, I believe that's where we stand on file/dir removal.
Do you mean commit does the unlink? Why would the update
command be responsible for this? What if I don't run update? If I delete
a bunch of files and then commit the delete, I would not expect the files
to still be there. Is this same logic going to apply to a `svn mv` operation?
I would not want to `svn mv` a file and have to run update before the old
one went away. Can't we just let rm remove the file in the wc? I could
see where we might not want to do that if there were modifications to
the file, but in the normal case this seems strange. Ben mentioned the
--force flag, why is that not the default for a rm operation?
> > % svn commit bar.c
> >
> > svn_error: #21050 : <Filesystem has no such file>
> > commit failed: wc locks and tmpfiles have been removed.
> >
> > svn_error: #21050 : <Filesystem has no such file>
> > commit failed: while sending tree-delta.
> >
> > svn_error: #21050 : <Filesystem has no such file>
> > file not found: filesystem `/tmp/subversion/repo/db', transaction
> > `2', path `/project/head/bar.c'
> >
> > Issue 565 seems kind of like this problem, but they are not exactly
> > the same. Is this a known problem or should I file a new issue?
>
> This is so known that the even The Onion is preparing a parody article
> of it. Don't bother with a new issue. It will be addressed in the
> new commit system.
Humm, sounds like there needs to be a test case for this. How about adding
the following to basic_tests.py? I think it is correct, but I am not sure since
the second commit crashes with the above error.
cheers
Mo
#----------------------------------------------------------------------
def basic_delete():
"basic delete command"
sbox = "basic_delete"
wc_dir = os.path.join (svntest.main.general_wc_dir, sbox)
if svntest.actions.make_repo_and_wc(sbox):
return 1
# Add new file and commit it
foo_path = os.path.join(wc_dir, 'foo.c')
svntest.main.file_append (foo_path, 'foo data')
svntest.main.run_svn(None, 'add', foo_path)
# Created expected output tree for 'svn commit'
output_list = [ [foo_path, None, {}, {'verb' : 'Adding' }] ]
expected_output_tree = svntest.tree.build_generic_tree(output_list)
# Create expected status tree for 'svn commit'
status_list = svntest.actions.get_virginal_status_list(wc_dir, '2')
# FIXME: Why can't we pass both wc and repo revisions to above func?
for item in status_list:
item[3]['wc_rev'] = '1'
item = [foo_path, None, {},
{'status' : '_ ',
'wc_rev' : '2',
'repos_rev' : '2'}]
status_list.append(item)
expected_status_tree = svntest.tree.build_generic_tree(status_list)
if svntest.actions.run_and_verify_commit (wc_dir,
expected_output_tree,
expected_status_tree,
None,
None, None,
None, None,
wc_dir):
return 1;
# Now remove the newely added file and run 'svn commit'
svntest.main.run_svn(None, 'delete', foo_path)
# Created expected output tree for 'svn commit'
output_list = [ [foo_path, None, {}, {'verb' : 'Deleting' }] ]
expected_output_tree = svntest.tree.build_generic_tree(output_list)
# Foo should now be deleted and head revision should be 3
status_list = svntest.actions.get_virginal_status_list(wc_dir, '3')
# FIXME: Why can't we pass both wc and repo revisions to above func?
for item in status_list:
item[3]['wc_rev'] = '1'
return svntest.actions.run_and_verify_commit (wc_dir,
expected_output_tree,
expected_status_tree,
None,
None, None,
None, None,
wc_dir)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:51 2006