Accurev: promote without specifying issue? - accurev

Is it possible to promote a file without specifying an issue number?
Related to that question, I see some files which have histories for which the column "Issues" is blank. How does that happen?

Promoting against and issue is an option, rather than a requirement. An AccuRev depot does not have an AccuWork schema until an administrator creates one. Even then, this does not automatically require promoting to an issue. Within the Accuwork schema, this feature can be enabled using the Change Packages tab.

To your second point "... some files which have histories for which the column "Issues" is blank. How does that happen?"
If you've changed over from non-Issue based development to Issue based development and have not associated the files, those with active or (member) status, with Issues, that column will be blank.
More likely some one promoted foo.c to Issue 15. Then opened up Issue 15 and removed foo.c from the Issue. In this case the column will be blank too.
The solution is to find these files, look for the "Unaffiliated Changes", select them, and choose "Send To Issue" then provide the correct Issue number.

Related

Managing checkouts of same binary file in different branches in Perforce

How to prevent checking out / changing one binary file in different branches of the same content. Situations like: designers have edited some game level (*.umap binary file) in their branch. Programmes changed same file in their branch (for example - added some blueprint on this game level). So now we have three different versions of this file, one in master branch before all changes, one in designers branch without programmes changes, one in programmes branch without designers changes. And now we must merge designers changes and programmes changes into master branch, but we cant.
So the question is - how to organise right this situations? Maybe we can setup perforce to checkout binary file in multiply branches at the same time, or something like this? Thanks...
There are a couple of different ways to think about this.
If you don't want work to continue/begin in one branch, until changes from another branch have been merged in to it, you can use Helix (Perforce) Protections, to give users read-only access to the branch.
This means they will be able to open files for edit, but won't be able to submit their changes.
More info about protections is here:
https://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.security.html
The protections would need to be changed, when you are ready for work on the other branches to start.
If you want a file to be automatically checked out on all branches, each time someone checks it out on any branch where it exists, you would currently have to script this.
You could do it using the broker and a workspace for every branch, that has a view that just includes the files you want to be checked out everywhere.
The files would then need to be checked out in these workspaces and locked, so that other users can't submit to these branches until the locks are removed.
This is not trivial and may have a performance impact.
You might also be able to do it using pre-command triggers, if your server version is new enough.
If you want to go in to more detail about any of the above, I recommend you contact Perforce Technical Support.
Hope this helps,
Jen.

Get back lost shelf changes

I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch.
When I came to old branch to check my shelved changes.
I gone a mad now, I lost all the files. I was worked nearly two months
Can somebody help to get it back?
You can restore the state of those files if they were edited in IntelliJ. Use local history to see all the changes made in IntelliJ (VCS -> Local History -> Show History).
Even there isn't Shelf tab in IDE you can find shelved changes as patch files at {ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf.
Then your can apply any selected patch.
I was able to view lost changes and revert back to them by:
right click on project directory, select Local History > Show History
Find the entry in the history menu that you want to restore. You can examine the files by double clicking on the entry and the files to examine differences.
Right click on the entry you want to restore, and select Revert
Note in my case Git>VCS Operations>Show History showed nothing. Only through the Project Files menu.
Andrei's answer was helpful for my situation where I renamed my project and my previously shelved changes were no longer found under the shelf, but I did run into an issue when applying the patch file because I was prompted to "Select missing base" for various files in the patch. Similar to what is seen in the screenshot below:
https://youtrack.jetbrains.com/issue/IDEA-183910
I was able to avoid having to "Select missing base" for various files by first changing the default shelf location and then applying the patch.
https://www.jetbrains.com/help/idea/shelving-and-unshelving-changes.html#change-shelve-location
Also, I found my patch in this location:
{ProjectName}/.idea/shelf
instead of the aforementioned location:
{ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf
Maybe this will help someone:
I lost part of my shelved changes in combination with an update of IntelliJ. I'm not sure if the update was the reason but eventually most of my most recent (and important) changes were gone.
I couldn't restore them from local history as this does not "survive" an update of IDEA. But in the files I saw that there still is some data:
C:\Users\myUser\AppData\Local\JetBrains\IntelliJIdea2021.2\LocalHistory had a changes.storageData with ~50MB.
Copying the files to the folder of the new version didn't help as the files got overwritten again.
Solution:
I was able to get the old version of IntelliJ (2021.2) here and installed it. This can be done in parallel, without removing the newer version.
Here I was able to retrieve my changes from the Local History and shelve or apply them again.
Hint: Backup the "Local History" folder (or the whole IntelliJIdea20xx.x folder) before you start. I don't remember if I had to copy it in there again or if it worked out of the box. (Just to be sure the local history doesn't get lost).
I've also experienced this bug repeatedly and hence no longer use shelved changes, but rather the Git CLI directly. As of 2022 Jetbrains IDE's still cannot be trusted with their "Smart Checkout" feature, which has a small probability of the total loss of your files (experienced personally in both IntelliJ & Rider).
Unlike another comment here regarding using the Local History, this did not work for me as the history showed nothing. I've also lost many hours of work due to this bug which remains unfixed.
The solution is to use "git stash -u" on the command line, then checkout the desired commit. Once youre done, type "git stash apply" to restore your files. Trusting the "smart checkout" feature is like playing Russian roullette. It's IDE magic that may just fail and you lose everything.

