mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-05-07 01:06:03 +02:00
gitrange(): always check negatives first
Also, always add the parents as negatives. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -487,19 +487,17 @@ def gitrange(repo, a, b):
|
||||
|
||||
parents = [p for p in pfunc(cur) if p >= 0]
|
||||
|
||||
if cur in pending:
|
||||
if cur in negative:
|
||||
negative.remove(cur)
|
||||
for p in parents:
|
||||
negative.add(p)
|
||||
pending.discard(p)
|
||||
elif cur in pending:
|
||||
positive.append(cur)
|
||||
pending.remove(cur)
|
||||
for p in parents:
|
||||
if p not in negative:
|
||||
pending.add(p)
|
||||
elif cur in negative:
|
||||
negative.remove(cur)
|
||||
for p in parents:
|
||||
if p not in pending:
|
||||
negative.add(p)
|
||||
else:
|
||||
pending.discard(p)
|
||||
|
||||
positive.reverse()
|
||||
return positive
|
||||
|
||||
Reference in New Issue
Block a user