Delete file problem

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Delete file problem

Post by kasti » Mon Nov 21, 2005 3:27 am

Deleting a file within a checked-out folder causes a strange issue.

(1) Check-out a folder.
(2) Undo the check-out for a single file within this folder.
(3) Delete the file within Vault.
(4) Now check-in the folder.

Vault will show up an error message that it cannot find the file previously deleted. As a work-around undelete the file and repeat the check-in operation. Interestingly, during this operation the file is deleted ?!. Wonder how it knows that...


All done with Vault GUI Client 3.1.4 (and Server).


Thanks,
Herbert.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Nov 21, 2005 9:05 am

I suspect that you already had a delete command of that file in your pending change set, so that when you tried to checkin the folder, it included the delete command, but the file had already been deleted, so the whole transaction failed.

This is what likely happened:

1. Check out the folder
2. Attempt to delete one of the files. This fails because you can't delete a checked out file. However, this puts the delete command in the pending change set, so that you can invoke it from there after fixing the problem.
3. Delete the file again. This is where Vault could be smarter. It should notice that the command is already in the pending change set, and remove it. (The issue here is that when auto-commit is turned on, it doesn't go the pending change set at all, but sends the commands immediately to the server).
4. Checkin the folder, which checkins in all pending change set items below that point, which includes the deleted file, which causes the transaction to fail.

I'll add a feature request to remove pending change set items that exactly match an operation that is automatically committed.

kasti
Posts: 108
Joined: Tue Apr 20, 2004 4:21 am
Location: Austria

Post by kasti » Mon Nov 21, 2005 9:24 am

Hi Dan,

No, the delete itself did not fail since we did an undo checkout of the file first. The following checkin of the whole folder fails.

Since the whole folder checkin fails, we had to undelete the file. Then checkin folder, and now the file gets deleted automagically.
This is just strange and we mentioned it as a sidenote. The real problem however is that the foldercheckin fails.

Thanks,
Herbert.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Nov 21, 2005 10:02 am

Then I wasn't able to reproduce this here.

I'm fairly confident that the only way for a delete operation to have been sent to the server would be for one to exist in the pending change set. Can you test this again (perhaps on a test server or folder) and check whether the delete operation is in the PCS before the commit, or is in the check in window as one of the operations?

Locked