Mercurial > hg
comparison hgext/rebase.py @ 13021:6c800e7ef2f6 stable
rebase: support --detach when null is common ancestor
author | Henrik Stuart <hg@hstuart.dk> |
---|---|
date | Sat, 20 Nov 2010 09:51:56 +0100 |
parents | b19b4c1df066 |
children | 6bf39d88c857 |
comparison
equal
deleted
inserted
replaced
13020:ea3bada953d3 | 13021:6c800e7ef2f6 |
---|---|
483 if detach: | 483 if detach: |
484 # We need to keep track of source's ancestors up to the common base | 484 # We need to keep track of source's ancestors up to the common base |
485 srcancestors = set(repo.changelog.ancestors(source)) | 485 srcancestors = set(repo.changelog.ancestors(source)) |
486 baseancestors = set(repo.changelog.ancestors(commonbase.rev())) | 486 baseancestors = set(repo.changelog.ancestors(commonbase.rev())) |
487 detachset = srcancestors - baseancestors | 487 detachset = srcancestors - baseancestors |
488 detachset.remove(commonbase.rev()) | 488 detachset.discard(commonbase.rev()) |
489 else: | 489 else: |
490 if base: | 490 if base: |
491 cwd = repo[base].rev() | 491 cwd = repo[base].rev() |
492 else: | 492 else: |
493 cwd = repo['.'].rev() | 493 cwd = repo['.'].rev() |