Error while attempting to undo multiple revisions in Perforce P4V - perforce

I get this error while attempting to undo multiple revisions.
c:\path\to\directory\...#4592,#head - no revision(s) above that revision
I'm trying to get back to a specific revision, the one prior to #4592, undoing the 7 revisions that have happened since then.
My steps: I'm right-clicking the directory in question in P4V, selecting Undo Changes, then Undo all changes from a selected point to the most recent version, and putting in 4592 in the Undo all changes beginning from field. I hit submit, and I get the error.
Any idea what's up?
Perforce undo error: "no revision(s) above that revision"

What ultimately worked was in the Undo all changes beginning from field, selecting changelist rather than revision.

Related

IntelliJ: Lost files after "Update project" and can't find them on Local history

I have a nodjs project and i use IntelliJ to run it. Lately the project structure is not appearing as it used to, as if the project was not compiling. So, while searching for answeres, I clicked on the "Update project" button on the right top, but quickly realised it was going to update based on what was on the remote repo.
I've been developing for a few weeks without a single commit because my company asked me to (don't ask why), and the code had sensible data so I didn't have a backup.
After clicking that button, IntelliJ asked me if I wanted to merge my project files with the remote ones, I just pressed Cancel, and that was enough for IntelliJ to merge my entire project and lose a bunch of files I've been working with.
Suprisingly, they're not even on the Local History list. Even though it says "279 files" there I can't click or find any of the files.
Despite not being able to find them, I went to the changes.storageData file under IntelliJIdea2017.2\system\LocalHistory, searched for the names of the files I'm looking for, and found them all there, which makes me think there's still a way of finding them.
So, does anyone know where I can find deleted files after pressing the git "Update project" button on IntelliJ when they're not on the Local History file list?
Thanks a lot in advance!
As I understand, the files were not committed, so Update could not delete them, because git merge/rebase do not start when there are uncommitted changes (see e.g. this question)
They were probably automatically stashed before the update, and not unstashed because the update was actually canceled.
So the first place to check is git stash VCS - Git - Unstash... or Shelf (if Update project is configured to use Shelf)

Undo checkin in TFS using visual studio 2012: rollback will not give me my pending changes back

I accidentally pressed the Checkin button when I had a list of all my pending changes (in several solutions) open (and I had disabled the confirmation prompt a few years ago, have restored it now though).
I know I can do a rollback of the specific changeset, but this will not give me back my checked out items as it will just overwrite the changes of the changeset with new changes.
Does anybody know of a way to undo the checkin and get my checked out items and changes back?
Perhaps there is an extension to do a rollback, keep al the changes locally and check out those files again.
Or there is another automated way to keep al the changes and check out the files (manually checking out each file is to much work).
Edit
There doesn't seem to be a perfect way. For me the best solution was to 'Rollback the rollback'as stated in https://stackoverflow.com/a/24896432/1343595

How to link a work load item with a commited change?

I am working with Git for Visual Studio Online
I added a Product Back Log item.
I added some files & commited the change. (It did not linked for some reason)
I made some more commits to the project & synced.
My 1st change was not linked with the Back log item & it still shows
as pending under tasks.
How do I link the work item with my first commit?
Normally to link a commit to a work item you just reference the work item number in the commit message, for example git commit -am "related to PBI #1234". If it didn't work, you may have made a typo in the commit message.
Now, given you have already pushed your changes, amending your earlier comment to change the message would require an interactive rebase and pushing the result of that would be a bad thing (I'm assuming the repo is shared).
What you can do instead is go to the work item and under the Links tab, click the Link To... icon to add a new link. Select 'Commit' and then enter the SHA1 of the commit you want to link to.
Don't worry if you don't know the SHA1. Just use the ... button to browse your history and select the commit you're interested in.

Undo Pending Changes Visual Studio 2012 and TFS

I recently switch from Visual Studio 2010 to Visual Studio 2012 and it seems that "Undo Pending Changes" may be broken in the Visual Studio Version 11.0.50727.1 RTMREL. I'm using TFS 2010. When I try to undo changes I get the error "There are no changes to undo in the selection or any children of the selection" and I can't revert back to my original code.
Has anyone else observed this problem or know of a work-around?
The exact steps are:
Add a new file to your project. TextFile1.txt for example, but it can be any type of file.
Check in the file to TFS
Check out the file and add one additional line of code.
Save and verify that TFS is aware of the differences by doing a compare.
Select the file in solution explorer and right-click and select Source Control / Undo Pending Changes...
You will see the message "Warning. There are no changes to undo in the selection or any children of the selection." OK/HELP. Pressing OK does not revert the file to it's previous state. (HELP doesn't help).
I had this problem. I fixed it by making a backup of my file. Then by doing a Get Latest, Undo Check out and then checked-out and put my changes back.

TortoiseSVN: how do I undo the last Update command?

The last TortoiseSVN Update command loaded work-in-progress code from the trunk which shouldn't have been committed yet, and overwrote the files that I had on my branch.
How do I undo that last Update command and revert back to the versions that I had on my machine before the Update?
There is no "undo" or "revert", but if you update to the previous revision, that is the recommended way to accomplish what you are asking for. In TortoiseSVN, select "Update to revision..." and enter the revision number you want to go back to.
revert back to the versions that I had on my machine
If you had local changes on your machine that were never committed (i.e., no revision number), and you updated over them, then you are out of luck. The only way to get back your local changes is if you have a backup (check the "Previous Versions" tab in Windows Explorer...)
Check out this guide for undoing revisions on TortoiseSVN. The entire concept of version control supports the issue you've created for yourself so it is a popular action.
This is called update to revision... In the ui you can choose which version you want to go back to. Make backup copy of your local svn tree first to be safe!
You can update to a specific revision by right clicking on your working copy, Under the TortoiseSVN menu item, there is a update to revision menu option that will allow you to change your working copy to the revision of your choice. If you do a show log on the repository you can get an idea of when the offending code got committed and revert back to the prior repository revision. As a precaution, I would make a copy of and working copy, or important files in your working copy, to ensure that if things go bad, you can always get back to where you are now.
Now this changes your working copy, not the repo, so if you are wanting to revert the repository back, then that is a different issue, but I do not think that is what you are asking for.

Resources