Bug 5822 - rebase --abort loses commits that didn't need to be rebased
Summary: rebase --abort loses commits that didn't need to be rebased
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: rebase (show other bugs)
Version: 4.5.2
Hardware: PC Mac OS
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 00:12 UTC by Martin von Zweigbergk
Modified: 2018-03-27 00:00 UTC (History)
1 user (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Zweigbergk 2018-03-16 00:12 UTC
Part of a repro .t file:

  $ hg debugdrawdag <<EOF
  > C
  > |
  > B D  # B/file = B
  > |/   # D/file = D
  > A
  > EOF
  $ hg rebase -r C+D -d B
  rebasing 2:ef8c0fe0897b "D" (D)
  merging file
  warning: conflicts while merging file! (edit, then use 'hg resolve --mark')
  unresolved conflicts (see hg resolve, then hg rebase --continue)
  [1]
  $ hg rebase --abort
  saved backup bundle to $TESTTMP/abort/.hg/strip-backup/79f6d6ab7b14-cce2340e-backup.hg
  rebase aborted


Here C gets lost
Comment 1 HG Bot 2018-03-19 21:50 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/177f3b90335f
Martin von Zweigbergk <martinvonz@google.com>
rebase: on abort, don't strip commits that didn't need rebased (issue5822)

I clearly missed adding this condition in 78496ac30025 (rebase: allow
rebase even if some revisions need no rebase (BC) (issue5422),
2017-05-11). Perhaps I should have opted for the "revdone" solution I
mentioned there...

Differential Revision: https://phab.mercurial-scm.org/D2879

(please test the fix)
Comment 2 Bugzilla 2018-03-27 00:00 UTC
Bug was set to TESTING for 7 days, resolving