JakubH Posted September 27, 2013 Report Share Posted September 27, 2013 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 More sharing options...
manu Posted September 27, 2013 Report Share Posted September 27, 2013 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 More sharing options...
JakubH Posted September 27, 2013 Author Report Share Posted September 27, 2013 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 More sharing options...
carpediemevive Posted September 27, 2013 Report Share Posted September 27, 2013 I think this is done because they want to leave it safe by default. Manu, correct me if I'm wrong, but an "Update Forced" option would remove all removed files in the update correct? Link to comment Share on other sites More sharing options...
manu Posted September 27, 2013 Report Share Posted September 27, 2013 Hi, It's sounds to me like a bug, The update should remove the directory. I'll try to reproduce it asap. Link to comment Share on other sites More sharing options...
JakubH Posted October 18, 2013 Author Report Share Posted October 18, 2013 Hi, have you been able to reproduce the issue? It happens regularly here. Link to comment Share on other sites More sharing options...
manu Posted October 23, 2013 Report Share Posted October 23, 2013 Nop. I'm open to schedule a fast GoToMeeting connection to get more details, please tell me if you are available and your timezone. best regards, Manu, Link to comment Share on other sites More sharing options...
JakubH Posted January 8, 2014 Author Report Share Posted January 8, 2014 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 More sharing options...
manu Posted January 8, 2014 Report Share Posted January 8, 2014 Hi! Can you please update to the latest version and test if it works for you? (5.0.44.519) Link to comment Share on other sites More sharing options...
JakubH Posted January 10, 2014 Author Report Share Posted January 10, 2014 I have tried it recently and haven't reproduced it in the latest version (5.0.44.519). So, it has been fixed hopefully. Thanks! We just need to upgrade soon... Link to comment Share on other sites More sharing options...
Opender Posted January 27, 2014 Report Share Posted January 27, 2014 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 More sharing options...
manu Posted January 28, 2014 Report Share Posted January 28, 2014 Hi Opender, it's the same behavior as the one Jakub was having? We can schedule a fast gotomeeting connection to take a look into it. Link to comment Share on other sites More sharing options...
Opender Posted January 28, 2014 Report Share Posted January 28, 2014 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 More sharing options...
JakubH Posted January 29, 2014 Author Report Share Posted January 29, 2014 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 More sharing options...
manu Posted January 29, 2014 Report Share Posted January 29, 2014 As Jakub said we do version directories so please explain if you are having another issue. Thanks! Link to comment Share on other sites More sharing options...
Opender Posted January 29, 2014 Report Share Posted January 29, 2014 Oh dear. Thanks Jakub and Manu - you are correct! It is just the folders that show up. Manu perhaps this could be a feature added into the 'cm fi' command - to delete any empty folders? Thanks! Link to comment Share on other sites More sharing options...
manu Posted January 30, 2014 Report Share Posted January 30, 2014 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"... Link to comment Share on other sites More sharing options...
Opender Posted January 30, 2014 Report Share Posted January 30, 2014 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 More sharing options...
Opender Posted January 30, 2014 Report Share Posted January 30, 2014 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 More sharing options...
calbzam Posted February 5, 2014 Report Share Posted February 5, 2014 Hi, Could you send me that issued fast-export file to review it? You can reach me at: calba at codicesoftware dot com Regards, Carlos Link to comment Share on other sites More sharing options...
Opender Posted February 10, 2014 Report Share Posted February 10, 2014 Hi Carlos, I'll have to see if I can recreate it intentionally. Unfortunately I cant send the issued .fe file directly as it is material from work. I will get back to you soon. Opender Link to comment Share on other sites More sharing options...
calbzam Posted February 10, 2014 Report Share Posted February 10, 2014 Ok, anyway It´s possible to use "--no-data" option when creating the fast-export package. Regards, Carlos Link to comment Share on other sites More sharing options...
Opender Posted February 12, 2014 Report Share Posted February 12, 2014 I'll try that, thanks. Might be a little bit longer before I have time to recreate the problem. Entering a very busy spell at work Link to comment Share on other sites More sharing options...
Heater Posted September 21, 2017 Report Share Posted September 21, 2017 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 More sharing options...
manu Posted September 25, 2017 Report Share Posted September 25, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.