# HG changeset patch # User Pierre-Yves David # Date 1495208007 -7200 # Node ID a8fea2ae3c0bcfd1eaf85200833a7c5cd1e05e44 # Parent 48f03698304a9828f4803f38aa6e7a10ab722af1 prune: prevent a color related crash when the working copy is moved This was not caught by test because they run color less. diff --git a/README b/README --- a/README +++ b/README @@ -112,6 +112,11 @@ Changelog ========= +6.2.1 - in progress +------------------- + +- prune: fix a crash related to color handling, + 6.2.0 -- 2017-05-18 ------------------- diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py +++ b/hgext3rd/evolve/__init__.py @@ -2271,7 +2271,7 @@ repo._bookmarks.recordchange(tr) commands.update(ui, repo, newnode.rev()) ui.status(_('working directory now at %s\n') - % ui.label(newnode, 'evolve.node')) + % ui.label(str(newnode), 'evolve.node')) if movebookmark: bookmarksmod.activate(repo, bookactive) diff --git a/tests/test-prune.t b/tests/test-prune.t --- a/tests/test-prune.t +++ b/tests/test-prune.t @@ -71,10 +71,12 @@ pruning multiple changeset at once - $ hg prune 2: - 0 files updated, 0 files merged, 3 files removed, 0 files unresolved - working directory now at 1f0dee641bb7 - 2 changesets pruned +(add color output to test it does not crash) + + $ hg prune 2: --color debug + [ ui.status|0 files updated, 0 files merged, 3 files removed, 0 files unresolved] + [ ui.status|working directory now at [evolve.node|1f0dee641bb7]] + [ ui.status|2 changesets pruned] $ hg debugobsolete 9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'} 7c3bad9141dcb46ff89abf5f61856facd56e476c 0 {1f0dee641bb7258c56bd60e93edfa2405381c41e} (*) {'user': 'test'} (glob)