X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/011cbd1b417a29bbcb189f86833bac773ba4a6f7..680e3a32c2dbda533837893336d3b7d7f3c439a6:/stgit/commands/push.py diff --git a/stgit/commands/push.py b/stgit/commands/push.py index 6fbd779..c653ce7 100644 --- a/stgit/commands/push.py +++ b/stgit/commands/push.py @@ -116,7 +116,18 @@ def func(parser, options, args): if options.reverse: patches.reverse() - for p in patches: + print 'Trying fast-forward...' + + forwarded = crt_series.forward_patches(patches) + if forwarded > 1: + print 'Fast-forwarded patches "%s" - "%s"' % (patches[0], + patches[forwarded - 1]) + elif forwarded == 1: + print 'Fast-forwarded patch "%s"' % patches[0] + else: + print 'Fast-forwarding failed, using normal pushing' + + for p in patches[forwarded:]: if p not in unapplied: raise CmdException, 'Patch "%s" not unapplied' % p