1. Yuya Nishihara
  2. thg-work

Commits

Yuya Nishihara  committed 31c0efa

backout: remember autoresolve check if not specified by hgrc file

  • Participants
  • Parent commits 99a71f5
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/backout.py

View file
 
     def __init__(self, repoagent, rev, parent=None):
         super(BackoutDialog, self).__init__(parent)
+        self._repoagent = repoagent
         f = self.windowFlags()
         self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)
 
         qs.beginGroup('backout')
         for n in ['autoadvance', 'skiplast']:
             self.setField(n, qs.value(n, False))
+        repo = self._repoagent.rawRepo()
+        n = 'autoresolve'
+        self.setField(n, repo.ui.configbool('tortoisehg', n,
+                                            qs.value(n).toBool()))
         qs.endGroup()
 
     def _writeSettings(self):
         qs = QSettings()
         qs.beginGroup('backout')
-        for n in ['autoadvance', 'skiplast']:
+        for n in ['autoadvance', 'autoresolve', 'skiplast']:
             qs.setValue(n, self.field(n))
         qs.endGroup()
 
         ## auto-resolve
         autoresolve_chk = QCheckBox(_('Automatically resolve merge conflicts '
                                       'where possible'))
-        autoresolve_chk.setChecked(
-            repo.ui.configbool('tortoisehg', 'autoresolve', False))
         self.registerField('autoresolve', autoresolve_chk)
         self.layout().addWidget(autoresolve_chk)
         self.autoresolve_chk = autoresolve_chk