diff hgext/fetch.py @ 4549:0c61124ad877

dispatch: move dispatching code to cmdutil
author Matt Mackall <mpm@selenic.com>
date Mon, 11 Jun 2007 21:09:24 -0500
parents 6b4127c7d52a
children eadfaa9ec487
line wrap: on
line diff
--- a/hgext/fetch.py	Mon Jun 11 21:09:24 2007 -0500
+++ b/hgext/fetch.py	Mon Jun 11 21:09:24 2007 -0500
@@ -7,7 +7,7 @@
 
 from mercurial.i18n import _
 from mercurial.node import *
-from mercurial import commands, hg, node, util
+from mercurial import commands, cmdutil, hg, node, util
 
 def fetch(ui, repo, source='default', **opts):
     '''Pull changes from a remote repository, merge new changes if needed.
@@ -42,7 +42,7 @@
                       (len(newheads) - 1))
         if not err:
             mod, add, rem = repo.status(wlock=wlock)[:3]
-            message = (commands.logmessage(opts) or
+            message = (cmdutil.logmessage(opts) or
                        (_('Automated merge with %s') % other.url()))
             n = repo.commit(mod + add + rem, message,
                             opts['user'], opts['date'], lock=lock, wlock=wlock,
@@ -51,7 +51,7 @@
                         'with local\n') % (repo.changelog.rev(n),
                                            short(n)))
     def pull():
-        commands.setremoteconfig(ui, opts)
+        cmdutil.setremoteconfig(ui, opts)
 
         other = hg.repository(ui, ui.expandpath(source))
         ui.status(_('pulling from %s\n') % ui.expandpath(source))