mercurial interview questions
Top mercurial frequently asked interview questions
I used Mercurial in a personal project, and I have been typing my username and password every time I want to push something to the server.
I tried adding the following to the .hgrc
file in my home directory, but it seems to be completely ignored.
[ui]
username = MY_USER_NAME
password = MY_PASSWORD
How to do this the right way?
Source: (StackOverflow)
There is a commit that just didn't work, so I want to abandon it without deleting it from history.
I have updated from an earlier revision and committed, thus creating a new head.
I don't have branches, I don't want branches, I just want to simply go on with the new head exactly as it is, nothing fancy, no merge, no worries, just go on forgetting the previous one.
I can't seem to find how to do that, and I'm starting to believe it can't be done. All I find is stuff about branches, or stuff about merging.
Source: (StackOverflow)
I am currently using TortoiseHg (Mercurial) and accidentally committed an incorrect commit message. How do I go about editing this commit message in the repository?
Source: (StackOverflow)
We now have a "stiging" branch, where "staging" seems to be a far better semantic fit. What's a good strategy for handling this?
Source: (StackOverflow)
Got a bluescreen in windows while cloning a mercurial repository.
After reboot, I now get this message for almost all hg commands:
c:\src\>hg commit
waiting for lock on repository c:\src\McVrsServer held by '\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
interrupted!
Google is no help.
Any tips?
Source: (StackOverflow)
Is there a way to configure TortoiseHg to store my password?
I have a project hosted on Google Code that I access using TortoiseHg. Whenever I want to push changes to Google Code TortoiseHg prompts me for a username and password. Google Code requires me to use an auto-generated password, and it gets quite repetitive to look it up every time.
Source: (StackOverflow)
I want mercurial to remove several files from the current state of the repository. However, I want the files to exist in prior history.
How do forget
and remove
differ, and can they do what I want?
Source: (StackOverflow)
I have a Git repository with few branches and dangling commits. I would like to search all such commits in repository for a specific string.
I know how to get a log of all commits in history, but these don't include branches or dangling blobs, just HEAD's history. I want to get them all, to find a specific commit that got misplaced.
I would also like to know how to do this in Mercurial, as I'm considering the switch.
Source: (StackOverflow)
I use this to remove a file from the repo:
hg remove <full file path>
What command can you use to do an hg remove
on all files that have been deleted locally?
By deleted locally, I mean those showing up with an !
when you do hg status
.
For adds, you can just do hg add
to add all new files (those prefixed with ?
).
Source: (StackOverflow)
I have added repository and at the time of commit I get error as
error: abort: no username supplied (see "hg help config")
I am not getting Mercurial.ini file on my local as well. Does anyone know how I can resolve this error on Fedora?
Source: (StackOverflow)
What do folks here see as the relative strengths and weaknesses of Git, Mercurial, and Bazaar?
In considering each of them with one another and against version control systems like SVN and Perforce, what issues should be considered?
In planning a migration from SVN to one of these distributed version control systems, what factors would you consider?
Source: (StackOverflow)
Here are two different questions but I think they are related.
When using Git, how do I find which changes I have committed locally, but haven't yet pushed to a remote branch? I'm looking for something similar to the Mercurial command hg outgoing
.
When using Git, how do I find what changes a remote branch has prior to doing a pull? I'm looking for something similar to the Mercurial command hg incoming
.
For the second: is there a way to see what is available and then cherry-pick the changes I want to pull?
Source: (StackOverflow)
I've heard a few places that one of the main ways distributed version control systems shine, is much better merging than traditional tools like SVN.
Is this actually due to inherent differences in how the two systems work, or do specific DVCS implementations like Git/Mercurial just have cleverer merging algorithms than SVN?
Source: (StackOverflow)
For a while now I've been using subversion for my personal projects.
More and more I keep hearing great things about Git and Mercurial, and DVCS in general.
I'd like to give the whole DVCS thing a whirl, but I'm not too familiar with either option.
What are some of the differences between Mercurial and Git?
Note that I'm not trying to find out which one is "best" or even which one I should start with. I'm mainly looking for key areas where they are similar and where they are different, because I am interested to know how they differ in terms of implementation and philosophy.
Source: (StackOverflow)