change some repo messages in small ways.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Wed, 21 Jun 2006 09:15:42 -0700
changeset 2473 30c267cb4c2f
parent 2472 e6ec81a8feea
child 2474 1e32e2fe8a67
change some repo messages in small ways. move "pushing" and "pulling" after repo create so error message and exit happens before messages printed. fix sshrepo parse error message.
mercurial/commands.py
mercurial/sshrepo.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2151,7 +2151,6 @@ def pull(ui, repo, source="default", **o
       with the --ssh command line option.
     """
     source = ui.expandpath(source)
-    ui.status(_('pulling from %s\n') % (source))
 
     if opts['ssh']:
         ui.setconfig("ui", "ssh", opts['ssh'])
@@ -2159,6 +2158,7 @@ def pull(ui, repo, source="default", **o
         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
 
     other = hg.repository(ui, source)
+    ui.status(_('pulling from %s\n') % (source))
     revs = None
     if opts['rev'] and not other.local():
         raise util.Abort(_("pull -r doesn't work for remote repositories yet"))
@@ -2190,7 +2190,6 @@ def push(ui, repo, dest="default-push", 
     about ssh:// URLs.
     """
     dest = ui.expandpath(dest)
-    ui.status('pushing to %s\n' % (dest))
 
     if opts['ssh']:
         ui.setconfig("ui", "ssh", opts['ssh'])
@@ -2198,6 +2197,7 @@ def push(ui, repo, dest="default-push", 
         ui.setconfig("ui", "remotecmd", opts['remotecmd'])
 
     other = hg.repository(ui, dest)
+    ui.status('pushing to %s\n' % (dest))
     revs = None
     if opts['rev']:
         revs = [repo.lookup(rev) for rev in opts['rev']]
--- a/mercurial/sshrepo.py
+++ b/mercurial/sshrepo.py
@@ -18,7 +18,7 @@ class sshrepository(remoterepository):
 
         m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path)
         if not m:
-            raise hg.RepoError(_("couldn't parse destination %s") % path)
+            raise hg.RepoError(_("couldn't parse location %s") % path)
 
         self.user = m.group(2)
         self.host = m.group(3)