ironbelly Posted April 19, 2017 Report Share Posted April 19, 2017 We just deleted a branch from plastic and now all of the files that were part of that branch locally are gone.. not in the recycle bin but I am not prepared to believe that plastic would do something as stupid as to permanently delete the local files if someone deletes a branch. Assuming the files are either hidden locally somewhere or on the server, so any help would be appreciated here Link to comment Share on other sites More sharing options...
psantosl Posted April 19, 2017 Report Share Posted April 19, 2017 No, deleting a branch has nothing to do with local files. In fact, branches must be empty (no changesets) to be deleted... so, no relation with possible local files. Now, if you deleted the active branch in your workspace, chances are Plastic switched you to the parent branch. Plastic will never switch you to a different branch if there are local changes, unless you decided to bypass that behavior with a setting in preferences, something I don't think will be the case. Even in the worse case (suppose Plastic has to overwrite files to put you on a different branch), it never actually deletes your workspace files, it would simply rename them to .private. But I don't think this will be the case. Just to summarize: no, Plastic does not delete local files if you delete a branch. Delete a branch is a server operation. Workspaces are related to client operations. Thanks, pablo Link to comment Share on other sites More sharing options...
ironbelly Posted April 19, 2017 Author Report Share Posted April 19, 2017 Thanks for the reply. The situation is that we created a branch as a child of the wrong branch by mistake, added files to that branch and submitted. Realizing our mistake we wanted to delete this branch, and make a new one as the child of main. So the logical course of action was to just delete this branch, make a new one properly and recommit the files. So we went to delete the branch, were confront with the 'can't delete branch with changesets error' message and then went on to delete the changesets. Once deleted we then deleted the branch. After that was done we created the new branch and then went to re-add and re-submit the files and low and behold they were gone. This alone seems insane, as why would it delete the local files when all we did was delete the changesets and the branch, which I would assume at most are server operations. But then I realized that we had to back out of the current change set to delete it, so by going back to the changeset before we added/checkin the files it probably removed them locally in the current workspace. This is very bad as it appears that when doing something like this, or switching workspace plastic isn't storing or caching anything locally at all it is flat out deleting it because our next thought was that there would be NO way that plastic would permanently delete the files locally, worst case scenario it would just send them to the recycling bin. So we went to check there but the files are no where to be found. Link to comment Share on other sites More sharing options...
psantosl Posted April 19, 2017 Report Share Posted April 19, 2017 Well, so: * You created a changeset. * You deleted it. * You switched to a different branch. Well, yes, then you deleted your changes. Plastic probably warned you like 3 times before doing that :-( Suppose this scenario: * You are working on branch main/task001 * You decide to move to main * It is correct that Plastic deletes the files you added in main/task001 locally to move you to main, correct? Well, this is what you did. You can delete the changeset from a workspace that is not in task001 => if that's the case, there is no way to "keep" those files. Now, we could add a case to say: if you delete the changeset currently loaded in the workspace, then go and switch to the parent one, but keep the files unchanged. We don't have support for this case. You know we have a feature to "move changesets" to a different branch, that could probably have served you well here. Needless to say I personally dislike "delete changeset" and I think it is a really bad option to have, but you know, users didn't stop till it was added. Are you using Jet? If so, we can probably recover your actual data because it will not be really deleted from the database... but we would need you to send us your data for that. You should contact support. pablo Link to comment Share on other sites More sharing options...
ironbelly Posted April 19, 2017 Author Report Share Posted April 19, 2017 I have also concluded that I need to go into the server and try to pull this changeset out of the blobs.dat file. I did a test where I added 10 MB worth of data to the repo, then backed out of that changeset and deleted it and on the server the repo size didn't go down at all.. So this leaves me to understand that even though we lost it locally and what not the files are still sitting there on the server. Quote Well, yes, then you deleted your changes. Plastic probably warned you like 3 times before doing that :-( It simply asked for confirmation, I didn't comprehend the weight of our actions here, specifically switching to the previous changeset causing the local files to be permenantly deleted. My assumption, which is painfully wrong, is that plastic would keep a local cache of these types of things to prevent things like this or things like having to redownload entire branches every time you switch instead of simply loading branches from the cache when you switch. Quote Suppose this scenario: * You are working on branch main/task001 * You decide to move to main * It is correct that Plastic deletes the files you added in main/task001 locally to move you to main, correct? Well, this is what you did. I have come to understand this now, again wrongly assuming that there would be a local cache or these types of things. Quote Needless to say I personally dislike "delete changeset" and I think it is a really bad option to have, but you know, users didn't stop till it was added. I agree. At most an archive or hide changeset option would have been better.. Quote Are you using Jet? If so, we can probably recover your actual data because it will not be really deleted from the database... but we would need you to send us your data for that. You should contact support. Yes, I am using Jet. I've contacted support but have yet to receive a reply so I don't know if they are around.. I'll prep the entire repo for them and send them a link where to download it. I was assuming, seeing as the repo size didnt go down when we deleted this stuff, that the files are in there, I just have no way of extracting them. Is there a tool I can grab to do this? Link to comment Share on other sites More sharing options...
psantosl Posted April 19, 2017 Report Share Posted April 19, 2017 They'll need to do some digging to actually find the actual data. Let's move this to a support email thread and see what we can do Link to comment Share on other sites More sharing options...
ironbelly Posted April 20, 2017 Author Report Share Posted April 20, 2017 Ok, problem solved.. Recovery tool worked like a charm.. thanks guys! Link to comment Share on other sites More sharing options...
manu Posted April 21, 2017 Report Share Posted April 21, 2017 You are very welcome! As we discussed during the Skype call we'll study how to avoid this to happen again. Link to comment Share on other sites More sharing options...
Misieq Posted April 21, 2017 Report Share Posted April 21, 2017 From my side just a comment/remark. In my opinion PlasticSCM SHALL remove files from workspace when switching to changeset without revisions of such files. In other case it may happen than switching between changesets result with unupdated workspace - and that is not good. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.