License hg-reset.py under GPLv2 as it uses mercurial code
authorRocco Rutte <pdmef@gmx.net>
Mon, 19 Mar 2007 09:18:20 +0000 (09:18 +0000)
committerRocco Rutte <pdmef@gmx.net>
Mon, 19 Mar 2007 09:18:20 +0000 (09:18 +0000)
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
hg-fast-export.txt
hg-reset.py

index 2fdabab..1b8bb1c 100644 (file)
@@ -3,14 +3,15 @@ hg-fast-import.(sh|py) - mercurial to git converter using git-fast-import
 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
@@ -19,6 +20,14 @@ Using it is quite simple for a mercurial repository <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.
+
 Notes/Limitations
 =================
 
index 8e1fa87..6b84a37 100755 (executable)
@@ -1,7 +1,7 @@
 #!/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
@@ -9,6 +9,9 @@ from optparse import OptionParser
 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: