Search Unity

Any plans to add Mercurial support?

Discussion in 'Unity Build Automation' started by Wom, Sep 7, 2014.

  1. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    Been playing around with UCB, seems pretty good - the Android and iOS builds have both worked pretty seamlessly. Are there any plans to add Mercurial support?

    I've been testing it out by just copying my stuff across to a separate git repository. Which, honestly, I could probably live with long-term (old-school Hg branching taken to the extreme :p)

    Not a big deal - just wondering.
     
  2. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
    Hey Wom,

    Great! Glad to hear it's been useful - thanks for the feedback. Regarding Mercurial support: we've looked into adding this but we don't have any specific timeline for supporting it. If more people would like to see this feature, please leave a comment in this thread, and we'll take that into consideration.

    (Also +1 for keeping it old-school)
     
  3. r0bbie

    r0bbie

    Joined:
    Dec 13, 2012
    Posts:
    6
    Just to add I'd also love to see Mercurial support added, as it's what we primarily use.
     
    hypeNate likes this.
  4. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
    @r0bbie - noted! I've added that to our feature-request list. Thanks!
     
  5. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
    @r0bbie and @Wom - have either of you tried this Hg->Git "bridge" setup?

    http://hg-git.github.io

    We'd be interested to know whether it worked for your needs, and if it worked on UCB. Thanks!
     
  6. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    No reason it wouldn't, but I doubt many Mercurial users would bother. Personally, if I were going to jump through hoops to make UCB work (like: "Be sure to install the VC++ 2008 version for compatibility reasons" o_O), then I'd rather do the hokey-pokey with Git.
     
    hypeNate likes this.
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Adding another vote for Mercurial support. Our entire office uses it and we'd love to get some cloud build access without bridging to Git.

    Thanks!
    Kurt Dekker
     
    hypeNate likes this.
  8. popcorn_pete

    popcorn_pete

    Joined:
    Oct 28, 2013
    Posts:
    6
    Another vote for Mercurial support...
     
    hypeNate likes this.
  9. Reekdeb

    Reekdeb

    Joined:
    Nov 26, 2012
    Posts:
    9
    +1 vote for Mercurial support. We love Mercurial and use for all our projects.
     
    hypeNate likes this.
  10. wizardness

    wizardness

    Joined:
    Jan 25, 2014
    Posts:
    2
    I'd appreciate Mercurial support as well.
     
    hypeNate likes this.
  11. RivalGamesSecond

    RivalGamesSecond

    Joined:
    May 10, 2013
    Posts:
    2
    +1, Mercurial support would be really helpful to us.
     
    hypeNate likes this.
  12. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    +1 for Mercurial support
     
    hypeNate likes this.
  13. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    If any Mercurial users here are hosting on Kiln, it's worth mentioning that Kiln's Harmony feature is enabled by default, which allows your repo to be treated as either hg or git simultaneously. We use hg, but we just set up Unity Cloud Build to pull from Kiln as git, and it works like a charm.

    But that said: +1 for Mercurial support, in general. :)
     
    David-Berger likes this.
  14. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    Awesome hint! Thanks a lot! :)
     
  15. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    Nice!

    How are you finding Kiln for Unity development?
    And just in general - how well is Kiln working out for you?

    I really love the idea of seamless bridging between git and hg (using Git more and more, little pieces of me dying every day).

    Do you have people on your team committing and pushing with Git as well (aside from just using it to bridge to UCB)? If so, any problems?
     
  16. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    Yes please +1 for Mercurial. I'm struggling to understand the Git workflow with Sourcetree. Too many steps that we took for granted with Mercurial.

    Could I get another +1 if I add a "Pretty Please?"

    Edit: Trying to set my project up on Kiln. I'm hoping we can still use SourceTree as we've gotten used to our Sourcetree + Hg workflow. I'll let you know how it goes.
     
  17. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    What URL did you give Unity cloud build for your Kiln repo? It doesn't like my repo URL:
    https://xxxxxxxx.kilnhg.com/Code/Repositories/Group/xxxxxxxxx

    It says repo host is "other" with a big red "?"
     
  18. dimitroff

    dimitroff

    Joined:
    Apr 3, 2013
    Posts:
    131
    +1 for Mercurial support, currently we are using the hg-git solution, but it will be great to link our repo directly!
     
  19. Cine

    Cine

    Joined:
    Feb 26, 2015
    Posts:
    4
  20. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    First, you need to make sure Kiln Harmony is enabled on your repository (it should be enabled by default, but it's worth double-checking). This feature is what allows your hg repo to be accessed as if it were a git repo (which Unity Cloud Build currently requires).

    Second, you need to access the repo via SSH, which means you'll have to generate an SSH key in Kiln and plug it into your Unity Cloud Build repo settings.

    Finally, use an SSH url, like so: ssh://username@yourdomain.kilnhg.com/Path/To/Repository
     
    David-Berger likes this.
  21. phasiclabs

    phasiclabs

    Joined:
    Nov 13, 2013
    Posts:
    126
    +1 for Mercurial support please!
     
  22. genevieveLalonde

    genevieveLalonde

    Joined:
    Feb 4, 2015
    Posts:
    1
    Mercurial support for the win!!
     
  23. flyingaudio

    flyingaudio

    Joined:
    Dec 3, 2010
    Posts:
    98
    +1 for Mercurial, which is really another 3+, since I am speaking for the studio.
     
  24. Sebastian_Miko

    Sebastian_Miko

    Joined:
    Oct 7, 2014
    Posts:
    2
    Yea, so, "Mercurial Support in Unity", I support this message.
    Even your trainer @Adam Buckner uses it
    Live training on Mecurial, SourceTree and Bitbucket, maybe?
     
  25. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Heh, well, yes. For my personal material I use SourceTree and BitBucket with Mercurial repositories!
     
    hypeNate likes this.
  26. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
  27. AlbinoGrimby

    AlbinoGrimby

    Joined:
    Mar 24, 2014
    Posts:
    1
    +2 for Mecurial Support. :)
     
    hypeNate likes this.
  28. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    +1 mercurial for the win
     
    hypeNate likes this.
  29. Futch

    Futch

    Joined:
    Feb 27, 2013
    Posts:
    5
    Another vote for Mercurial support please!
     
    hypeNate likes this.
  30. IHavePockets

    IHavePockets

    Joined:
    Sep 24, 2013
    Posts:
    3
    +1 For Mercurial Support
     
  31. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    Thanks for your reply! Unfortunately I gave up on my Kiln repo as I had other deadlines to focus on. I'm going to hold off on the cloud builds until Hg is supported.
     
  32. dean0

    dean0

    Joined:
    Mar 7, 2014
    Posts:
    10
    Yes please, Mercurial support would be great.
     
  33. hypeNate

    hypeNate

    Unity Technologies

    Joined:
    Apr 4, 2014
    Posts:
    272
    Update: We now support Mercurial in our Studio plans. You should see it in the dropdown selector when you set up a project.
     
  34. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    CELEBRATION!!! Woooooo! You guys are awesome :) Trying it out right now.
     
  35. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    oh... studio plan :( Maybe later.
     
  36. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    I'll go ahead and be the first one to say it publicly. Putting Mercurial under Studio level support is not a very nice move, considering that Mercurial is already free and open source, as much as Git, which IS covered under the free cloud support. You might have had to license some type of integration software to bring up Perforce, but I know the software for Mercurial integration was free. :/
     
  37. dean0

    dean0

    Joined:
    Mar 7, 2014
    Posts:
    10
    I agree!
    Seems weird that Git is free and Mercurial is not. They are such similar beasts.
    At the moment I am using Tortoise to push to a Mercurial Repo and an identical Git Repo just so I can have cloud build. Derp.
     
  38. SamTheBay

    SamTheBay

    Joined:
    Jan 11, 2014
    Posts:
    14
    This really shocked me... It is probably going to stop me from using cloud build regularly because $100 a month is not reasonable when I do very infrequent builds but use mercurial.
     
  39. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Cloud build has value, but to most indy/hobby devs using Hg, not $1200/year value!

    I'm very disappointed in Unity for this move. It smells a LOT like a certain large game publisher's completely-failed idea to try milking used console game buyers for a $10-online license fee, from say about five years ago

    That didn't work and this won't either. You heard it here first.

    I'll probably go with @dean0's spiffy idea of a pull-Hg-push-Git to a temporary repository. I will be forced to waste my engineering time writing a solution to get around Unity's stinginess. And after I have already licensed both Unity4 PRO and also Unity5 PRO, for Android AND iOS... Sigh.
     
    optimise likes this.
  40. flyingaudio

    flyingaudio

    Joined:
    Dec 3, 2010
    Posts:
    98
    This is a surprise, to require Studio to get Mercurial support. That is a no go for our 2+ team. The Pro licenses are appearing to have less benefits than when version 5 was first announced.

    Unity, please share with us why you are not treating this the same as GIT? And, if it is only for more revenue, please reconsider that decision, so us indies can continue to get the awesome treatment we are use to.
     
    optimise likes this.
  41. zullo91

    zullo91

    Joined:
    Nov 1, 2013
    Posts:
    14
    Mercurial Integration only if i pay a Studio Plan ... :/
    Why it's not free like Git or SVN Support ?
    Unity surprise me! Please share this integration also in the Free plan.
     
  42. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    Unity... still waiting on Mercurial being supported on the free plan :( I guess I'll just have to switch to Git in the time being. Ugh. Staging. Ugh.
     
  43. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    Does anyone know if I can keep working with my bitbucket mercurial repo but somehow also push changes to a bitbucket Git repo? Could this be done automatically with every checkin? I'm not very familiar with either Git or Mercurial but I've been working with Bitbucket/Hg with Unity no problems.
     
  44. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    The grossest way to do this is to create a "sister" git repo for your project, and connect that to Unity cloud build.

    Then when you want to make a build, delete all the files under the git repo (without committing), copy all the files from your latest hg evision to the git folder, and do a "git add -A" (effectively an "hg addremove" if I understand correctly... someone with more git experience correct me if I'm wrong!), then commit those changes.

    Gross, but easy to script up I would think. I've not tried it personally but if I use Unity cloud build, I'm certainly not going to be paying to use Mercurial!!
     
  45. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Do u guys still have any plan to make Mercurial into Free plan?
     
  46. invicticide

    invicticide

    Joined:
    Nov 15, 2009
    Posts:
    109
    There's no nice way to do it in Bitbucket, but you can do it in Kiln (kilnhg.com) using the Kiln Harmony feature. It stores both git and hg versions of your repo and automatically keeps them in sync; you can work in either, and you can link the git version to Unity Cloud Build.
     
  47. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    Thanks @Kurt Dekker! I decided to go down the route you described and had some luck, so I thought I'd share. I'm developing primarily on a Windows PC, so adjust the following steps to the equivalent mac/linux commands and programs.

    1. I set up a Git repository on Bitbucket.
    2. created a batch file to mirror my source files to the destination files (using Robocopy.exe) :
    robocopy.exe <source> <dest> /MIR /S
    3. Whenever I want to do a cloud build, I run the batch file - it copies over my changes to the sister project.
    4. Commit and push the changes to the Git repo in Sourcetree (first check all in 'unstaged'. Then Click commit)

    You all probably know the rest, but some of this was new to me:
    5. Set up Unity cloud build with the address of the Git repo and set up SSH keys etc.
    6. Publish builds to iTunesConnect and Test Flight using the steps here:
    http://gamedevhacks.tumblr.com/post/120121434530/unity-cloud-build-apple-testflight

    @invicticide : I had tried Kiln before and that was definitely the cleanest solution, but unfortunately not something I can afford right now :(
     
  48. unitychrism

    unitychrism

    Joined:
    Sep 16, 2015
    Posts:
    122
    Hi there,

    I just wanted to follow up with this thread in case anyone was unaware that all plans (including free) now support Mercurial repositories.
     
  49. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Thank you! That is awesome news for us Hg-using devs.