*** reposurgeon-0.3/reposurgeon 2010-11-07 15:49:17.000000000 +0000
--- reposurgeon/reposurgeon 2010-11-08 10:06:00.282948809 +0000
***************
*** 51,59 ****
"git checkout"),
# FIXME: hg and bzr methods are untested
"hg" : (".hg",
! "hg-fast-export.sh %s", # Not part of stock hg
"hg init",
! "hg fast-import %s", # Not part of stock hg
"hg checkout"),
"bzr" : (".bzr",
"bzr fast-export --plain %s",
--- 51,59 ----
"git checkout"),
# FIXME: hg and bzr methods are untested
"hg" : (".hg",
! "hg-fast-export.py --marks /dev/null --mapping /dev/null --heads /dev/null --status /dev/null --repo .", # Not part of stock hg
"hg init",
! "hg fastimport %s", # Not part of stock hg
"hg checkout"),
"bzr" : (".bzr",
"bzr fast-export --plain %s",
***************
*** 580,585 ****
--- 580,590 ----
self.error("bad count in data")
else:
self.error("malformed data header %s" % `line`)
+
+ line = readline()
+ if line != '\n':
+ pushback(line) # Data commands may optionally end with LF
+
return dp
def readline():
if linebuffers:
***************
*** 658,674 ****
break
else:
self.error("no blob matches commit reference to %s" % fileop.ref)
! elif fileop.ref[0] == 'inline':
! fileop.copyname = self.subdir() + "/inline-" + `id(self)` + "-" + `inline_count`
! self.read_data(open(fileop.copyname, "w")).close()
! inline_count += 1
else:
self.error("unknown content type in filemodify")
# Handling of file ops ends.
else:
pushback(line)
break
! if not (commit.mark and commit.author and commit.committer):
self.import_line = commitbegin
self.error("missing required fields in commit")
self.events.append(commit)
--- 663,686 ----
break
else:
self.error("no blob matches commit reference to %s" % fileop.ref)
! elif fileop.ref == 'inline':
! fileop.copyname = self.subdir() + "/inline-" + `id(self)` + "-" + `inlinecount`
! read_data(open(fileop.copyname, "w")).close()
! inlinecount += 1
else:
self.error("unknown content type in filemodify")
# Handling of file ops ends.
else:
pushback(line)
break
!
! if not commit.author:
! commit.author = commit.committer
! # git-fast-import(1) says the author command is not
! # mandatory, and importers should use the committer
! # info if it is ommitted.
!
! if not (commit.mark and commit.committer):
self.import_line = commitbegin
self.error("missing required fields in commit")
self.events.append(commit)