Patchwork D5494: histedit: add user input to warning message on editing tagged commits

login
register
mail settings
Submitter phabricator
Date Jan. 9, 2019, 8 p.m.
Message ID <068ea03b95afc4618fab50a3c542432b@localhost.localdomain>
Download mbox | patch
Permalink /patch/37585/
State Not Applicable
Headers show

Comments

phabricator - Jan. 9, 2019, 8 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7b7e081f8954: histedit: add user input to warning message on editing tagged commits (authored by navaneeth.suresh, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D5494?vs=13016&id=13104#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5494?vs=13016&id=13104

REVISION DETAIL
  https://phab.mercurial-scm.org/D5494

AFFECTED FILES
  hgext/histedit.py

CHANGE DETAILS




To: navaneeth.suresh, durin42, #hg-reviewers
Cc: yuja, mharbison72, mercurial-devel

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -194,7 +194,6 @@ 
 import functools
 import os
 import struct
-import time
 
 from mercurial.i18n import _
 from mercurial import (
@@ -1702,9 +1701,10 @@ 
             if not hastags:
                 hastags = len(tags)
     if hastags:
-        ui.warn(_('warning: tags associated with the given changeset '
-        'will be lost after histedit \n'))
-        time.sleep(1)
+        if ui.promptchoice(_('warning: tags associated with the given'
+            ' changeset will be lost after histedit. \n'
+            'do you want to continue (yN)? $$ &Yes $$ &No'), default=1):
+            raise error.Abort(_('histedit cancelled\n'))
     # rebuild state
     if goal == goalcontinue:
         state.read()