Mercurial

Another common VCS in use today is Mercurial, which has a similar focus on distributed capabilities to Git, but with some differences. Thanks to a lot of similarities with Git, it's not too hard to convert an existing Mercurial repository to a Git repository and then upload it to GitLab:

  1. First, you'll need to clone the hg-fast-export tool:
      git clone https://github.com/frej/fast-export.git
  1. Then, clone the repository you want to upload to GitLab:
      hg clone [REPO URL] mercurial-repo
  1. Because Mercurial is more lax with the content it allows in the author field, you need to clean up the authors and create an author mapping file. First, run the following commands:
      cd mercurial-repo hg log | grep user: | sort | uniq | sed 's/user: ...

Get GitLab Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.