equal
deleted
inserted
replaced
922 destf = str(dest) |
922 destf = str(dest) |
923 |
923 |
924 roots = [] # selected children of branching points |
924 roots = [] # selected children of branching points |
925 bpbase = {} # {branchingpoint: [origbase]} |
925 bpbase = {} # {branchingpoint: [origbase]} |
926 for b in base: # group bases by branching points |
926 for b in base: # group bases by branching points |
927 bp = repo.revs('ancestor(%d, %d)', b, dest).first() |
927 bp = repo.revs('ancestor(%d, %d)', b, dest.rev()).first() |
928 bpbase[bp] = bpbase.get(bp, []) + [b] |
928 bpbase[bp] = bpbase.get(bp, []) + [b] |
929 if None in bpbase: |
929 if None in bpbase: |
930 # emulate the old behavior, showing "nothing to rebase" (a better |
930 # emulate the old behavior, showing "nothing to rebase" (a better |
931 # behavior may be abort with "cannot find branching point" error) |
931 # behavior may be abort with "cannot find branching point" error) |
932 bpbase.clear() |
932 bpbase.clear() |
944 ui.status(_('nothing to rebase - %s is both "base"' |
944 ui.status(_('nothing to rebase - %s is both "base"' |
945 ' and destination\n') % dest) |
945 ' and destination\n') % dest) |
946 else: |
946 else: |
947 ui.status(_('nothing to rebase - working directory ' |
947 ui.status(_('nothing to rebase - working directory ' |
948 'parent is also destination\n')) |
948 'parent is also destination\n')) |
949 elif not repo.revs('%ld - ::%d', base, dest): |
949 elif not repo.revs('%ld - ::%d', base, dest.rev()): |
950 if basef: |
950 if basef: |
951 ui.status(_('nothing to rebase - "base" %s is ' |
951 ui.status(_('nothing to rebase - "base" %s is ' |
952 'already an ancestor of destination ' |
952 'already an ancestor of destination ' |
953 '%s\n') % |
953 '%s\n') % |
954 ('+'.join(str(repo[r]) for r in base), |
954 ('+'.join(str(repo[r]) for r in base), |