SunOS sccs - How do I edit files checked out by people who no longer work here - version-control

I have a problem. the documentation assumes that people who checked out the files a long time ago can be contacted, log in and check out their changes.
https://docs.oracle.com/cd/E19455-01/806-1075/msgs-1307/index.html
I am logged in to a SunOS box where I need to discard edits made by people who no longer work here. How do I do it?

Quick answer.
sccs uses files.
In the SCCS directory (subfolder) the are files with almost the same name as the file being checked out.
Iirc:
Most of these are "s.", but there are a few others with relation to what state the files are in.
The s. files are big, the other files are small.
You should see a file in the SCCS folder that starts "p.", I think, and it should contain the username or the person checking the file out. Delete the file and the record of the checked out file will be removed.
You'll also want to delete the filename from the parent directory, so that it can be checked out of the library easily.
There are other ways around it using sccs, but this is the easiest way to fix your issue.

Related

Where are the information about each workspace stored?

I know that some settings such as imported folders are store on the workspace file such as my-worskapce.code-workspace and some others such as python interpreter are stored in the root folder(s?) such as .vscode/settings.json but these do not include information about opened editors or which extensions are disabled for each workspace etc. Where can I find those information?
I need that information because I started storing all my *.code-workspace files in ~/ and now it's getting cluttered and I want to move them to a different folder, when I do, and reopen my workspace, I see that all open editors are gone! This hurts my productivity as I will have to reopen them and recall which files were being worked on. And another issue is that previously added folders are gone too! I have to re-add them which is merely a redo of work that already has been done, since imported folders are imported as relative paths. If I move the *.code-workspace file to it's original location with the same name however, everything is back to normal, so this tells me VSCode is storing information about each workspace somewhere and it's bound to each *.code-workspace absolute path. I have checked ~/.config/Code/User but couldn't find anything. I've googled a lot using different keywords but seems it's nowhere documented or asked about. I usually make backups of my workspace files and I'd like to make back up of these information as well.
In windows you can find them in
C:\Users\<username>\AppData\Roaming\Code\User\workspaceStorage
VS Code 1.75 introduced a new Profiles feature, summarised here.
Profiles store information such as user settings, installed extensions and the current layout of panels etc.
You can export/import profiles to/from a Github gist or a local file. Different profiles are associated with each workspace.
Profiles won't resolve all your immediate issues, but may give you more flexibility in the future.

Export to Java application deletes files

When I wanted to export the model I was working on as a Java application, I encountered an error regarding the databases I loaded into the model. When I said OK to the error, I realized that all the files in the folder I wanted to create the Java application were deleted. That folder was desktop by the way.
Right now all the files (i mean all of them!) on my desktop are deleted and they don't even show up in the recycle bin. How are we going to solve this situation? How can AnyLogic have the authority to delete all files in that folder? How is this authority not shared with me and not warned beforehand?
When you work with software in general, you need to have a version control in place that will allow you to recover your information. These problems occur, and if AnyLogic has access to your computer it's because you grant the permission and it needs the permission. If you make your desktop your project folder, then i would say you are to blame.. why would you do that...
Using GIT as Ben commented, is always a good idea... but it requires you to be conscious about when you commit a version.
What I do, is I use dropbox and all my projects are done in a dropbox folder... the good thing is that dropbox always saves automatically all the files on the folder... this has saved my life multiple times and I suggest you to do something like that in the future. So on one hand you have the autosaving features, which is useful, but sometimes you erase everything by mistake, and the autosave is not useful, but dropbox saves no matter what.

is watchman notifies for deleted files?

I tried to find in the documentation and I did not find indication.
I read the win32 watch code (because I am familiar with the API and it seems it does not).
Tracking for file deletion is extremely convoluted on windows, because the API provides the file names "randomly" mangled and if the file is not there anymore to resolve the real name "long path" it is hard to say what was the original.
I have implemented such thing for my previous company, with preserving the current state of files and reconciling the list of files for every directory that changes were happening inside. It worked well.
My question is: did I miss it and watchman notifies for deleted files? And if it does not - is there plans for these notifications to be added in the near future.
The short answer: yes.
The longer answer: the more convoluted portions are not entirely windows specific.
The bit that handles the mangled names can be found here:
https://github.com/facebook/watchman/blob/master/root.c#L748
The bit that handles deletes is in two parts; the first handles things when we're checking exactly the file that we were notified about:
https://github.com/facebook/watchman/blob/master/root.c#L853
The second is a kind of "garbage collection" approach where we're looking at the containing directory and discover that the file has gone away:
https://github.com/facebook/watchman/blob/master/root.c#L1353

Can I search Netbeans' local history?

In one of the previous versions of one of my file in a Netbeans project I wrote code that I later removed, and now I want to retrieve it. However now I can't find it when I manually go to previous versions, as I have many versions in the local history of this file, and I don;t remember when exactly I wrote this code.
Is there a way to run a search on the local history of this file?
I saw in this answer that the local history is kept in this path
<HOME>/.netbeans/<NB_VERSION>/var/filehistory where HOME is my user home and NB_VERSION is the version of NetBeans (e.g. 7.0).
I tried running AgentRansack on that directory, but to no avail.
I recently had to solve this problem and figured it out. Netbeans stores local history files in your user directory as mentioned above. Inside that folder are numbered directories. It's pretty easy to guess which one you need based on the modification date of the folder (if you know when you last looked at it, so that doesn't help you much). In side the numbered folders is another folder with a hashed name, and inside of that folder is a set of files: a data file, and numbered files. The data file can be read with a binary file reader, and if viewed in ascii mode will show the filename that this history belongs to. The numbered files are actually zip files and they have full versions of the file in them. Just unzip those and open with a text editor if they are plain text files.
Hope this helps you out, but I realize its probably too late now. I had to figure this out because I had opened a remote file with netbeans (a file that was not associated with a project), and couldn't get back into the Local History because the file didn't have a project. However I could see it in the Local history by reading the data file, and I just guessed that the other files were zipped by the fact that they started with "PK" in the binary viewer. Once I put it all together I was home free.

Automated versioning of files in file share?

We have a file share on a debian server which people will be putting mostly small plain text, word, excel, pdf, misc, files into. We want to keep file level versioning of everything placed in that file share. We'd like all of the versioning to happen automatically in the background every time a change is made to a file.
What's the easiest open source way to do this? What's the best versioning system to do this with? Is there an automated versioning system like this out there somewhere?
I'm not asking for complete instructions. I'm just looking for recommendations or keywords to search with (other than "automatic versioning files" which didn't find me much).
We're already backing up the volume many times a day. We don't want to do volume snapshots etc. We're looking for some kind of automated file level versioning.
Update:
Using incron to autocommit changes in a folder:
http://andrew.mcmillan.net.nz/blog/using_incron_to_autoversion_a_directory
Thanks to using the new keyword "autoversioning" I found the above which I'm interested in. It's a script which is triggered from incron every time a file changes. One problem is incron isn't recursive.
I would try a versioned filesystem, such as ext3cow or nilfs.
I have no experience with them, but they have always looked like a very interesting idea to me.
The SVNAutoVersioning directive to mod_dav_svn is one solution.