From 61fb81b963c1adb0abb08239c24fa4ee39c5929a Mon Sep 17 00:00:00 2001 Message-Id: <61fb81b963c1adb0abb08239c24fa4ee39c5929a.1746775797.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 17 Apr 2008 21:49:29 +0100 Subject: [PATCH] Fix the sync'ing of unapplied patches only Organization: Straylight/Edgeware From: Catalin Marinas When only unapplied patches are to be sync'ed, the command failed because the first patch was trying to be pushed twice. Signed-off-by: Catalin Marinas --- stgit/commands/sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stgit/commands/sync.py b/stgit/commands/sync.py index ae9a5f8..a04ff82 100644 --- a/stgit/commands/sync.py +++ b/stgit/commands/sync.py @@ -136,11 +136,13 @@ def func(parser, options, args): to_pop = applied[applied.index(first_patch) + 1:] if to_pop: pop_patches(crt_series, to_pop[::-1]) + pushed = [first_patch] else: to_pop = [] + pushed = [] popped = to_pop + [p for p in patches if p in unapplied] - for p in [first_patch] + popped: + for p in pushed + popped: if p in popped: # push this patch push_patches(crt_series, [p]) -- [mdw]