Homebrew has both an "hg" and a "mercurial" formula. Which one should I install if I want to use Mercurial from the command line?
Homebrew aliases hg to the mercurial formula.
They're exactly the same, and they install the same program(s).
You can demonstrate this with brew info hg mercurial.
Related
I'm trying to do a hg clone on an Internet facing machine for later use on an offline build machine. Unfortunately mercurial is 3.9.1 on the Internet machine, but 1.4 on the offline machine.
I get the error abort: requirement 'generaldelta' not supported! and also abort: requirement 'dotencode' not supported!
I found this is becuase generaldelta feature was added in 1.9, and dotencode in 1.7. I've used instructions from the MissingRequirement wiki page to downgrade this repo using the following.
hg clone -U --config format.generaldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar
However the new repo at /tmp/bar still uses generaldelta, although dotencode require has gone. i.e.
cat /tmp/bar/.hg/requires
fncache
generaldelta <=== still there
revlogv1
store
store
How can I rewrite the repo with both generaldelta and dotencode disabled?
The config option should have been format.usegeneraldelta not format.generaldelta. i.e.
hg clone -U --config format.usegeneraldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar
Note the config. options are all config.use<feature-name> apart from config.dotencode see Mercurial format options. Beware as there is not any error checking either.
I installed the shelve extension for hg by adding 'shelve=' to [extensions]. I can verify this by running 'hg help extensions' which has the following in the output:
enabled extensions:
extdiff command to allow external programs to compare revisions
fetch pull, update and merge in one command
shelve Manage shelves of pickled objects.
I then type 'hg shelve' in a repo of mine, and I get:
hg: unknown command 'shelve'
Mercurial Distributed SCM
...
I would expect the shelve extension to run...
Mercurial verison is 2.0.2
The Shelve extension is distributed with Mercurial 2.8 and later, as mentioned here.
There is an older third party shelve extension that you can use with Mercurial 2.0.2, but it is not distributed with Mercurial and must be installed separately.
I am seeing this error on Ubuntu:
hg clone https://...
abort: error: _ssl.c:326: error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib
I tried clearing ~/.ssh but have had no luck connecting to the mercurial
Tonfa has the right idea. You have 2 options:
1) Get a clean certificate from another linux installation and point to that ca-certificates.crt file.
2) Replace your /etc/ssl/certs/ca-certificates.crt with a old copy or one from a clean linux install.
https://www.mercurial-scm.org/guide please visit this link.....right now i successfully install mercurial but next step not i am clear.....
Initialize the project
Now you add a new folder in which you want to work:
$ hg init project
Add files and track them
$ cd project
$ (add files)
$ hg add
$ hg commit
(enter the commit message)
add file means i dont know...can u explain please
now i am using ubuntu....
mercurial installation step1:
embdes#embdes-laptop:~$ sudo apt-get install mercurial
[sudo] password for embdes:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mercurial is already the newest version.
The following packages were automatically installed and are no longer required:
libopenal1 wavpack kdelibs4c2a libdc1394-22 mppenc vorbis-tools libxvidcore4
libldns1 libsvga1 kdelibs-data mplayer kdemultimedia-kio-plugins liblualib50
libkcddb4 mp3gain vorbisgain speex libmp3lame0 faad libavahi-qt3-1 icedax
freepats ffmpeg libao2 liblzo2-2 libavfilter0 flac libev3 timidity libqt3-mt
liblua50 timidity-daemon libunbound2 libavdevice52
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 261 not upgraded.
embdes#embdes-laptop:~$
step:2
embdes#embdes-laptop:~$ hg init project
abort: repository project already exists!
embdes#embdes-laptop:~$ cd project
embdes#embdes-laptop:~/project$ hg add
embdes#embdes-laptop:~/project$ hg commit
nothing changed
embdes#embdes-laptop:~/project$ hg init
abort: repository . already exists!
embdes#embdes-laptop:~/project$
This is the output from my commandline. Please correct me if I have done anything wrong.
The android project I develop will reside in the following directory,
/home/embdes/workspace
The following is the android sdk directory
/home/embdes/project/android/android-sdk/platform-tools/
how to install mercurial?
how to use android engine example project in my eclipse?
I am new in using commandline, so please help me in clearing above two doubts.
Thanks
You need to create files that are going to be version controlled. It is that simple.
You will find a full step-by-step tutorial at hginit
For instance, after an hg add, you need an hg commit:
There’s still one more step… you have to commit your changes. What changes? The change of adding all those files.
Why do you have to commit?
With Mercurial, committing says “hey, the way the files look right now—please remember that.” It’s like making a copy of the whole directory… every time you have something that you’ve changed that you sorta like, you commit.
When you issue the init command you are telling mercurial to track changes within the directory for a list of files... with the add command you tell mercurial which are these files.
By issuing the add command without any parameters you're telling mercurial to revision-control ALL the files within the "project" directory (recursively).
At any given time you can "forget" a file... and it will still be within "project" (directly or not) but mercurial won't care about any changes to the file.
You have to first get a basic understanding of what mercurial is for. Mercurial is a version control system which can store the changes you make your files. In your commandline output it is obvious that you have no files inside the,
/home/embdes/project
directory. That means you have made no change. Then what will mercurial store?? So only it says nothing has changed. You just create new files or directories there. Then do hg add. You will see the difference :)
I'm using "Mercurial Distributed SCM (version 1.1.2)" on my Ubuntu.
I'm new to mercurial, and just created a new project on sourceforge.net.
I added some code files, commited some changes, pulled & pushed.
I created some tags "0.1.1", "0.1.2" and "0.1.3" using "hg tag" and now I want to pack it all in a revision zip file.
A friend sent me a script that automatically picks a name and create the zip file using
hg parent --template "{node|short}\n{latesttag}\n{latesttagdistance}"
I executed this command but the {latesttag} & {latesttagdistance} doesn't seem to work. When I try:
hg log --template "{latesttag}{latesttagdistance}\n"
it just prints a bunch of empty lines.
Does anyone have any suggestions for why the templates don't work? Should I configure something in some hg configuration file? Does it have anything to do with the fact I don't use branches as I'm supposed to?
Any suggestions could help. I am new to mercurial so it's probably something basic that I don't understand.
Mercurial 1.1 is quite old. {latesttag} and {latesttagdistance} are only available since Mercurial 1.4. If you don't want to update Ubuntu (Ubuntu 10.10 comes with Mercurial 1.6), you can use a PPA repository.
If you have a Ubuntu-derivative, you can install the newest version from launchpad:
https://launchpad.net/~mercurial-ppa/+archive/releases