GithubHelp home page GithubHelp logo

nvdnkpr / fast-export Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frej/fast-export

0.0 2.0 0.0 366 KB

A mercurial to git converter using git-fast-import

Home Page: http://repo.or.cz/w/fast-export.git

fast-export's Introduction

hg-fast-export.(sh|py) - mercurial to git converter using git-fast-import

Legal
=====

Most hg-* scripts are licensed under the MIT license[0] and were written
by Rocco Rutte <[email protected]> with hints and help from the git list and
#mercurial on freenode. hg-reset.py is licensed under GPLv2 since it
copies some code from the mercurial sources.

The current maintainer is Frej Drejhammar <[email protected]>.

Usage
=====

Using hg-fast-export is quite simple for a mercurial repository <repo>:

  mkdir repo-git # or whatever
  cd repo-git
  git init
  hg-fast-export.sh -r <repo>

Incremental imports to track hg repos is supported, too.

Using hg-reset it is quite simple within a git repository that is
hg-fast-export'ed from mercurial:

  hg-reset.sh -R <revision>

will give hints on which branches need adjustment for starting over
again.

As mercurial appears to be much less picky about the syntax of the
author information than git, an author mapping file can be given to
hg-fast-export to fix up malformed author strings. The file is
specified using the -A option. The file should contain lines of the
form "FromAuthor=ToAuthor". The example authors.map below will
translate "User <garbage<[email protected]>" to "User <[email protected]>".

-- Start of authors.map --
User <garbage<[email protected]>=User <[email protected]>
-- End of authors.map --

Notes/Limitations
=================

hg-fast-export supports multiple branches but only named branches with
exaclty one head each. Otherwise commits to the tip of these heads
within branch will get flattened into merge commits.

As each git-fast-import run creates a new pack file, it may be
required to repack the repository quite often for incremental imports
(especially when importing a small number of changesets per
incremental import).

The way the hg API and remote access protocol is designed it is not
possible to use hg-fast-export on remote repositories
(http/ssh). First clone the repository, then convert it.

Design
======

hg-fast-export.py was designed in a way that doesn't require a 2-pass
mechanism or any prior repository analysis: if just feeds what it
finds into git-fast-import. This also implies that it heavily relies
on strictly linear ordering of changesets from hg, i.e. its
append-only storage model so that changesets hg-fast-export already
saw never get modified.

Submitting Patches
==================

Please use the issue-tracker at github
https://github.com/frej/fast-export to report bugs and submit
patches.

Footnotes
=========

[0] http://www.opensource.org/licenses/mit-license.php

fast-export's People

Contributors

tronical avatar hanwen avatar frej avatar clee avatar dpw avatar barrywardell avatar living180 avatar aried3r avatar bsergean avatar fantomas42 avatar smurfix avatar zr40 avatar zpao avatar petercolberg avatar scottlamb avatar

Watchers

Navid Nikpour avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.