Return change set from Outgoing to Unresolved - eclipse

I checked-in some changes by mistake. Now the changes are in the outgoing changes, but I don't want them to deliver. How can I return them back to the unresolved? If I discard them they vanished from my source code and I lost my work.

You can still discard the change set: see this thread.
By discarding the change set, the changes in it will be reversed. This happens to be the addition of the files once the initial share was performed.
(hence the removal of those files)
To avoid this, you can disconnect the project then discard the change set.
(when you disconnect the project, select the option which don't delete the local files)
This kind of behaviour is intended as you would want to discard a change and have your local shared content to reflect the same state as your repository workspace.

You should be able to simply drag & drop files from Outgoing Change Set to Unresolved in the Pending Changes view. Then you can reuse the Change Set for some other changes.
This will work only until you mark the Change Set as Complete.

Related

How to change VS Code's merge conflict layout?

I use VS CODE for version control (using git).
Every time I had a conflict, VS CODE showed me with a layout where I could see all the changes in one window:
However, with no advice, it change to a weird 3 windowed design where I can't understand anything.
Does someone know how can I go back to the first design?
Go to VS Code settings
Untick the Git: Merge Editor setting
Now you should be able to see the previous merge layout.
This feature (3 way merge editor) can be enabled by setting git.mergeEditor to true and will be enabled by default in future releases.
You can set it back to false to go back to the previous design as you want.
This new 3-way merge editor seems to have a terrible UX issue. For me simply switching to merge editor to 'false' doesn't work as below:
git.mergeEditor = false
After this editor completely stopped showing me any merge conflict line.
I have to finally do like this to revert back to original merge conflict view.
"diffEditor.codeLens": true,
"git.mergeEditor": false
Hit ctrl+shift+p to open command pallet and open the settings json by typing Preferences: Open User Settings (JSON) (or start typing 'settings' and this will come up)
In the main JSON object add "git.mergeEditor": false (insert comma beforehand if needed)
Hit ctrl+shift+p and type Developer: Reload Window to reload the windo.
The old type of merge editor should be back.. but you may need to wait a minute to get the full UI back (on my machine, the accept incoming buttons etc. didn't come back for a little).
Update 2023 in case the conflict UI has crashed/not displayed
When you rebase a file with embedded conflicts within conflicts VScode's in- file-conflict-display(blue/green UI) might glitch due to too-many git markers present, rendering merge impossible without CLI.
Apply workaround by enabling and switching to 3 way conflicts window.
enable merge editor (by searching the settings or modifying vscode config file locally)
use vscode's merge display by going to Source Control tab then clic the file with ! exclamation mark before the name of the file
solve the maximum number of conflict using the new 3 windows conflict UI (remember current and incoming are inverted in case of rebasing)
go back to normal file UI and the classic in-file-conflict-UI (green/blue) should be back online
finally git add . && git rebase --continue && :wq (vim) in case of rebase to pass to the next commit to handle.
Rule of Thumb: Remember to always create a temporary local branch of your feature before merging/rebasing your feature branch before PR. This will be used as backup to keep the design intent in mind. Then always run code(and lint) to check for obvious typos/merge artifacts (ie these git flags or unclosed loops/functions).

Reset everything to remote and skip all changes

Is there any way in the user interface to reset to a specific commit and skip all local changes? I want to reset to the marked on the picture.
Looks like you want to get rid of uncommited changes. There are two ways to do so:
Right click master, Reset master to this commit, Hard - discard all changes. This will reset you current branch (master) to the selected one (also master in this case) and discard any changes.
Click the trash can on the top right to get rid of all unstaged changes. It appears only if you select the uncommitag changes in the top of the commit graph.
EDIT: Looks like you are in the middle of a merge. In this case, you can also (or maybe even have to) use the Cancel Merge button in the lower right, where the commit button is usually located.

Compare changes with latest from repo

Eclipse shows me with the symbol > which files I have modified, after the last repository update. Before commiting, I want to see the changes I made.
When I go right click->Team->Synchronize with repository I get exactly what I want. The problem is, I only get the view for this one file I clicked. I need to change the view back to Java, to be able to chose the next modified file.
Is it possible, to compare all modified files, one by one, with the latest edition from the repository, without changing the view after each file?
Instead of right clicking a specific file, you can right click the entire project and perform the same operation you describe.

ECLIPSE Subclipse: Occasional error with file selection in synchronize view

I am using Eclipse JUNO with the subclipse plugin.
Generally it works quite well. To commit files to the SVN repository you synchronize to check the changes you have made. Select the files you want to commit, add a comment and simply commit it.
Usually the selected files are then properly committed.
However, sometimes the selected files view in the commit window do not correspond to the actually selected files in the synchronize view. Instead it simply indicates all files in the project's file directory.
If you don't notice and commit you end up committing dozens of files/directories you do not want or need to commit.
I have tried all sorts of things to try and make it do that so that I know which chain of actions triggers it so I can avoid it but of course it never does it when you try.
Does anyone have any suggestions as to what might be causing it or experienced the same? It is definitely not that the selected files are no longer selected. I could clearly see that selection still being active on the left hand side synchronization view but still the commit window was showing a full file selection.
Any help/suggestion much appreciated.
I finally figured it out. Whatever file selection you do is overridden by a folder selection at a higher level => if you accidentally mark the project's main folder all files are transferred.
In the end it is Very simple and logical. The only nuisance is that the specific files you selected at a lower level are highlighted in the commit window's file selection view as well so if you look at the view superficially you get the impression only your selected files will be committed.

Deleted a change set in eclipse, crisis ensues

I wanted to remove a work item association to an outgoing change set and then associate it to a new work item. However, I selected Remove... on the change set to remove the association, but it instead deleted all my code changes. This is bad. Can this be reverted?
Since it is a change set, that means it is a committed set of files.
If you selected "Remove" in the "Related Artifacts / Associate Change Request" dialog box, this shouldn't be an issue.
You always can test and make a second repo workspace, load that second repo workspace in a second local workspace and see if you get the change set back.
You can modify the flow target of your second repo workspace, and make it reference your first repo workspace, to see if you get that same change set in the "incoming" section of the "Pending Changes" view.