Git + Mercurial
Blog series about my experiences to install and use a Distributed Version Control System integrated in Eclipse:
- DVCS -> install Git/EGit and Mercurial/HgEclipse
- DVCS part 2: initialize and import from local Repositories (EGit, HgEclipse)
- DVCS part 3: team… options and first steps using EGit, HgEclipse
- DVCS part 4: working with remote repositories (EGit, HgEclipse)
- DVCS part 5: branching with EGit and HgEclipse
- DVCS part 6: some usual workflows – how to deal with EGit and HgEclipse
- a single project with EGit (Git) repository
- a single project with HgEclipse (Mercurial) repository
- create and init multi-project repositories with EGit (Git)
- create and ini multi-project repositories with HgEclipse (Mercurial)
- clone your own Mercurial workspace repository to new local repository with HgEclipse
- clone from local Mercurial repository into your workspace using HgEclipse
- push/pull to/from local Mercurial repositories using HgEclipse
- …
- push/pull to/from remote Mercurial repositories at Sourceforge using HgEclipse
- clone your own Git workspace repository to new local or remote repository with EGit (not available yet)
- push to remote Git repositories using EGit (pull not available yet)
- DVCS part 7: Managament of Repositories (local, remote, workspace)
- HGEclipse
- DVCS part 8: convert repositories: from Mercurial to Git and back
- DVCS summary
- DVCS Tips and Tricks
Hi ekke! First off, I must say we enjoy your blog series a lot. We find it so useful actually, that we added it to the “HgEclipse tutorials” page located here:
http://www.javaforge.com/wiki/78696
(It would be super cool if you could update the wiki page when a new post is published.)
Keep up the great work! (We are also tweeting out links to your blog entries, see @intland!)
thanks for the kudos – of course I’ll update your wiki.
thanks for tweeting (I already recognized that because I’m following @intland 😉
ekke
Today published a little blog post to the Intland company blog: http://blogs.intland.com/main/entry/54
Have a nice week!
cool 😉
thx
ekke
Pingback: updates on DVCS Git/EGit and Mercurial/HgEclipse « ekkes-corner: eclipse | osgi | mdsd | erp
Pingback: DVCS Tips and Tricks: don’t copy/paste using Java Package Explorer « ekkes-corner: eclipse | osgi | mdsd | erp
Hi Ekke,
I am new to hgEclipse… just installed from http://hge.javaforge.com/hgelcipse for MacOSX and played a little with it.
My issue is I can’t find the ‘Create Repository’ button on the Mercurial View, it only shows ‘refresh’ button.
any suggestion what I need to do to get it?
thanks
Renee
there’s the “Mercurial Repositories” View
in the toolbar is an icon with “hg” – click to create a Repository
ekke
ypu should use the snapshots update site
http://hge.javaforge.com/mercurialeclipse-snapshots
there was much work on hgeclipse for 1.6.x
Hi Ekkes,
thanks for your reply.
I did open the “Mercurial Repositories” view and not seeing the icon for initializing the repository.
I just checked and I have hgeclipse version 1.5.0.201001202311 installed, should I upgrade to 1.6.x to get that feature?
thanks
Renee
yes, you should update to 1.6.x
thank…
I can’t seem to find the hgEclipse 1.6.0 … will it be same download for Mac?
if I have hgEclipse 1.5.0 installed, should I first uninstall it? I just want to make sure I wont mess up the install… do you already have the install instructions step by step somewhere in your blog?
thanks a million
you dont have to un-install
add this site to your updtesites
http://hge.javaforge.com/mercurialeclipse-snapshots
remove the other one
then install new software select hgeclipse
ekke
super… it works! thanks for your help!
great to hear.
feel free to ask again if you run into problems
ekke
Hi ekke, do you think hgeclipse will work well with Easy Eclipse? thanks
hi renee,
I’m not using EasyEclipse – but couldn’t imagine why it shouldn’t work.
all my complex eclipse installations work fine
ekke
Hi Ekke,
I have a challenge here… my work uses a hg repository on the remote server, and it
uses maven project management, so the hg repository looks like :
myproject
|- .hg
|- Makefile
|- cpp_component
|- blah blah
|- java_component
|- .hg
|- pom.xml (the maven project conf)
|- module1
|- .hg
|- pom.xml
|- src
|- main
|- test
… …
|- module2
|- .hg
|- pom.xml
|- src
|- main
|- test
… …
… …
As you can see, we are using multiple maven modules, so the ‘myproject/java_component’
is actually the maven project container of the modules under it.
the challenge is …
when I clone ‘myproject’, everything works fine in regarding to the mercurial aspect,
i.e. I can synch, pull, commit, push… etc.
but then since the structure has too many layers, the java aspect does not work, i.e.
when I drill down to one of the modules, then eclipse of course is no longer able to
help me navigate to different class definitions for example, using F3, etc, it complains
the ‘source is not in the build path’.
I know this is caused by the extra layers on top. If I were to create bunch of java
projects for each of the modules, (and run mvn eclipse:eclipse at the project container
level), the java projects will work perfectly, but then I can no longer have all these
sub projects retain their hg structure, I will have to clone each subproject separately…
so if I state the problem clear enough… would you please shed some light ? what will
be the best approach that you could suggest if this scenario ever happened to you?
Also since we are just introduing maven to our environment, we can be very flexible of
restructure or change to the best practice.
Thanks a lot!
Renee
sorry the post flatened my repository structure… here is another try ’cause the
structure is important for understanding the issue:
Myproject
|- .hg
|- Makefile
|- cpp_component
….|- blah blah
|- java_component
….|- .hg
….|- pom.xml (the maven project conf)
….|- module1
……..|- .hg
……..|- pom.xml
……..|- src
…………|- main
…………|- test
… …
….|- module2
……..|- .hg
……..|- pom.xml
……..|- src
…………|- main
…………|- test
… …
sorry – I don’t have those combinations. I’m woring with multi eclipse projects under one repository.
and if I’m using more then one repositories in the same workspace, each is located at another location, like:
MyWorkspace
|-repoA
………….|-.hg
………….|-project A1
………….|-projet A2
|-repoB
…………|-.hg
…………|-project B1
…
BTW: just announced: hgeclipse and MercurialEclipse reunion and 1.6.0 final available:
http://www.javaforge.com/project/HGE
you have to uninstall hgeclipse, then install MercurialEclipse 1.6.0
…will blog later the evening
ekke
Hi Ekke… I work on both a Mac and a linux box. So previously with your help, I was able to install hgEclipse 1.6 on Mac.
Now on my linux box (x86 64), I have just installed easyeclipse 1.1.3 (come with eclipse 3.3.1), and update software to the new mercurialeclipse 1.6 using update url: http://cbes.javaforge.com/update
install seems ok, then it restarted easyeclipse, I click on OK for the workspace selection, and the window shows then disappear. So it seems I can never get the easyeclipse to run.
Lastly, I tried to just install eclipse 3.3.1 itself, and update software using the http://cbes.javaforge.com/update to install MercuialEclipse 1.6. Install seems fine, then when eclipse restarts, it pops up a window saying I have earlier version of hgEclipse 1.5 installed, at end of that window, it did not suggest anything. So I close that pop up window, and the eclipse window disappeared. I start eclipse again, this time no pop ups, I look at window preference, can not find team->mericurial at all.
Any idea?
thanks!
Renee
hi renee,
I’m working on OSX-cocoa-64, ubuntu-64 and windows7-64
but only using Helios Eclipse 3.6 M7 or for some projects Galileo 3.5
so I can’t help you if Mercurial will work with eclipse 3.3 well – there were many changes with team provider
the message first time starting MercurialEclipse is confusing – I already have reported this:
http://www.javaforge.com/issue/11919
you can add your impressions on this bug issue and also ask in the forum there
ekke
I guess on my redhat box, I have mercurial 1.1.2 installed, that might be the problem ah? I am trying to install the newer version like 1.5.2 and see
1.4.3 is minimum, so this can be the reason
ekke
ok I install mercurial 1.5.3, MercurialEclipse still not working. I guess the redhad x86 64 does not run the mercurialeclipse …
thanks
Renee
ubuntu 64 runs it well
please try to install Helios M7 SDK with MercurialEclipse
if this runs, than its eclipse 3.3 or easyeclipse
ekke
I’m seeing the same issue, I think. Redhat x86/64, hg 1.5.3, Eclipse 3.5.1, mercurialEclipse will not even load correctly, either 1.6.0 or the latest snapshot from the beta directory. Have been beating on and cursing at Eclipse for the past two hours, but perhaps it’s a more fundamental issue?
…did my tests only on osx, win7-64 and ubuntu-64 so I couldn’t say if there are problems under redHat.
I would recommend to create an Issue at hgeclipse.
ekke
Pingback: redView 0.7.4 (Helios M7) available « ekkes-corner: eclipse | osgi | mdsd | erp
Hi Ekke,
thanks I will try it when I get time… getting busy with work recently…
thanks a lot for your help!
Renee
Hi Ekke,
I ran into a problem with hgEclipse (1.6 on Mac, the version before it was merged to mercurialEclipse)…
I use the synchronize view which list all my new files and modified files. I ‘Add’ those new files, and commit all my changes (by right click on all of them).
I then did a push on the project, it gave me ‘an internal error’ with java NullPointerException. and no other error message.
after that, I switch to command line, did a push, which complains
‘abort: push creates new remote heads on branch ‘default’!
(did you forget to merge? use push -f to force)
so I found I now have 2 branches, one is the default and the other is the new one just created by
hgEclipse.
now if I do ‘hg diff’ or ‘hg status’, they show nothing.
any idea what has happened in hgEclipse that ends up creating a new branch? did I do anything wrong?
thanks
if you make changes and another user makes changes, then you have to pull / merge from server and then push.
I don’t really understand what happened…
ekke