Jump to content
Francois Normandin

Bitbucket sunsetting support for Mercurial

Recommended Posts

As I've reported in the UI Tools support page, I've started migrating the open source code I still have on bitbucket (Mercurial-based repos) to Github.
I didn't think that it might be worth a specific topic until @LogMAN mentioned it. Personally, I'm moving my code to Github in the process. I know there are some reports of Hg-to-Git transitions not going so well when using sub-repositories, so please share your migration experience if you've had to jump into some hoops to get it done!

For all of you who still use Mercurial and host your open source and/or enterprise repos on Bitbucket, this blog post is worth reading:

3 hours ago, LogMAN said:

Thanks for the heads up, this completely went by me.

Here is the official blog post from Bitbucket if anyone is interested: https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket

Edited by Francois Normandin
  • Thanks 1
  • Sad 1

Share this post


Link to post
Share on other sites

Yes this is bad news indeed. The forum channel is full of angry customers. 

For what it's worth I have managed to import several repositories from Bitbucket into github using the github import, but it failed for me when I had 2FA turned on in Bitbucket. 

Share this post


Link to post
Share on other sites

There is a forum where they want to discuss conversion tools, best practices et cetera:
https://community.atlassian.com/t5/Bitbucket-articles/What-to-do-with-your-Mercurial-repos-when-Bitbucket-sunsets/ba-p/1155380

At git-scm they suggest using hg-fast-export. git-remote-hg seems to be popular as well. Someone wrote a script to automate the migration process to GitHub without using GitHub import. Although I'm not sure how well it performs it can be worth a try: https://magnushoff.com/blog/kick-the-bitbucket/

Share this post


Link to post
Share on other sites
On 10/26/2019 at 8:44 AM, Francois Normandin said:

I've started migrating the open source code I still have on bitbucket (Mercurial-based repos) to Github.

What's the reason for moving to Github?

I was using Kiln to host my code, which used Mercurial. I switched to Bitbucket with Git. I had to migrate many projects from Mercurial to Git. I did the migration using the HG-GIT extension: https://hg-git.github.io

The main problem I encountered was using the "large files" Mercurial extension. The automatic import tools provided by GitHub and others don't like that extension and barf. Otherwise you can use the web migration tool provided by GitHub. My workaround to the large files problem was to accept the fact that I will lose the revision history on those files. Not a huge deal, since most large files I had were installers and binaries that didn't have revisions per say. So after the migration I did a diff on the project folder, identified the large files, which were missing from the new Git project and just copied them over and pushed them up to the Git repo. Don't forget that the core GIT functionality is the same regardless of service provider. So let's say you found a way to import your repo to GitHub, you can easily turn-around and move it to GitLab, bitbucket or whatever. You're not locked-in. But it might be an issue if you are using an extension that only one service provider supports.

The future is GIT. I made the jump over a year ago and haven't looked back. The service provider you choose should give you the tools you need to do your job. The reason I picked Bitbucket was because I liked and used all the other products that Atlassian provides, JIRA, Confluence etc. The tools from Github are a bit weak for my business. I also like companies that continuously improve and invest in their products, among other things. Github seems to be the popular choice for open-source, since that's how it got started. Now that Microsoft owns them, perhaps they don't have to worry about generating revenue (don't know if it's good or bad). But I don't see features that compare to what Atlassian offers.

  • Like 1

Share this post


Link to post
Share on other sites
On 10/30/2019 at 11:11 PM, Michael Aivaliotis said:

What's the reason for moving to Github?

I simply have all my public repos in Github nowadays, so switching it is mainly to keep them all in the same place.

You're right that I could have simply kept the address of the repo the same and changed it to Git.

Share this post


Link to post
Share on other sites
On 10/31/2019 at 11:11 AM, Michael Aivaliotis said:

My workaround to the large files problem was to accept the fact that I will lose the revision history on those files. Not a huge deal, since most large files I had were installers and binaries that didn't have revisions per say.

Files that don't have revisions don't need to be commited into the repository itself.

GitHub has a nice feature called GitHub Releases which lets you host "release files" -- it's designed for installers/packages/binaries, but you're free to store other files there too. Each Release is linked to a tag/commit in your Git repo so you know which version of your code was used to generate the installer. Here's an example of some releases from an NI repo: https://github.com/ni/niveristand-scan-engine-ethercat-custom-device/releases/