SSDT Schema Compare keeps finding differences for users?

The title says it all but for further details. When i use the schema compare tool in VS2015 for my SSDT Project and my database on a server. The compare results always come back with the Users as being different. I check the differences it speaks about but there is not a single difference between the environments.
I even went as far as updating my project from the compare results to try and correct these "differences". I then ran another compare and the same users came back with differences again... WHAT! haha.
Anyone have a clue what would cause this sync issue or am i doing something wrong? The users were added manually to the database on the server rather then thru SSDT deployment so maybe that is a reason?
EDIT:
Please hit the arrow on the left of the user differences found. You will see a properties folder and the missing login which is the real difference. If you go Schema Compare Options -> Object Types (tab) -> Non-Application-scoped -> Logins to add Login object type to your comparison then your issue will be resolved.
Logins objects
Although I consider this a bit of a workaround (I haven't found a real solution to get rid of the Users from the comparison even when they're indentical), it's the best I've found. Simply exclude Users from the comparison.
You can access this menu by clicking the gear icon on the Schema compare window and expanding the Application-scoped object and unchecking Users (or indeed anything you else you want to exclude).
When I drill into the schema compare under Change > User > Properties > Spanner icon, I can see this difference:
Source (SQL Azure) Target (Project)
============= ===================
UserType=2 UserType=0
What does this mean? I googled to no avail.
Updating doesn't fix it. Deleting the user script from the project and Updating doesn't either.
I can't find UserType in the source code so this must be generated internally by the compare.
In Visual Studio 2017 at least (and it looks like option is in 2015 as well), try going to Schema Compare options and under the "General" tab, untick the option "Ignore login SIDs".
I had this same problem with a user (where there wasn't a login defined for the user), and unticking this option resolved the problem for me. I still picked up actual correct user changes, but for existing users that are unchanged, the comparison no longer shows a bogus item.

Accurev - query for issues with changes

Is there a way using the Accurev client or command line to query all the issues (in a specific state) that have file changes associated with them?
If you use the Accurev client, and open an issue, the Changes tab lists the changed files. However, when creating an issues query expression, I don't see any fields that indicate the changed files (or even if there are changed files).
You will need to use the "cpkdescribe" query to pull that information. A "queryIssue" query retrieves all the other fields, but not the change package data.
See the AccuRev_User_CLI.pdf manual that is included with your installation of AccuRev.

Finding which files were "FIXED"and how many times between two specific date by using Trac?

I need to find out that how many times and which files are fixed or changed due to a bug between two specific dates in an open source project which uses Trac. I selected Webkit project for that purpose. (https://trac.webkit.org/) However, it can be any open source project.
What can I do for that? How do I start? Do i have to use version control systems like svn or git for intergration? I am kinda newbie for these bug-tracking and issue-tracking systems.
I'm not certain I exactly understand your question, but...
If you browse to the directory containing the files you care about in the Trac site, then click on Revision Log, you will get a list of changesets that affected that directory. You can select the revisions that span the timeframe of interest and then View changes and you will get a summary of the changes, and depending on the size of the changes and the particular Trac configuration, you may get the diffs on that page as well.
Now, that won't tell you how many times those files were changed, just the net changes.
It also won't tell you which bugs those changes were for.
If you really need to filter on what bug, you'll have to determine how that information is tracked by the particular project; and some might not track it directly. The project might include a #123 in the commit message. If you can rely on that, you could use svn log --xml {2009-11-01}:{2009-12-01} ... to get an xml version of the commit log which you could then parse and filter based on the presence of the bug's ticket number in the commit message. From that, you should have a list of the revisions that you care about.