D12417: tests: add test for rebasing commit after amending rename into parent
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Mar 30 04:19:03 UTC 2022
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This adds a test for
https://bz.mercurial-scm.org/show_bug.cgi?id=5457.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12417
AFFECTED FILES
tests/test-copies.t
CHANGE DETAILS
diff --git a/tests/test-copies.t b/tests/test-copies.t
--- a/tests/test-copies.t
+++ b/tests/test-copies.t
@@ -746,3 +746,34 @@
$ hg graft -r 6 --base 4 --hidden -t :other
grafting 6:99802e4f1e46 "added willconflict and d" (tip) (no-changeset !)
grafting 6:b19f0df72728 "added willconflict and d" (tip) (changeset !)
+
+Test rebasing a commit after amending rename of added file into its parent
+(issue 5457)
+
+ $ cat << EOF >> $HGRCPATH
+ > [experimental]
+ > evolution.createmarkers = True
+ > evolution.allowunstable = True
+ > EOF
+ $ newrepo
+ $ echo a > a
+ $ hg add a
+ $ hg ci -m "added a"
+ $ echo b > b
+ $ hg add b
+ $ hg ci -m "added b"
+ $ echo modified > b
+ $ hg ci -m "modified b"
+ $ hg co '.^'
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg mv b c
+ $ hg ci --amend -m "added c"
+ 1 new orphan changesets
+ $ hg rebase -s 'desc("modified b")' -d .
+ rebasing 2:e3e0011b43ad "modified b" (changeset !)
+ rebasing 2:2612b8963c3f "modified b" (no-changeset !)
+ file 'b' was deleted in local [dest] but was modified in other [source].
+ You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+ What do you want to do? u
+ unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
+ [240]
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list