TortoiseHg not prompting when I push multiple heads - push

If I have a branch which now has two heads TortoiseHg used to prompt and prevent me from pushing two heads to the remote server. Now however, it just pushes them to the remote server. I have looked in the settings, but no options jumped out at me for bringing the prompt back.
Running TortoiseHg version 2.10.1, Mercurial version 2.8.1

The option Force push or pull (override safety checks, --force) was ticked on my local repository.
This option was some what hidden, I could only find it by hitting the synchronize button which would bring up a new pane, and then it was under options.

Related

How to view file changes before pulling through GitHub on RStudio?

I'm transitioning from using Subversion in Eclipse for code management to GitHub in RStudio. It's starting to make sense, but I can't seem to figure out how to pull effectively.
Specifically, if I use the Pull arrow in RStudio, every file change in the repository automatically updates my local files without warning. I can see how many files were updated, but not what changed!
Here are the questions I'm hoping to get help with:
1) Can I preview the repository file changes in RStudio before I pull them locally? With SVN in Eclipse, there was an indicator showing files with a difference, and the option to view side by side.
2) If multiple files have been changed on the repository, is it possible to pull just 1 locally?
3) How can I revert a local file to a previous version?
Right now I've been trying to do this all within RStudio for simplicity. I haven't used things like the GitHub desktop client.
I appreciate the help!
I would suggest you better get used to the git's own tools to stay informed about your repository.
For example you could do following.
Before you pull, check your current commit logs
git log
This should show you how your current commits stack up. Note the latest commit id (first 4-5 letters would usually do)
Now after pulling you can see the difference using following command
git diff --color your_previous_commit_id..HEAD
If you don't like the changes and want to go back,
you can just reset to your favorite commit with following command. BTW run "git stash save" to keep a copy of your uncommitted changes.
git reset --hard you_favorite_commit_id
Note: that this will delete all your uncommitted changes unless you stashed them and put your local branch behind the remote repo branch you are tracking again.
Wondering where to put these commands? Check https://git-scm.com/downloads.
What's good about using these git tools is that if you switch between IDEs you don't need to search for same functionalities you had in your earlier IDEs.

EGit greying out / not showing commit

I've been running into a wired problem (which has been described (but not solved) here as well:
I used to develop using PyDev and Egit (recent versions, EGit is 3.0.3) with just a local repository. Everything worked fine, I was able to commit, branch, reverse etc. just using the "Team" menue in my PyDev perspective.
Now I added a remote reposisory to host the project and since then, I can not commit to my local repository. File changes are not detected (even worse: I change file A and afterwards all folders are marked as "changed" (having the ">" icon) and no file is recognized as "needing synchronization". The only menu points which are available are "Add to index" (which has no effect) and "Pull" (which says "everything is up to date" - which is true since there is nothing new on the server to pull).
When I use git (either command line or git extensions), I see the changed file as changed and it's offered for staging. I can use plain git to commit, push, etc, everything works as expected and no error messages are shown. I'm just using one branch (master).
Even if I open the "Git Repository Exploring" perspective in Eclipse and got to the tab "Git Staging", the file is listed.
I jus started a new test project with just a local repository (residing in the same git-folder ~/git) and here I can commit as I'm used to... And I added the project to the same repository server - and still everthing works! I can commit, I can push, everything is fine there...
yes, I can work around hat by using git extensions, but I really liked the smooth integraion of git in eclipse. Therefore, all ideas, remarks etc. are very welcome! And yes, I tried restarting eclipse ;o).
Finally!!!
Since everything was working before I added the remote host, amd everything worked in my small toy project, I removed and re-added my remote host using gut bash:
git remote remove origin
git remote add origin git#my_servername:my_repository.git
I suppose some configuration files were corrupted in a very non-obvious way (I checked all config fiels and did not notice anything...)
Sounds like a bug, and you might be able to get it back to a good state by playing around with the plugin setting data.
Located here: ${workspace}/.metadata/.plugins
I highly recommend backing up that whole folder before you start playing around. I have had other eclipse issues that have been resolved by going in here and deleting things.

Eclipse-fetch says my Git repo is current so what's the ↓13 mean?

As a git noob, Eclipse is not helping my confusion... I switched to me local master branch and ran a fetch with the settings below:
Firstly I don't understand why the "Next" button is disabled. Secondly when I run the fetch using "Finish", it tells me I am already up to date (makes sense as I already fetched). So what does the ↓13 mean? Isn't it telling me my local branch is behind the remote branch? Or that the remote branch is itself behind... but this is the remote master so what can it be behind of?
It means that you are 13 commits behind the origin.
If the arrow is pointing up, that means that your branch is X commits ahead of the origin.
As far as your Next button being grayed out. I believe it's because you havn't selected the Ref yet. Click the ref, and then you should see it.
FYI - when i started out with Git, i tried to use the eGit plugin for Eclipse, and I can say to you as a new person in Git. Use command line! I've had my local git repositories corrupted from the plugins, and it's not very intuitive.

Egit: Cloning a repository via SSH

I'm trying to clone a remote repository via SSH using EGit.
I've made some progress by setting http.sslverify to false and turning up the remote connection timeout.
Now the cloning makes progress, through "resolving deltas", but then hangs Eclipse with a full "loading" bar. There is no label on the bar and no apparent way to cancel the operation without force-quitting Eclipse.
I'm running Eclipse 3.7.0 and Mac OS 10.5.8.
Any ideas? I'm not sure what to do because I have no error message -- just no progress.
(BTW, I originally posted this as an "answer" in another thread. My post was deleted. I apologize for the breach of etiquette and can only say that I'm new here. I'm a bit perplexed that I didn't get any notification that my post had been deleted; I had to search again to find the thread and scroll down to see the message.)
Peter, just curious as to where you host your repository? If you had a timeout issue, it's possible the host has even more issues.
Have you tried running the git clone from the command line and use EGit only for the "mundane" tasks? It's not ideal, but being able to do it from the command line usually saves a lot of trouble, and if it fails the error messages are very clear about why.
I've used EGit a while, but went back to just opening a terminal and doing the sacro-sanct
git commit -a
git fetch origin/master (or whatever your branch is)
git merge
git push
EGit tends to fail for weird reasons. And when using with Github it becomes a nightmare to set it up to use SSH keys.

Can I have git gui and git bash and eclipse git plugin looking at same repo simultaneously?

I am using Eclipse to work on Android java projects on a Windows 7 machine. I am using Git to version-track, back up, and share.
I have git gui, git bash, and the eclipse git plug-in. My question really comes down to:
Is it safe and/or will my tools (gui, bash, eclipse) work right if I have them all open and looking at the same git repo at the same time?
I ask this because I have had eclipse fail to do a checkin a few times, and one time in git gui when it was barfing I got brave/stupid and hit the "unlock git index" choice. Since I did that unlock, none of my git clients have complained. But the suggestion that there IS a lock and that I "manually" unlocked it has me afraid that I have opened the door to non-thread safe crashes in my git repos.
TIA
Yes, it is safe. The index lock is something that is normally only intended to be held while an operation is in progress (e.g. while a commit is being created or a merge is being handled).
If you have to manually unlock the index it probably means one of your Git clients crashed/errored while it was doing one of those operations and thus accidentally left it locked.