Commits

Drew Petersen  committed b4ef251

removed attempts to use mercurial api

  • Participants
  • Parent commits 8e5f28f

Comments (0)

Files changed (2)

+glob:subrepo.pyo
 
 from mercurial.i18n import _
 from hgext.fetch import fetch
-from mercurial import hg
+from mercurial import hg, util
 import os, string
 
 def subrepo(ui, repo, **opts):
         for local, remote in getSubreposFromHgsub(repo):
             if os.path.exists(local):
                 ui.status("---------------------------\n")
-                repo = hg.repository(ui, local)
-                repo.pull(remote)
+                pout = util.popen("cd " + local + " && hg pull && cd ..")
+                ui.status(pout.read())
             else:
                 recloneSubrepo(ui, local, remote)
         ui.status("---------------------------\n")
         for local, remote in getSubreposFromHgsub(repo):
             if os.path.exists(local):
                 ui.status("---------------------------\n")
-                repo = hg.repository(ui, local)
-                repo.update(remote)
+                pout = util.popen("cd " + local + " && hg update && cd ..")
+                ui.status(pout.read())
             else:
                 recloneSubrepo(ui, local, remote)
         ui.status("---------------------------\n")
         for local, remote in getSubreposFromHgsub(repo):
             if os.path.exists(local):
                 ui.status("---------------------------\n")
-                repo = hg.repository(ui, local)
-                fetch(ui, repo, source=remote)
+                pout = util.popen("cd " + local + " && hg fetch && cd ..")
+                ui.status(pout.read())
             else:
                 recloneSubrepo(ui, local, remote)
         ui.status("---------------------------\n")