mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
absorb: skip obsolete commits in the stack
Summary: The case that I met was like the following DAG, and I'd like to skip those `Landed` commits when running `hg ab` since they already landed. ``` ╷ o zzz Apr 21 at 18:18 zhaolong ╷ │ commit zzz ╷ │ ╷ o yyy Apr 21 at 17:18 zhaolong ╷ │ commit yyy ╷ │ ╷ x ccc [Landed as ddd] Apr 21 at 9:00 zhaolong ╷ ╷ commit bbb ╷ ╷ ╷ x aaa [Landed as bbb] Apr 12 at 08:00 zhaolong ╭─╯ commit aaa ``` Reviewed By: sggutier Differential Revision: D45184140 fbshipit-source-id: a539468843032d41ab4d61e5c461b9a1de53cb40
This commit is contained in:
parent
733ec587f4
commit
25e8cf5efc
@ -119,7 +119,7 @@ def getdraftstack(headctx, limit=None):
|
||||
"""
|
||||
ctx = headctx
|
||||
result = []
|
||||
while ctx.phase() != phases.public:
|
||||
while ctx.phase() != phases.public and not ctx.obsolete():
|
||||
if limit and len(result) >= limit:
|
||||
break
|
||||
if len(ctx.parents()) > 1:
|
||||
|
Loading…
Reference in New Issue
Block a user