From: Catalin Marinas Date: Wed, 28 Jan 2009 23:07:37 +0000 (+0000) Subject: Merge branch 'stable' X-Git-Tag: v0.15-rc1~49 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/baf8241d1b7835ba31125d2b75683601ee2b0403 Merge branch 'stable' Conflicts: stgit/commands/files.py stgit/commands/mail.py stgit/git.py --- baf8241d1b7835ba31125d2b75683601ee2b0403 diff --cc stgit/commands/files.py index 84925af,af772b8..a2ed6a2 --- a/stgit/commands/files.py +++ b/stgit/commands/files.py @@@ -55,16 -57,18 +55,17 @@@ def func(parser, options, args) else: parser.error('incorrect number of arguments') - if options.diff_opts: - diff_flags = options.diff_opts.split() - else: - diff_flags = [] - - rev1 = git_id(crt_series, '%s//bottom' % patch) - rev2 = git_id(crt_series, '%s//top' % patch) + rev1 = git_id(crt_series, '%s^' % patch) + rev2 = git_id(crt_series, '%s' % patch) if options.stat: - output = gitlib.diffstat(git.diff(rev1 = rev1, rev2 = rev2)) - out.stdout_raw(git.diffstat(rev1 = rev1, rev2 = rev2, - diff_flags = diff_flags) + '\n') ++ output = gitlib.diffstat(git.diff(rev1 = rev1, rev2 = rev2, ++ diff_flags = options.diff_flags)) elif options.bare: - out.stdout_raw(git.barefiles(rev1, rev2) + '\n') + output = git.barefiles(rev1, rev2) else: - out.stdout_raw(git.files(rev1, rev2, diff_flags = diff_flags) + '\n') + output = git.files(rev1, rev2, diff_flags = options.diff_flags) + if output: + if not output.endswith('\n'): + output += '\n' + out.stdout_raw(output) diff --cc stgit/commands/mail.py index cab896b,2230d2a..46e4b55 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@@ -402,9 -366,10 +402,10 @@@ def __build_cover(tmpl, patches, msg_id 'number': number_str, 'shortlog': stack.shortlog(crt_series.get_patch(p) for p in patches), - 'diffstat': git.diffstat( - rev1 = git_id(crt_series, '%s//bottom' % patches[0]), - rev2 = git_id(crt_series, '%s//top' % patches[-1]), - diff_flags = diff_flags)} + 'diffstat': gitlib.diffstat(git.diff( + rev1 = git_id(crt_series, '%s^' % patches[0]), - rev2 = git_id(crt_series, '%s' % patches[-1])))} ++ rev2 = git_id(crt_series, '%s' % patches[-1]), ++ diff_flags = options.diff_flags))} try: msg_string = tmpl % tmpl_dict