summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFantomas42 <fantomas42@gmail.com>2013-06-21 18:35:38 +0200
committerFantomas42 <fantomas42@gmail.com>2013-06-21 18:35:38 +0200
commit3ff69b5392ffd75ee02cd38826d3ca8a9c738231 (patch)
treeac6197849861f9cb3138b01c3aebaff4b4175e22
parent9a414ca8e240f82c2c7fc0580b1528cdd1d63fc9 (diff)
downloadhg-fast-export-3ff69b5392ffd75ee02cd38826d3ca8a9c738231.tar.gz
Fix mapping option, close #10
-rwxr-xr-xhg-reset.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/hg-reset.py b/hg-reset.py
index 000ed6d..2a36b1d 100755
--- a/hg-reset.py
+++ b/hg-reset.py
@@ -82,6 +82,8 @@ if __name__=='__main__':
parser.add_option("--marks",dest="marksfile",
help="File to read git-fast-import's marks from")
+ parser.add_option("--mapping",dest="mappingfile",
+ help="File to read last run's hg-to-git SHA1 mapping")
parser.add_option("--heads",dest="headsfile",
help="File to read last run's git heads from")
parser.add_option("--status",dest="statusfile",
@@ -94,6 +96,7 @@ if __name__=='__main__':
(options,args)=parser.parse_args()
if options.marksfile==None: bail(parser,'--marks option')
+ if options.mappingfile==None: bail(parser,'--mapping option')
if options.headsfile==None: bail(parser,'--heads option')
if options.statusfile==None: bail(parser,'--status option')
if options.repourl==None: bail(parser,'--repo option')
@@ -102,6 +105,7 @@ if __name__=='__main__':
heads_cache=load_cache(options.headsfile)
marks_cache=load_cache(options.marksfile,mangle_mark)
state_cache=load_cache(options.statusfile)
+ mapping_cache = load_cache(options.mappingfile)
l=int(state_cache.get('tip',options.revision))
if options.revision+1>l: