Jump to content

JakubH

Recommended Posts

We found a strange behavior in Plastic recently:

Somebody deletes a directory and check-in this change.

Others update their workspace, but the deleted folder and all its content is not deleted but rather left in their workspaces as private items.

Why is that? It brings more work for everybody – all need to delete the already deleted folder too (and make sure not to delete any other private items, they might have).

 

I understand that there can be more complex situation: somebody have some private items in a folder which was under version control but which was deleted now. It would not be right to delete that folder during update with the private items of that user in it. Plastic should delete only the files which was deleted under version control system and folders which contain these files only. However if there are no private items, it seems to me to be OK to delete the whole folder, when it was the checked-in change.

Link to comment
Share on other sites

I understand that there can be more complex situation: somebody have some private items in a folder which was under version control but which was deleted now. It would not be right to delete that folder during update with the private items of that user in it. Plastic should delete only the files which was deleted under version control system and folders which contain these files only. However if there are no private items, it seems to me to be OK to delete the whole folder, when it was the checked-in change.

 

This is actually what the update operation must do...

 

Please if you can reproduce the issue I want to get connected with you and review the client logs. Is it possible that the deleted item were used by another tool preventing the delete operation from the HD?

Link to comment
Share on other sites

I have reproduced it quite easily:

I made a folder "test" with one text file and one subfolder, which contained two other text files. I checked-in everything. I updated from a different workspace. Within the first workspace, I deleted the whole folder "test" and checked-in. I updated from the second workspace and whoa-la I have the "test" directory with all its content as private items.

 

I am pretty sure that nothing blocked deletion of those files.

 

I am sending the log file to your email if it helps. We can surely connect directly if needed.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

Just want to know, if you manage to solve this. Any progress?

 

For other forum readers: we did a GoToMeeting and found out that this issue can be reproduced easily when running update through "View new changes" in a Pending changes view. We didn't reproduced it when running update from an Items view. However, one of my colleague, who experienced this issue too, has said to me that he had never used the update through "View new changes". So maybe it can happen in the update from Items view too.

Link to comment
Share on other sites

  • 3 weeks later...

I'm currently running 5.0.44.522 and still experiencing this bug.

 

Any more ideas as to what could be causing it? I'm pressing 'Update Workspace' from the Items view/tab, but it also happens if I use the command 'cm stb /main@MyRepo' after cd-ing into the workspace.

 

Thanks,

Opender

Link to comment
Share on other sites

Cheers Manu,

 

Its similar behavior. I am importing an SVN repo.

 

(For anyone wondering) I used Git-SVN to convert the SVN repo to git, then used git fastexport to create a stream, which I then fast import to PSCM (see this AND this).

 

Over the course of the 18k commits, folders have been added and deleted from the SVN repo which shows up in the changelog. Now when I update my workspace to the HEAD changeset on Plastic, all of those deleted folders still exist. The most updated repo also doesn't match the SVN repo at the corresponding commit in that there are extra folders which should have been deleted.

 

I am in Auckland NZ (GMT +13) but evenings are best due to work. I am happy to schedule a gotomeeting however.

 

Opender

Link to comment
Share on other sites

I think that is another issue. After import from git, all deleted folders appear again (empty) because git doesn't control folders while Plastic does. It happened to me too. I just deleted all those empty folders after import. Note that it happens with folders only. If your deleted files are appearing too, it is another issue.

Link to comment
Share on other sites

Hi Opender!

 

Well, it's not so easy, the issue is that we don't know which directories are already empty during the import. The only moment we 100% sure know which ones are empty is when the import has finished...

 

Maybe we can create a small script that search for empty dirs in the workspace and then "cm rm"...

 

:P

Link to comment
Share on other sites

Perhaps a small script which is run using 'cm rm' but you could go one better and automatically call 'cm rm' internally at the end of any import operation! ;) I also don't think it would be very difficult to implement - there are lots of resources and examples online.

 

I honestly think this would be a very handy feature for anybody new to PSCM importing from other VCSs. I initially thought it was a bug in the program.

Link to comment
Share on other sites

Oh Manu, one more thing about cm fi.

 

If I use Reposurgeon to create the git fastimport/export stream, the .fe/.fi files have comments in them starting with #. Other tools such as Bazaar and Mercurial do ignore these comments, but PSCM crashes as it doesn't know what to do with these comments.

 

I imagine this is also a relatively simple fix, but anything is better than trying to use 'sed' on Ubuntu going through millions and millions of lines of text.

 

Opender

Link to comment
Share on other sites

  • 3 years later...

We've run into the OP issue where I delete a directory and when other users update they see all the files under that directory as private, added files. We are using version 5.4.16.918. I'm not sure if the problem was ever fixed. Not a big issue but kind of annoying to have to tell everyone to manually delete files when the directory should have been deleted. My guess is it's a problem with how PSCM is deleting the directory, maybe not using the recursive flag or not forcing the operation.

Link to comment
Share on other sites

Hi @Heater,

I've been trying to reproduce the issue and I'm afraid I can't get your result. Trying to force it by locking the dir using the OS I get this:

Quote

Error: The process cannot access the file 'c:\Users\manu\wkspaces\default_21\2-DES_Desarrollo\3-Programacion\Ficheros_sql' because it is being used by another process.

But I guess you are not getting errors at all, right?

If you have time we can get connected and review if I'm missing something. Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...