Commits

Thomas Pelletier  committed 7878a20

nicer strings (line breaks)

  • Participants
  • Parent commits 0d8e5b4

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
+from mercurial import commands, cmdutil, exntesions, hg, util
 import ConfigParser, os
 
-def pushall(hg_ui, repo):
+def pushall(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):
-        hg_ui.warn(\
-            _("Unable to find your hgrc file for the current repository."))
+        ui.warn("Unable to find your hgrc file for the current repository.\n")
         return 1
     try:
         repos = ini.items('paths')
     except KeyError:
-        hg_ui.warn(_("No paths defined in your hgrc. Pushall aborded."))
-    hg_ui.status(_("%s paths found" % len(repos)))
+        ui.warn("No paths defined in your hgrc. Pushall aborded.\n")
+    ui.status("%s paths found\n" % len(repos))
     for path in repos:
-        hg_ui.status(_("Pushing to %s" % path[0]))
-        commands.push(hg_ui, repo, path[1])
+        ui.status("* pushing to %s\n" % path[0])
+        commands.push(ui, repo, path[1])
     return 0
 
 cmdtable = {
     'pusha': (
         pushall,
         [],
-        _("Push to all your repositories."),
+        _("Push to all your repositories.\n"),
     ),
 
     'pushall': (
         pushall,
         [],
-        _("Push to all your repositories (the same as pusha).")
+        _("Push to all your repositories (the same as pusha).\n")
     )
 }