chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable'
[stgit]
/
stgit
/
commands
/
sync.py
diff --git
a/stgit/commands/sync.py
b/stgit/commands/sync.py
index ee63ec64ec073361d9d9e96c563be095b2b59c2a..0e2c18fbf5c320032f31b8e9c92acc01ecf5f869 100644
(file)
--- a/
stgit/commands/sync.py
+++ b/
stgit/commands/sync.py
@@
-108,11
+108,11
@@
def func(parser, options, args):
raise CmdException, 'No remote branch or series specified'
applied = crt_series.get_applied()
raise CmdException, 'No remote branch or series specified'
applied = crt_series.get_applied()
+ unapplied = crt_series.get_unapplied()
if options.all:
patches = applied
elif len(args) != 0:
if options.all:
patches = applied
elif len(args) != 0:
- unapplied = crt_series.get_unapplied()
patches = parse_patches(args, applied + unapplied, len(applied),
ordered = True)
elif applied:
patches = parse_patches(args, applied + unapplied, len(applied),
ordered = True)
elif applied:
@@
-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])
to_pop = applied[applied.index(first_patch) + 1:]
if to_pop:
pop_patches(crt_series, to_pop[::-1])
- p
opped = patches[patches.index(first_patch) + 1:
]
+ p
ushed = [first_patch
]
else:
else:
- popped = patches
+ to_pop = []
+ pushed = []
+ popped = to_pop + [p for p in patches if p in unapplied]
- for p in p
atches
:
+ for p in p
ushed + popped
:
if p in popped:
# push this patch
push_patches(crt_series, [p])
if p in popped:
# push this patch
push_patches(crt_series, [p])