diff --git a/hgext3rd/tweakdefaults.py b/hgext3rd/tweakdefaults.py --- a/hgext3rd/tweakdefaults.py +++ b/hgext3rd/tweakdefaults.py @@ -674,7 +674,8 @@ # oldnode was not updated if newnodes is an iterable if len(newnodes) == 1: newnode = newnodes[0] - firstline = repo[newnode].description().split("\n")[0][:50] + firstline = encoding.trim( + repo[newnode].description().split("\n")[0], 50, '...') repo.ui.status(_("%s -> %s \"%s\"\n") % ( short(oldnode), short(newnode), firstline)) diff --git a/tests/test-tweakdefaults.t b/tests/test-tweakdefaults.t --- a/tests/test-tweakdefaults.t +++ b/tests/test-tweakdefaults.t @@ -631,6 +631,14 @@ ee71024c6e8c -> 0c42bb4bf23f "2" saved backup bundle to $TESTTMP/showupdated/.hg/strip-backup/6e3ddf6f49ef-4b18babd-rebase.hg (glob) +Test rebase with showupdate=True and a long commit message + $ touch longfile && hg add -q + $ hg commit -qm "This is a long commit message which will be truncated." + $ hg rebase -d 1 + rebasing 14:e915a57d67db "This is a long commit message which will be truncated." (tip) + e915a57d67db -> 5444f740ff6c "This is a long commit message which will be tru..." + saved backup bundle to $TESTTMP/showupdated/.hg/strip-backup/e915a57d67db-ad3372b5-rebase.hg (glob) + Test bookmark -D $ cd $TESTTMP $ hg init book-D