Accurev delete a file that has been kept/promoted or scrub contents from all versions - accurev

We have the need to remove a file from Accurev existence. We have defuncted the file, but versions of the file can still be viewed which enables a user to re-create the code found in the file.
Is there a way to delete a file from the Accurev database, or at least remove the contents from being visible from all versions of a specific file?
Thanks in advance!

Look at the command 'accurev archive'.
This will remove the data containers which will prevent someone from viewing the file.

Related

How do you view Ignored files in AccuRev?

Is there some way to view files in the AccuRev Client (v5.7) that have been ignored?
For some reason or other, some code files that do not follow the pattern in the .acignore file or the ACCUREV_IGNORE_ELEMS env variable get ignored. These are java files in directories with other java files, so there is no way that it could match the ignore restrictions. But that is another problem.
So if I want to see which files in a local accurev workspace are ignored across all directories, is that possible?
(Note: The Tools-Preferences-General tab menu item of "Show External Objects" - "Include Ignored Objects" shows ignored items - if you know what directory they're in)
Any help is appreciated. This has happened several times, and I'm losing code.
(pining for my old svn days)
edited
I can see the ignored files, if I know that they are there. So I can drill down to the specific directory and see them listed in the workspace explorer results. But if you have many, many directories ... you shouldn't have to manually look into each directory to see if there are ignored files.
To answer your question, you need to set this preference (but you already know that):
The Tools-Preferences-General tab menu item of "Show External Objects" - "Include Ignored Objects" shows ignored items - if you know what directory they're in
Can you post the contents of your .acignore file and ACCUREV_IGNORE_ELEMS env variable?
Also, include the output from the command 'accurev stat '?
Maybe we can solve your problem.
As Jason mentioned, the status of the individual files may help to explain what's going on. If you see "missing", then the files are not present on disk. Also check your include/exclude rules. Files that have been excluded won't be present on disk or seen in the AccuRev workspace explorer.

File History for Renamed Files in TortoiseHg

I know how to use Mercurial to rename a file. And I understand that the hg log command does not display file history prior to renaming the file unless you use the -f option, and also that you can force the file history to be displayed as described in the accepted answer here Why 'hg mv' (mercurial) doesn't move a file's history by default?
However, when I rename a file, and then check the File History using TortoiseHg, I am unable to view the full history of the file including any changes prior to renaming the file, even though I updated my ~/.hgrc file to include those changes as explanined in the aforementioned link. How can I do that? How can I force File History to include changes that happened to the file prior to renaming the file, and display that history list on TortoisHg?
UPDATE
TertoiseHg version 3.1 shows the full history. I had version 2.8 that did now show the history.
Thanks to Lazy Badger for his answer.
Linked answer is outdated (partially, at least in part of existing section [default] - now it's [alias])
I see full history of renamed file in TortoiseHG without any additional tricks (TortoiseHg version 3.0.2)

___jb_bak___ and ___jb_old___ files in PyCharm

When I got some PyCharm project from my colleague I saw some backup files of *.py files.
This files have types: *.___jb_old___ and *.___jb_bak___.
I open the files in Notepad++ and see that these are identical backup files of the corresponding *.py files.
I asked my colleague, but he didn't know what these are.
Why are there TWO identical backup files for each *.py file?
How can I tune PyCharm? We want to turn off this backup.
Google gave me nothing :(
You can disable "safe write"
Use "safe write" (save changes to a temporary file first) If this
check box is selected, a changed file will be first saved to a
temporary file; if the save operation is completed successfully, the
original file is deleted, and the temporary file is renamed.
https://www.jetbrains.com/webstorm/help/system-settings.html
i had this problem in webstorm when a script file was running and i was editing it in webstorm. when i stopped the script and edited it everything was fine
it's a temporary file used by PyCharm to make sure you change will not be lost when editing files. it's safe to delete them manually, you will only loss very recent changes. IntelliJ IDEA works the same as PyCharm.
How to delete them?
To delete a file on a file system requires two things: 1)you have the permission. 2)no program is using it.
so make sure you have 'w' the permission, and stop all program which is using it. then you can remove it.
How to know which program is using it?
Normally you should already know it. but sometimes some background programs(like crash plan, google drive sync, e.g.) may also hold it quietly, then find and kill all programs may be very tricky. the easiest way is reboot your computer with 'safe mode', in which only the OS kernel is loaded.
I spend two hours to figure out the reason why I cannot delete the temp file even when I have whole permission. a crash plan service is holding it in background. This may not be your issue, but if you cannot delete the temp file, this will save your time.
While JeremyWeir's solution probably does work, the real fix - imo - is to enable write permission on the directory.
Saving a file would only need write permission to that file itself. But with the "safe write", you need permission to create the file and rename it - which means you need write access to the directory.
In Linux this would be e.g. chmod ug+w DIR, if you want to give write access to user and group.
I have exact same issue with PhpStorm after system crash. The fix I found was to manualy delete *._jb_old_ and *._jb_bak_ files and reinstall PhpStorm

SVN: how to lock a file so that no one can modifiy it?

We are using TortoiseSVN for a project. One file in this project has a special status. It can be modified locally but the SVN version must not be modified.
So, I have locked the file so that noone, unless me, can modify this file. Now I am searching a way so that even me cannot modify this file. Do you know if it is possible and how?
Thanks for your answer.
Add a serverside pre-commit hook that rejects commits touching that file.
See http://wordaligned.org/articles/a-subversion-pre-commit-hook
There is an example function listing all affected files. To make the script reject the commit, write "You cannot modify THENAMEOFTHEFILE" to STDERR and exit with an error code. For example sys.stderr.write("ProjectThingyFile.txt is read-only.\n"); sys.exit(1)
Does it need to be part of the SVN repository as you can ignore it so it will not be committed and can remain unique per users machine.
Find the file right click on it
goto the tortoiseSVN Menu
Unversion and add to ignore list or add to ignore list
This process will stop any changes to that file being committed from any user
Tortoise SVN Documentation on this
Hope this helps
Jason
You could create a dummy user that no one logs in as and have that user lock the file instead of yourself.

Geany IDE backup copy path

I just lost an entire script in Geany editor...
Is there a place where Geany saves a backup or cached copy somewhere?
Thank you for your help...
Geany does not automatically create backup files unless you enable the "Save Actions" plugin, and select "Auto Save".
It depends on what do you want. Geany can save a backup copy of the unedited file and also various options of saving the edit buffer. Read this nice wiki All you never wanted to know about file saving.
To backup scripts, use GitHub.
There are other VCS's (Version Control System), but Git has a strong feature set and is fairly easy to use. The real strength of Git, to my mind, is GitHub, which, so far as I know, is the only free-as-in-beer site which will let you create a large number of projects. It also seems to be well run, and I find many API's I like on that site.
Use VCS to:
1.) backup your code so that you don't lose it
1a.) backup offsite, such as to github in the event of your computer bursting into flames
2.) keep track of different versions, comments, etc
3.) collaborate! Give your code to the community. Or, fork someone elses code.
The caveat to all this is to omit passwords or other sensitive files. Don't upload a file with your credentials for logging into e-mail, for example. RTFM to see how to omit specific files with Git.
Finally, if you don't like Git there are alternatives, SVN has, in some scenarios, better syntax.
If you have just overwritten the file (Ctrl+S) and haven't yet quit Geany, you can just Ctrl+Z to the desired document state and save that file version.
If you have already quit Geany after that and haven't set up back up in Geany before, I am afraid that by means of Geany you cannot restore the file to the previous state.
Read this article about how to set up back up in Geany. Basically you can go to Edit -> Preferences -> Various (read the manual and the link above before changing these preferences) and:
disable use_atomic_file_saving (disabled by default)
enable use_gio_unsafe_file_saving (enabled by default)
enable gio_unsafe_save_backup (disabled by default)
This will always keep the previous version of the file (as a hidden file with ~ attached to its name) next to original.
Or you can install/enable the Save Actions Geany plugin and enable the Auto Save and Backup Copy options to automatically save files at a certain time interval and to keep a copy of previous file versions.