+ if not git.apply_diff(bottom, top, files = files):
+ raise CmdException, 'Patch updating failed'
+
+ print 'done'
+ else:
+ message = commit.get_log()
+ author_name, author_email, author_date = \
+ name_email_date(commit.get_author())
+
+ print 'Importing commit %s...' % commit_id,
+ sys.stdout.flush()
+
+ crt_series.new_patch(patch, message = message, can_edit = False,
+ unapplied = True, bottom = bottom, top = top,
+ author_name = author_name,
+ author_email = author_email,
+ author_date = author_date)
+ modified = crt_series.push_patch(patch)
+
+ if crt_series.empty_patch(patch):
+ print 'done (empty patch)'
+ elif modified:
+ print 'done (modified)'
+ else:
+ print 'done'
+