diff --git a/hgext3rd/fbamend/__init__.py b/hgext3rd/fbamend/__init__.py --- a/hgext3rd/fbamend/__init__.py +++ b/hgext3rd/fbamend/__init__.py @@ -106,7 +106,6 @@ amendopts = [ ('', 'rebase', None, _('rebases children after the amend')), ('', 'fixup', None, _('rebase children from a previous amend')), - ('', 'to', '', _('amend to a specific commit in the current stack')), ] def uisetup(ui): @@ -184,7 +183,9 @@ '''amend the current changeset with more changes ''' rebase = opts.get('rebase') - to = opts.get('to') + + # --to is broken - T22281996 + to = False and opts.get('to') if rebase and _histediting(repo): # if a histedit is in flight, it's dangerous to remove old commits diff --git a/tests/test-fbamend-to.t b/tests/test-fbamend-to.t --- a/tests/test-fbamend-to.t +++ b/tests/test-fbamend-to.t @@ -1,3 +1,6 @@ +This feature is just broken right now - T22281996 + $ exit 80 + Set up test environment. $ cat >> $HGRCPATH << EOF > [extensions] diff --git a/tests/test-fbamend.t b/tests/test-fbamend.t --- a/tests/test-fbamend.t +++ b/tests/test-fbamend.t @@ -30,7 +30,6 @@ -i --interactive use interactive mode --rebase rebases children after the amend --fixup rebase children from a previous amend - --to VALUE amend to a specific commit in the current stack -I --include PATTERN [+] include names matching the given patterns -X --exclude PATTERN [+] exclude names matching the given patterns -m --message TEXT use text as commit message diff --git a/tests/test-tweakdefaults.t b/tests/test-tweakdefaults.t --- a/tests/test-tweakdefaults.t +++ b/tests/test-tweakdefaults.t @@ -368,22 +368,13 @@ $ hg log -l 1 -T "{date} {rev}\n" 0.00 8 -Test amend --to doesn't give a flag error when tweakdefaults.amendkeepdate is set - $ echo q > new_file - $ hg amend --to 8 --config tweakdefaults.amendkeepdate=False - hg: parse error: pick "3903775176ed" changeset was not a candidate - (only use listed changesets) - [255] - $ hg log -l 1 -T "{date} {rev}\n" - 0.00 9 - Test commit --amend date when tweakdefaults.amendkeepdate is set $ echo a >> new_file $ hg commit -d "0 0" -Aqm "commit for amend" $ echo x > new_file $ hg commit -q --amend -m "amended message" --config tweakdefaults.amendkeepdate=True $ hg log -l 1 -T "{date} {rev}\n" - 0.00 10 + 0.00 9 Test commit --amend date when tweakdefaults.amendkeepdate is not set and --date is provided $ echo xxx > a @@ -391,7 +382,7 @@ $ echo x > a $ hg commit -q --amend -m "amended message" --date "1 1" $ hg log -l 1 -T "{date} {rev}\n" - 1.01 11 + 1.01 10 Test rebase date when tweakdefaults.rebasekeepdate is not set $ echo test_1 > rebase_dest @@ -403,7 +394,7 @@ $ hg bookmark rebase_source_test_1 $ hg rebase -q -s rebase_source_test_1 -d rebase_dest_test_1 $ hg log -l 1 -T "{rev}\n" -d "yesterday to today" - 13 + 12 Test rebase date when tweakdefaults.rebasekeepdate is set $ echo test_2 > rebase_dest @@ -415,8 +406,8 @@ $ hg bookmark rebase_source_test_2 $ hg rebase -q -s rebase_source_test_2 -d rebase_dest_test_2 --config tweakdefaults.rebasekeepdate=True $ hg log -l 2 -T "{date} {rev}\n" - 0.00 15 0.00 14 + 0.00 13 Test histedit date when tweakdefaults.histeditkeepdate is set $ hg bookmark histedit_test @@ -426,27 +417,27 @@ $ hg commit -Aqm "commit 2 for histedit" $ echo test_3 > histedit_3 $ hg commit -Aqm "commit 3 for histedit" - $ hg histedit 16 --commands - --config tweakdefaults.histeditkeepdate=True 2>&1 <&1 < pick 15 + > pick 17 > pick 16 - > pick 18 - > pick 17 > EOF [1] $ hg log -l 3 -T "{date} {rev} {desc}\n" - 0.00 18 commit 2 for histedit - 0.00 17 commit 3 for histedit - 0.00 16 commit 1 for histedit + 0.00 17 commit 2 for histedit + 0.00 16 commit 3 for histedit + 0.00 15 commit 1 for histedit Test histedit date when tweakdefaults.histeditkeepdate is not set - $ hg histedit 16 --commands - 2>&1 <&1 < pick 15 + > pick 17 > pick 16 - > pick 18 - > pick 17 > EOF [1] $ hg log -l 2 -T "{rev} {desc}\n" -d "yesterday to today" - 18 commit 3 for histedit - 17 commit 2 for histedit + 17 commit 3 for histedit + 16 commit 2 for histedit Test reuse message flag by taking message from previous commit $ cd ../..