mercurial/ui.py
changeset 15919 69e792cf7851
parent 15407 ee112eb69d2a
child 16135 ae5f92e154d3
child 16367 c14898df3b92
--- a/mercurial/ui.py	Tue Jan 17 11:08:23 2012 +0100
+++ b/mercurial/ui.py	Wed Jan 18 16:52:26 2012 +0100
@@ -142,6 +142,15 @@
             self._trustusers.update(self.configlist('trusted', 'users'))
             self._trustgroups.update(self.configlist('trusted', 'groups'))
 
+    def backupconfig(self, section, item):
+        return (self._ocfg.backup(section, item),
+                self._tcfg.backup(section, item),
+                self._ucfg.backup(section, item),)
+    def restoreconfig(self, data):
+        self._ocfg.restore(data[0])
+        self._tcfg.restore(data[1])
+        self._ucfg.restore(data[2])
+
     def setconfig(self, section, name, value, overlay=True):
         if overlay:
             self._ocfg.set(section, name, value)