Commits

Thomas Pelletier  committed a32e40f

removed unused imports. you don't need py-iniparse anymore.

  • Participants
  • Parent commits eb5ae64

Comments (0)

Files changed (1)

File publishall.py

 
 Requirements:
 mercurial
-iniparse: http://iniparse.googlecode.com/files/iniparse-0.3.1.tar.gz
 
 Use:
 hg pusha
 """
 
 from mercurial.i18n import _
-from mercurial import commands, cmdutil, exntesions, hg, util
+from mercurial import commands
 import ConfigParser, os
 
-def pushall(ui, repo):
+def pushall(hg_ui, repo):
     """The Publishall core function. Makes your life easier."""
     userrc = os.sep.join([repo.root, '.hg', 'hgrc'])
     ini = ConfigParser.RawConfigParser()
     ini.read(userrc)
     repos = None
     if not os.path.exists(userrc):
-        ui.warn("Unable to find your hgrc file for the current repository.")
+        hg_ui.warn("Unable to find your hgrc file for the current repository.")
         return 1
     try:
         repos = ini.items('paths')
     except KeyError:
-        ui.warn("No paths defined in your hgrc. Pushall aborded.")
-    ui.status("%s paths found" % len(repos))
+        hg_ui.warn("No paths defined in your hgrc. Pushall aborded.")
+    hg_ui.status("%s paths found" % len(repos))
     for path in repos:
-        ui.status("Pushing to %s" % path[0])
-        commands.push(ui, repo, path[1])
+        hg_ui.status("Pushing to %s" % path[0])
+        commands.push(hg_ui, repo, path[1])
     return 0
 
 cmdtable = {