+ out.start('Importing commit %s' % commit_id)
+
+ newpatch = crt_series.new_patch(patchname, message = message, can_edit = False,
+ unapplied = True, bottom = bottom, top = top,
+ author_name = author_name,
+ author_email = author_email,
+ author_date = author_date)
+ # find a patchlog to fork from
+ (refpatchname, refbranchname, refpatchid) = parse_rev(commit_str)
+ if refpatchname and not refpatchid and \
+ (not refpatchid or refpatchid == 'top'):
+ # FIXME: should also support picking //top.old
+ if refbranchname:
+ # assume the refseries is OK, since we already resolved
+ # commit_str to a git_id
+ refseries = Series(refbranchname)
+ else:
+ refseries = crt_series
+ patch = refseries.get_patch(refpatchname)
+ if patch.get_log():
+ out.info("Log was %s" % newpatch.get_log())
+ out.info("Setting log to %s\n" % patch.get_log())
+ newpatch.set_log(patch.get_log())
+ out.info("Log is now %s" % newpatch.get_log())
+ else:
+ out.info("No log for %s\n" % patchname)