Rename file and lock issue for P4V - locking

When I use P4V to add one file(mark for add), then I rename the file, so now the file is locked and can not be submitted or deleted. The tip info is "The system cannot find the file specified.". So what am I gonna to do? Thanks.

Go to your change list, revert your changes to file.bad, add as the new name.

Related

Dbeaver restore unsaved script

I am trying to restore an unsaved dBeaver script. I opened my DBeaver again after my system got shutdown abruptly and I can't find anything. All my SQL script are gone.
What can I do to restore or to find these script files?
In which folder are SQL scripts saved?
You can find all your project scripts in DBeaver in the "Projects" tab in the "Scripts" folder.
Or try to check this path manually: AppData\Roaming\DBeaverData\workspaceName\General(Project Name)\Scripts
(Some variables must be changed in this path)
If you installed DBeaver with snap on Linux, check
~/snap/dbeaver-ce/198/.local/share/DBeaverData/workspace6/General/Scripts
(change the number 198 or workspace6 to what you have)
Mind that the .local is a hidden folder, you need to show hidden files if you just click there.
Then check whether you find some temporary files in there.
You can find it in C:\Users\[your_user_name_enter_here]\AppData\Roaming\DBeaverData\workspace6\General\Scripts if the path yields an error, you can go on from C:\Users\[your_user_name_enter_here]\AppData\Roaming\DBeaverData. Otherwise, you can follow the same way as seen below image.
Since your scripts weren't saved on the disc, they are gone. Unfortunately, there is nothing you can do.
I have deleted a script by accident in DBeaver.
I've pressed Ctrl+Z on the left panel and the script appeared, but corrupted. So rigth click > Compare with > Local history
Then I could see previous versions. Hope this helps anyone. LOL
Steps

Delete VBA module

I was deleting an Access Object (a report) and Access crashed during the delete.
The object no longer exists in Access, but its module still shows up in VBA like a ghost.
If I click on it, I get a FILE NOT FOUND error.
If I try to compact & repair or compile the database, I get a FILE NOT FOUND error.
How can I solve this problem?
A potential option is to create a new database file, and import all of the content from the old database file. that will clear out the funky ghost stuff.
you write you tried compile already and it did not work.
Did you try decompile first though?
First of all make a backup copy (but am sure you already did that :) )
With Access and your access file closed type from the command prompt:
C:\yourOfficeInstallPath\MSACCESS.EXE /decompile
Access will start. Click File > Open and select the database you want to decompile
Open any module and click Debug > Compile
Then save your file and close.
Open again your file and compact it.
Let me know if it solved it.

Why can't I rename package in intellij idea?

Why can't I change package name in intellij idea?
I want to change "java" package to something else, for example "junit" or "jtests":
But when I select Refactor -> Rename I wind up with the dialog window:
then I select Rename current, in the next window I enter desired package name:
and then, no matters whether I click Refactor or Preview button, nothing happens. Nothing at all: no errors, no warnings, no actions. Why can't I rename this package?
It seems to be a bug of IntelliJ IDEA. I found the solution on JetBrains forum. By invalidating the cache and restarting, I got the ability to rename this package.
For me invalidation didn't work. I made a new package and temporarily moved the classes out of the package I wanted to rename. It would disapear when I would rename them, so I would create them again.
Just a bug in intellij. Invalidate the caches and restart. Here's how, it's easy.
Only folders under java are part of the package qualified name.
Example:
If you have a file in a folder located under app/src/main/java/com/my/package then the package will be com.my.package
So, you only want to change folders under java.
However, regarding the "com" folder, the IDE does not provide an option to refactor package name. In this case, you need to manually rename all code occurrences of the old folder and invalidate the cache after renaming the folder.
File > Invalidate caches... > Clear system
For me it was due to memory problem, after increasing memory (heap size) it solved.

Accurev: Cannot remove workspace/stream

I'm trying to remove a workspace (or clone it to look like the parent, but I can't seem to do either). When I try, however, I get this message: Cannot remove workspace test_workspace, because it has a non-empty default group.
From what I've read, it means that there are active files (as shown by the 3 little green dots to the right of stream). I've tried everything to get those to go away but they just seem to stick around and therefore result in me being unable to remove the stream.
Alternatively, I could completely wipe out the stream and replace with the parent version, but I can't seem to do that either.
Any help would be greatly appreciated.
You need to purge the active files in this workspace.
Open the workspace and click on the "Default Group" filter -> select the files -> right click -> revert to backed.
If no files appear in the "Default Group" filter, click on the stranded filter and do the same as above to revert those files.
If you are using AccuRev 6.x, click on the outgoing mode and click on "Member" and "Stranded" to get a list of the active files.
Once you have done that, you can remove the workspace.
Similar problem here, fixed it following #jstanley's comment.
Open Workspace-> select it-> right click-> Edit.
In that prompt, I set the Location path to where I wanted it to put it on my local machine. For some reason, it was unable to "create a folder" and threw errors, so make sure Append Workspace name is unchecked and you select a folder that already exists.
It then populated the folder on my local machine attached to the workspace. And revert to basis worked, so afterwards I could remove the workspace and delete the folder.

In Intellij IDEA how do I reload file content's from disk?

In vim I can type :e and reload a file's contents from disk overwriting any changes I've made. It's a nice way to reset in case I've gotten lost or just want to undo all my changes. This obviously doesn't take into account any kind of refactoring, I just want to nuke all changes to buffer. Not even closing and reopening a tab will work.
How do I do this with Intellij IDEA? I'm using Intellij IDEA Ultimate 13 and I've disabled any kind of auto save.
File > Synchronize (Ctrl+Alt+Y)
It will load the file from the file system. If you have unsaved changes, it will ask if you want to discard them.
⌥⌘Y - Synchronize for Mac users
What I do in a similar situation:
Simple - Ctrl+Z, Ctrl+Shift+Z many times to quickly navigate the editing history
VCS rollback - either for the whole file or for the area being edited (by clicking green areas on the left)
Local History. Well, yes, for you case it's granularity is not sufficient, so first might be an option
There is also an option to put a label into Local History if you need to rollback to a specific point in time.
For those who use autosave - it is being triggered when code editor loses focus. So doing Alt-Tab during long editing without compiling or running the code makes sense.
Open the file in another editor, make an insignificant change and save it. PHPStorm will ask you what to do because the file system and in memory copies of the file have diverged. Click "Load File System Changes".
Note, I was unable to use my undo history as it had become corrupt.
Since what I want isn't really possible I wrote an extension to do it for me:
https://github.com/btipling/DiskRead/
I'll add it to the Jetbrains plugin repository, it's called "DiskRead".
I wrote a blog post about how I created this if anyone is curious.