Legal
=====
-The scripts are licensed under the MIT license[0] and were written by
-Rocco Rutte <pdmef@gmx.net> with hints and help from the git list and
-#mercurial on freenode.
+Most hg-* scripts are licensed under the MIT license[0] and were written
+by Rocco Rutte <pdmef@gmx.net> 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.
Usage
=====
-Using it is quite simple for a mercurial repository <repo>:
+Using hg-fast-export is quite simple for a mercurial repository <repo>:
mkdir repo-git # or whatever
cd repo-git
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.
+
Notes/Limitations
=================
#!/usr/bin/env python
# Copyright (c) 2007 Rocco Rutte <pdmef@gmx.net>
-# License: MIT <http://www.opensource.org/licenses/mit-license.php>
+# License: GPLv2
from mercurial import repo,hg,cmdutil,util,ui,revlog,node
from hg2git import setup_repo,load_cache,get_changeset
import sys
def heads(ui,repo,start=None,stop=None,max=None):
+ # this is copied from mercurial/revlog.py and differs only in
+ # accepting a max argument for xrange(startrev+1,...) defaulting
+ # to the original repo.changelog.count()
if start is None:
start = node.nullid
if stop is None: