Git + Mercurial

Blog series about my experiences to install and use a Distributed Version Control System integrated in Eclipse:

if you like my work, you can Flattr this

32 responses

  1. 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

  2. Pingback: updates on DVCS Git/EGit and Mercurial/HgEclipse « ekkes-corner: eclipse | osgi | mdsd | erp

  3. Pingback: DVCS Tips and Tricks: don’t copy/paste using Java Package Explorer « ekkes-corner: eclipse | osgi | mdsd | erp

  4. 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

    • hi renee,
      I’m not using EasyEclipse – but couldn’t imagine why it shouldn’t work.
      all my complex eclipse installations work fine
      ekke

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. Pingback: redView 0.7.4 (Helios M7) available « ekkes-corner: eclipse | osgi | mdsd | erp

  11. Hi Ekke,
    thanks I will try it when I get time… getting busy with work recently…
    thanks a lot for your help!
    Renee

  12. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s