Mercurial > hg
changeset 23518:2fb0504b8175
rebase: show warning when rebase creates no changes to commit
Similar to graft:
note: rebase of 6:eea13746799a created no changes to commit
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 10 Dec 2014 06:20:35 +0100 |
parents | 4f18e80d9c30 |
children | 8872d1bf30da |
files | hgext/rebase.py tests/test-rebase-abort.t tests/test-rebase-cache.t tests/test-rebase-collapse.t tests/test-rebase-detach.t tests/test-rebase-mq-skip.t tests/test-rebase-mq.t tests/test-rebase-named-branches.t tests/test-rebase-newancestor.t tests/test-rebase-obsolete.t tests/test-rebase-parameters.t tests/test-rebase-rename.t tests/test-rebase-scenario-global.t tests/test-shelve.t |
diffstat | 14 files changed, 59 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Dec 09 03:45:26 2014 +0100 +++ b/hgext/rebase.py Wed Dec 10 06:20:35 2014 +0100 @@ -412,8 +412,9 @@ if newnode is not None: state[rev] = repo[newnode].rev() else: + ui.warn(_('note: rebase of %d:%s created no changes ' + 'to commit\n') % (rev, ctx)) if not collapsef: - ui.note(_('no changes, revision %d skipped\n') % rev) ui.debug('next revision set to %s\n' % p1) skipped.add(rev) state[rev] = p1
--- a/tests/test-rebase-abort.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-abort.t Wed Dec 10 06:20:35 2014 +0100 @@ -162,6 +162,7 @@ $ hg rebase -b 4 -d 2 rebasing 3:a6484957d6b9 "B bis" + note: rebase of 3:a6484957d6b9 created no changes to commit rebasing 4:145842775fec "C1" (tip) merging c warning: conflicts during merge.
--- a/tests/test-rebase-cache.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-cache.t Wed Dec 10 06:20:35 2014 +0100 @@ -234,6 +234,7 @@ $ hg rebase -s 7 -d 6 rebasing 7:653b9feb4616 "branch3" + note: rebase of 7:653b9feb4616 created no changes to commit rebasing 8:4666b71e8e32 "F" (tip) saved backup bundle to $TESTTMP/a3/.hg/strip-backup/653b9feb4616-backup.hg (glob)
--- a/tests/test-rebase-collapse.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-collapse.t Wed Dec 10 06:20:35 2014 +0100 @@ -60,8 +60,11 @@ > EOF $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e rebasing 1:42ccdea3bb16 "B" + note: rebase of 1:42ccdea3bb16 created no changes to commit rebasing 2:5fddd98957c8 "C" + note: rebase of 2:5fddd98957c8 created no changes to commit rebasing 3:32af7686d403 "D" + note: rebase of 3:32af7686d403 created no changes to commit ==== before editing Collapsed revision * B @@ -117,7 +120,9 @@ $ hg phase --force --secret 6 $ hg rebase --source 4 --collapse rebasing 4:9520eea781bc "E" + note: rebase of 4:9520eea781bc created no changes to commit rebasing 6:eea13746799a "G" + note: rebase of 6:eea13746799a created no changes to commit saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-backup.hg (glob) $ hg tglog @@ -159,7 +164,9 @@ > EOF $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e rebasing 4:9520eea781bc "E" + note: rebase of 4:9520eea781bc created no changes to commit rebasing 6:eea13746799a "G" + note: rebase of 6:eea13746799a created no changes to commit HGEDITFORM=rebase.collapse saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-backup.hg (glob) @@ -269,8 +276,11 @@ $ hg rebase -s 4 --collapse # root (4) is not a merge rebasing 4:8a5212ebc852 "E" + note: rebase of 4:8a5212ebc852 created no changes to commit rebasing 5:7f219660301f "F" + note: rebase of 5:7f219660301f created no changes to commit rebasing 6:c772a8b2dc17 "G" + note: rebase of 6:c772a8b2dc17 created no changes to commit saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-backup.hg (glob) $ hg tglog @@ -420,10 +430,14 @@ $ hg rebase -s 4 --collapse # root (4) is not a merge rebasing 4:8a5212ebc852 "E" + note: rebase of 4:8a5212ebc852 created no changes to commit rebasing 5:dca5924bb570 "F" merging E + note: rebase of 5:dca5924bb570 created no changes to commit rebasing 6:55a44ad28289 "G" + note: rebase of 6:55a44ad28289 created no changes to commit rebasing 7:417d3b648079 "H" + note: rebase of 7:417d3b648079 created no changes to commit saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-backup.hg (glob) $ hg tglog @@ -514,9 +528,13 @@ $ hg rebase -s 1 --collapse rebasing 1:27547f69f254 "B" + note: rebase of 1:27547f69f254 created no changes to commit rebasing 2:f838bfaca5c7 "C" + note: rebase of 2:f838bfaca5c7 created no changes to commit rebasing 3:7bbcd6078bcc "D" + note: rebase of 3:7bbcd6078bcc created no changes to commit rebasing 4:0a42590ed746 "E" + note: rebase of 4:0a42590ed746 created no changes to commit saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-backup.hg (glob) $ hg tglog @@ -602,6 +620,7 @@ $ hg rebase -s 5 -d 4 rebasing 5:fbfb97b1089a "E" (tip) + note: rebase of 5:fbfb97b1089a created no changes to commit saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-backup.hg (glob) $ hg tglog @ 4: 'E' @@ -657,9 +676,11 @@ merging a and d to d merging b and e to e merging c and f to f + note: rebase of 2:6e7340ee38c0 created no changes to commit rebasing 3:338e84e2e558 "move2" (tip) merging f and c to c merging e and g to g + note: rebase of 3:338e84e2e558 created no changes to commit saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-backup.hg (glob) $ hg st $ hg st --copies --change tip @@ -700,7 +721,9 @@ $ hg rebase --collapse -b . -d 0 rebasing 1:1352765a01d4 "change" + note: rebase of 1:1352765a01d4 created no changes to commit rebasing 2:64b456429f67 "Collapsed revision" (tip) + note: rebase of 2:64b456429f67 created no changes to commit saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-backup.hg (glob) $ hg st --change tip --copies M a @@ -792,7 +815,9 @@ $ hg book foo $ hg rebase -d 0 -r "1::2" --collapse -m collapsed rebasing 1:6d8d9f24eec3 "a" + note: rebase of 1:6d8d9f24eec3 created no changes to commit rebasing 2:1cc73eca5ecc "b" (tip foo) + note: rebase of 2:1cc73eca5ecc created no changes to commit saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-backup.hg (glob) $ hg log -G --template "{rev}: '{desc}' {bookmarks}" @ 1: 'collapsed' foo
--- a/tests/test-rebase-detach.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-detach.t Wed Dec 10 06:20:35 2014 +0100 @@ -212,7 +212,9 @@ $ hg rebase --collapse -s 2 -d 7 rebasing 2:5fddd98957c8 "C" + note: rebase of 2:5fddd98957c8 created no changes to commit rebasing 3:32af7686d403 "D" + note: rebase of 3:32af7686d403 created no changes to commit saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-backup.hg (glob) $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" @@ -339,8 +341,11 @@ $ hg rebase -s 8 -d 7 --collapse --config ui.merge=internal:other rebasing 8:9790e768172d "I" + note: rebase of 8:9790e768172d created no changes to commit rebasing 9:5d7b11f5fb97 "Merge" + note: rebase of 9:5d7b11f5fb97 created no changes to commit rebasing 10:9427d4d5af81 "J" (tip) + note: rebase of 10:9427d4d5af81 created no changes to commit saved backup bundle to $TESTTMP/a6/.hg/strip-backup/9790e768172d-backup.hg (glob) $ hg tglog @@ -394,6 +399,7 @@ (no more unresolved files) $ hg rebase -c rebasing 8:6215fafa5447 "H2" (tip) + note: rebase of 8:6215fafa5447 created no changes to commit saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob) $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" @ 7:draft 'H'
--- a/tests/test-rebase-mq-skip.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-mq-skip.t Wed Dec 10 06:20:35 2014 +0100 @@ -52,6 +52,7 @@ $ hg rebase rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) rebasing 3:148775c71080 "P1" (p1.patch qtip) + note: rebase of 3:148775c71080 created no changes to commit saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob) $ hg tglog @@ -110,8 +111,10 @@ $ HGMERGE=internal:fail hg rebase rebasing 1:b4bffa6e4776 "r1" (1.diff qbase) + note: rebase of 1:b4bffa6e4776 created no changes to commit rebasing 2:c0fd129beb01 "r2" (2.diff) rebasing 3:6ff5b8feed8e "r3" (3.diff) + note: rebase of 3:6ff5b8feed8e created no changes to commit rebasing 4:094320fec554 "r4" (4.diff) unresolved conflicts (see hg resolve, then hg rebase --continue) [1] @@ -124,8 +127,10 @@ already rebased 2:c0fd129beb01 "r2" (2.diff) as 1660ab13ce9a already rebased 3:6ff5b8feed8e "r3" (3.diff) as 1660ab13ce9a rebasing 4:094320fec554 "r4" (4.diff) + note: rebase of 4:094320fec554 created no changes to commit rebasing 5:681a378595ba "r5" (5.diff) rebasing 6:512a1f24768b "r6" (6.diff qtip) + note: rebase of 6:512a1f24768b created no changes to commit saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob) $ hg tglog
--- a/tests/test-rebase-mq.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-mq.t Wed Dec 10 06:20:35 2014 +0100 @@ -337,6 +337,7 @@ foo $ [ -f .hg/patches/empty-important ] $ hg -q rebase -d 2 + note: rebase of 1:0aaf4c3af7eb created no changes to commit $ hg qseries guarded bar
--- a/tests/test-rebase-named-branches.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-named-branches.t Wed Dec 10 06:20:35 2014 +0100 @@ -98,6 +98,7 @@ $ hg rebase -s dev-one -d 0 --keepbranches rebasing 5:643fc9128048 "dev-one named branch" + note: rebase of 5:643fc9128048 created no changes to commit rebasing 6:24de4aff8e28 "F" rebasing 7:4b988a958030 "G" rebasing 8:31d0e4ba75e6 "H" @@ -181,6 +182,7 @@ $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches rebasing 5:643fc9128048 "dev-one named branch" + note: rebase of 5:643fc9128048 created no changes to commit rebasing 6:05584c618d45 "F" rebasing 7:471695f5257d "G" rebasing 8:8382a539a2df "H"
--- a/tests/test-rebase-newancestor.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-newancestor.t Wed Dec 10 06:20:35 2014 +0100 @@ -128,6 +128,7 @@ $ hg rebase -r 'only(dev,default)' -d default rebasing 1:1d1a643d390e "dev: create branch" + note: rebase of 1:1d1a643d390e created no changes to commit rebasing 2:ec2c14fb2984 "dev: f-dev stuff" rebasing 4:4b019212aaf6 "dev: merge default" remote changed f-default which local deleted
--- a/tests/test-rebase-obsolete.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-obsolete.t Wed Dec 10 06:20:35 2014 +0100 @@ -125,8 +125,10 @@ grafting 3:32af7686d403 "D" $ hg rebase -s 42ccdea3bb16 -d . rebasing 1:42ccdea3bb16 "B" + note: rebase of 1:42ccdea3bb16 created no changes to commit rebasing 2:5fddd98957c8 "C" rebasing 3:32af7686d403 "D" + note: rebase of 3:32af7686d403 created no changes to commit $ hg log -G o 10:5ae4c968c6ac C | @@ -204,6 +206,7 @@ $ hg rebase --source 'desc(B)' --dest 'tip' rebasing 8:8877864f1edb "B" rebasing 9:08483444fef9 "D" + note: rebase of 9:08483444fef9 created no changes to commit rebasing 10:5ae4c968c6ac "C" $ hg debugobsolete 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (*) {'user': 'test'} (glob) @@ -258,8 +261,11 @@ $ cd collapse $ hg rebase -s 42ccdea3bb16 -d eea13746799a --collapse rebasing 1:42ccdea3bb16 "B" + note: rebase of 1:42ccdea3bb16 created no changes to commit rebasing 2:5fddd98957c8 "C" + note: rebase of 2:5fddd98957c8 created no changes to commit rebasing 3:32af7686d403 "D" + note: rebase of 3:32af7686d403 created no changes to commit $ hg log -G o 8:4dc2197e807b Collapsed revision |
--- a/tests/test-rebase-parameters.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-parameters.t Wed Dec 10 06:20:35 2014 +0100 @@ -438,6 +438,7 @@ $ hg rebase -s 2 -d 1 --tool internal:local rebasing 2:e4e3f3546619 "c2b" (tip) + note: rebase of 2:e4e3f3546619 created no changes to commit saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-backup.hg (glob) $ hg cat c2 @@ -485,6 +486,7 @@ $ hg rebase -c --tool internal:fail tool option will be ignored rebasing 2:e4e3f3546619 "c2b" (tip) + note: rebase of 2:e4e3f3546619 created no changes to commit saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-backup.hg (glob) $ hg rebase -i
--- a/tests/test-rebase-rename.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-rename.t Wed Dec 10 06:20:35 2014 +0100 @@ -310,10 +310,13 @@ created new head $ hg rebase -s 2 --dest 5 --collapse rebasing 2:68bf06433839 "File b created as copy of a and modified" + note: rebase of 2:68bf06433839 created no changes to commit rebasing 3:af74b229bc02 "File c created as copy of b and modified" merging b and c to c + note: rebase of 3:af74b229bc02 created no changes to commit rebasing 4:dbb9ba033561 "File d created as copy of c and modified" merging c and d to d + note: rebase of 4:dbb9ba033561 created no changes to commit saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-backup.hg (glob) $ hg co tip 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-rebase-scenario-global.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-rebase-scenario-global.t Wed Dec 10 06:20:35 2014 +0100 @@ -121,6 +121,7 @@ $ hg rebase -s 4 -d 7 rebasing 4:9520eea781bc "E" rebasing 6:eea13746799a "G" + note: rebase of 6:eea13746799a created no changes to commit saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-backup.hg (glob) $ hg tglog @@ -149,6 +150,7 @@ $ hg rebase -s 5 -d 4 rebasing 5:24b6387c8c8c "F" rebasing 6:eea13746799a "G" + note: rebase of 6:eea13746799a created no changes to commit rebasing 7:02de42196ebe "H" (tip) saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-backup.hg (glob)
--- a/tests/test-shelve.t Tue Dec 09 03:45:26 2014 +0100 +++ b/tests/test-shelve.t Wed Dec 10 06:20:35 2014 +0100 @@ -387,6 +387,7 @@ rebasing shelved changes rebasing 6:c5e6910e7601 "changes to 'second'" (tip) merging a/a + note: rebase of 6:c5e6910e7601 created no changes to commit $ hg parents -q 4:33f7f61e6c5e $ hg shelve -l @@ -724,6 +725,7 @@ (no more unresolved files) $ hg unshelve -c rebasing 5:4b555fdb4e96 "changes to 'second'" (tip) + note: rebase of 5:4b555fdb4e96 created no changes to commit unshelve of 'default' complete $ hg diff $ hg status