BitBucket has a lightweight variant of this called BitBucket Downloads (the link is somewhat tangential, but it's the best I could find).

I like GitHub's release file hosting more than BitBucket's, but I like BitBucket's issue tracker more than GitHub's.

  • Like 1

Share this post


Link to post
Share on other sites
On 11/5/2019 at 5:46 PM, JKSH said:

Files that don't have revisions don't need to be commited into the repository itself.

I agree. I don't store those type of file in the repo for a while now. My specific comment was about how to transition from one large files extension in Mercurial to Git.

I use Bitbucket Downloads. However, I'm finding that different file sharing tools can be useful for different use-cases. There's really no one-size fits all.

Share this post


Link to post
Share on other sites

Since I have just painfully converted many years of Hg repos to Git, I thought I'd make a quick note here.   I used the procedure described here: https://helgeklein.com/blog/2015/06/converting-mercurial-repositories-to-git-on-windows/

Here is a screenshot of the Windows cmd window:

1611374327_HgtoGit.png.fa5fa656f0b25496425523ac843952de.png

After this one needs to push to the new git repo on Bitbucket (though you could use another service).   I could not do this from the command line, but I could push after opening the repo in SourceTree (which I had previously set up to use the right private key to talk to Bitbucket).

Personally, I stayed with Bitbucket, partly because I could transfer my Issue Tracker history.   It involved Exporting the Issues (under Settings), and then Importing to the new git repo.  

It was quite painless, except for the tedium of converting many many repos.

 

Share this post


Link to post
Share on other sites
46 minutes ago, drjdpowell said:

Since I have just painfully converted many years of Hg repos to Git, I thought I'd make a quick note here.   I used the procedure described here: https://helgeklein.com/blog/2015/06/converting-mercurial-repositories-to-git-on-windows/

Here is a screenshot of the Windows cmd window:

1611374327_HgtoGit.png.fa5fa656f0b25496425523ac843952de.png

After this one needs to push to the new git repo on Bitbucket (though you could use another service).   I could not do this from the command line, but I could push after opening the repo in SourceTree (which I had previously set up to use the right private key to talk to Bitbucket).

Personally, I stayed with Bitbucket, partly because I could transfer my Issue Tracker history.   It involved Exporting the Issues (under Settings), and then Importing to the new git repo.  

It was quite painless, except for the tedium of converting many many repos.

 

James, I took this as a good opportunity to move away from Bitbucket and to GitHub. Their import tool worked pretty well but it was a bit tedious as you say.

Share this post


Link to post
Share on other sites
29 minutes ago, Antoine Chalons said:

Neil, can you explain what made you leave Bitbucket for GitHub?

Sure. My primary motivators were:

  1. Performance (it always seemed slow even to access the web interface, and ssh pushes and pulls often took forever)
  2. The war is over, Git has been crowned the victor. I backed the wrong horse about 8 years ago and now it is time to move on. The only reason I chose Bitbucket in the first place was their support for Hg.
  3. The way they have handled the move to Git was terrible.
  4. GitHub now has free private repositories, and as of yesterday you can have teams for free

Realistically, the only thing keeping me on Bitbucket for several years was the pain of moving all 100 of my repositories over to somewhere else. They forced my hand with this and I have not looked back since.

Since then I have found other good things:

  1. GitKraken is incredible
  2. Visual Studio has really nice (simple) support for Git with the Git extension
  3. I don't have to remember how to pronounce Atlassian anymore
  • Like 1

Share this post


Link to post
Share on other sites

VSCode+gitlens has really nice git integration for text, if you don't have access (or dont want) full visual studio.

I've been trying and trying to get away from sourcetree -- I've tried gitahead and git extensions. I like Git extensions best so far -- is not friendly, but it does a good job of exposing all the little random git things whereas a lot of tools (rightfully) try to make git look like its easy. I do want to try kraken now.

Edit: do you know what gitkraken's license rules are? I thought the old rules were that its only free for open source, but I can't actually find any license terms. It says you can only access "public" repos, but when I just installed it I could use it just fine with a local-to-my-computer repo. So I'm confused.

Edited by smithd

Share this post


Link to post
Share on other sites

GitKraken is free for public GitHub repositories, I never tried it with anything local but I think you are right in that the free version does work as well. I spent a few weeks with the free version and happily handed them some money for the pro version. Its a really nice client. I actually bought a second license as I had the GitHub client on my wife's computer and it was so terrible in comparison.

Edited by Neil Pate
  • Thanks 1

Share this post


Link to post
Share on other sites
5 minutes ago, pawhan11 said:

@Neil Pate 

Did You move completely from Atlassian products?  Did You find better alternatives for Jira or Confluence? 

I only used Bitbucket for my personal consulting work so have moved away entirely there.

However at my day job we are heavily into Jira and Confluence and will likely not be moving away from these any time soon.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By odoylerules
      All,
       
      Recently I moved from SVN to GIT as my source control and revision manager.  I'm still getting used to everything so i don't consider myself an expert yet, but i really missed the Project Provider options that I used for SVN source control within the project window.  
       
      I'm releasing an open source beta project provider for TortoiseGit Integration.  This addon is very similar to the current SVN options but was developed entirely from scratch.  Currently this provider requires TortoiseGit to perform most of the Source Control Actions.  I know a lot of you on here have recently switched to sourcetree, however, unlike TortoiseGit they do not currently offer a command line interface yet for windows that i could find.  I've tried to make this project flexibile and if they offer a command line for windows eventually it should be fairly quick to re-factor for that.  
       
      The project can be found here: https://bitbucket.org/jed_d/lv_tortoisegit
       
      Addon Features
      Tortoise Git Icon Overlays within Labview IDE Tortoise Git Commands from within Labview IDE Ability to directly reload a project from within the Project Window, as well as prompts to reload the project when performing actions that require a reload. Open Git Bash from project window

       
      I'm hoping some of you will have a chance to try this out and let me know of any issues.  I would like to track issues on bitbucket if possible so that they are all in one place, but i will also be checking these post for issues as well.  
       
      Feel free to fork the project and hack on it yourself.  If you come up with something decent and don't mind sharing, send a pull request.  
       
       
      One initial issues i'm hoping the community can help with is building the package for older versions of LV.  Currently i only have access to 2013 so i am only able to build the package for this version.  If anyone has a change to pull down the repo and build it for older versions please do.
       
      Another question i have for the community is the license i currently have on the project.  This is my first open source project of any kind so i wasn't sure what license to put on it.  I did not want to be too restrictive so i went with a BSD license.  If any of you see an issue with this please let me know as I'm open to suggestions.
    • By PaulL
      Here is the set-up:
       
      I have a component project library (StepperMotor.lvlib) that I have moved to the userlib in order to facilitate reuse over multiple projects.  Within the library I have
      1) a strict typedef (StepperMotor.ctl) cluster that contains a numeric control for expressing the maximum output step rate.
      2) the StepperMotor.lvclass, an abstract class that contains effectively virtual methods (they do nothing but wire inputs to outputs) and LabVIEW-generated accessor methods for the two items in the class private data.
      This is LabVIEW 2013 SP1 on Windows 8.1.
       
       
      OK, so I start with everything clean (git status reports clean, LabVIEW opens and closes the library without prompting for changes).
      1) Then I open the StepperMotor.ctl directly from Windows Explorer (hence not opening the library), change the range of the numeric from 2 kHz to 4 kHz, and save it.
       
       
      2) Then I open the library, make no further changes, and attempt to close the library.  LabVIEW correctly prompts me to save changes.  I opt to close the project without saving changes, however.
       
      3) Next I discard the change to StepperMotor.ctl using git.  (I have been using Discard in SourceTree, or a git reset --hard command.)  Then git status returns a clean status.
       
      4) I open the project and attempt to close it.  Since I have reverted all changes, LabVIEW does not prompt to save changes.
       
      So far, so good.  This is expected behavior.
       
      Now, I repeat the steps, except that in step
      1) I open the library first, open the typedef control from the project, make the same change, save the control (without applying the changes), and close the project (without saving).
      2) is the same as above (OK).
      3) is the same as above.  Again, git status shows me everything is clean.
      4) I perform the same action as above, but this time LabVIEW prompts me to save all the accessor methods on the class, citing a changed typedef (even though if I open the typedef the range is indeed back to its original value).  This is unexpected behavior.
       
      Worse yet, even if I perform a git reset --hard and verify with a git status that everything is clean, if I open and immediately attempt to close the project, LabVIEW still prompts to save, citing "Type Definition modified".  This is indeed problematic.
       
      (Further note: If I let LabVIEW save the changes, git status still shows clean, and LabVIEW opens and closes the project without prompts.)
       
       
       
       



    • By PaulL
      Has anyone actually configured Git to work with LVCompare or LVMerge?  (I've seen some threads on various boards saying it "should be something like" <x>, but it isn't quite <x> and I haven't found anywhere that someone has actually described it successfully.)
       
      Notes:
      I know how to configure TortoiseSVN to work with LVCompare and LVMerge.  My new employer is moving to Git (some good, some bad in that, in my opinion, but that is another topic).
       
      I have been using Git for a few months now with reasonable success and decided I should try to set up graphical differencing.  [OK, in practice I've rarely used graphical differencing for any practical purpose, and graphical merging probably never for any actual code.]  Anyway, I think I've learned some things trying to figure out how to get this to work--but I don't have it working yet.
       
      I use the Atlassian SourceTree client at present (and sometimes the shell).  For the purposes of this discussion it might be more helpful to share the relevant text in the .gitconfig file (and any associated scripts, if necessary).
      As others have mentioned, Git itself (SourceTree similarly) does not distinguish which diff tool to call according to the file extension.  This seems like it could be a significant drawback.
       
      What I have tried:
      I added this (and variants of it) to my .gitconfig file:
       
      [difftool "LVCompare"] path = C:Program Files (x86)National InstrumentsSharedLabVIEW CompareLVCompare.exe keepBackup = false trustExitCode = false[difftool "LVCompare"] cmd = "C:Program Files (x86)National InstrumentsSharedLabVIEW CompareLVCompare.exe" "$LOCAL" "$REMOTE"[diff] tool = LVCompare SourceTree reports errors on start-up, so don't use this!  Lol!
       
      Maybe I need to add a script, too.  I'm not sure that I'm really all that close, honestly.
       
      [bigger question: Why is this difficult in the first place?]
    • By JeremyMarquis
      I am playing with GitHub as a possible replacement for our current SCC tool.
       
      Do you guys use Git or GitHub?  What client app do you use?  Any recommendations?
       
      I am specifically leaving the topic scope open, so feel free to praise/rant/headscratch.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.