changeset 14787:fc3a7a53e7b5

i18n: merge with main
author Martin Geisler <mg@lazybytes.net>
date Mon, 27 Jun 2011 19:06:18 +0200
parents b64fd91adec5 (current diff) 69021fbf914e (diff)
children 272454930ea5
files
diffstat 14 files changed, 42 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/git.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/hgext/convert/git.py	Mon Jun 27 19:06:18 2011 +0200
@@ -37,7 +37,7 @@
                 (sin, so, se) = util.popen3('GIT_DIR=%s %s' % (self.path, s))
                 return so
             else:
-                util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
+                return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
 
     def gitread(self, s):
         fh = self.gitopen(s)
--- a/hgext/extdiff.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/hgext/extdiff.py	Mon Jun 27 19:06:18 2011 +0200
@@ -222,7 +222,7 @@
         cmdline = util.shellquote(diffcmd) + ' ' + args
 
         ui.debug('running %r in %s\n' % (cmdline, tmproot))
-        util.system(cmdline, cwd=tmproot)
+        util.system(cmdline, cwd=tmproot, out=ui.fout)
 
         for copy_fn, working_fn, mtime in fns_and_mtime:
             if os.lstat(copy_fn).st_mtime != mtime:
--- a/hgext/transplant.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/hgext/transplant.py	Mon Jun 27 19:06:18 2011 +0200
@@ -200,7 +200,8 @@
                         environ={'HGUSER': changelog[1],
                                  'HGREVISION': revlog.hex(node),
                                  },
-                        onerr=util.Abort, errprefix=_('filter failed'))
+                        onerr=util.Abort, errprefix=_('filter failed'),
+                        out=self.ui.fout)
             user, date, msg = self.parselog(file(headerfile))[1:4]
         finally:
             os.unlink(headerfile)
--- a/mercurial/commands.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/mercurial/commands.py	Mon Jun 27 19:06:18 2011 +0200
@@ -337,7 +337,7 @@
     if dest == '-':
         if kind == 'files':
             raise util.Abort(_('cannot archive plain files to stdout'))
-        dest = ui.fout
+        dest = cmdutil.makefileobj(repo, dest)
         if not prefix:
             prefix = os.path.basename(repo.root) + '-%h'
 
@@ -562,7 +562,7 @@
         try:
             while changesets:
                 # update state
-                status = util.system(command)
+                status = util.system(command, out=ui.fout)
                 if status == 125:
                     transition = "skip"
                 elif status == 0:
--- a/mercurial/dispatch.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/mercurial/dispatch.py	Mon Jun 27 19:06:18 2011 +0200
@@ -622,13 +622,17 @@
         if not rpath:
             repo = req.repo
 
-        if not repo:
+        if repo:
+            # set the descriptors of the repo ui to those of ui
+            repo.ui.fin = ui.fin
+            repo.ui.fout = ui.fout
+            repo.ui.ferr = ui.ferr
+        else:
             try:
                 repo = hg.repository(ui, path=path)
-                ui = repo.ui
                 if not repo.local():
                     raise util.Abort(_("repository '%s' is not local") % path)
-                ui.setconfig("bundle", "mainreporoot", repo.root)
+                repo.ui.setconfig("bundle", "mainreporoot", repo.root)
             except error.RequirementError:
                 raise
             except error.RepoError:
@@ -643,6 +647,8 @@
                         raise error.RepoError(_("no repository found in %r"
                                                 " (.hg not found)") % os.getcwd())
                     raise
+        if repo:
+            ui = repo.ui
         args.insert(0, repo)
     elif rpath:
         ui.warn(_("warning: --repository ignored\n"))
--- a/mercurial/hg.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/mercurial/hg.py	Mon Jun 27 19:06:18 2011 +0200
@@ -101,7 +101,7 @@
 def peer(ui, opts, path, create=False):
     '''return a repository peer for the specified path'''
     rui = remoteui(ui, opts)
-    return _peerlookup(path).instance(rui, path, create)
+    return repository(rui, path, create)
 
 def defaultdest(source):
     '''return default destination of clone if none is given'''
--- a/mercurial/scmutil.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/mercurial/scmutil.py	Mon Jun 27 19:06:18 2011 +0200
@@ -698,10 +698,14 @@
     '''Reads and parses .hg/requires and checks if all entries found
     are in the list of supported features.'''
     requirements = set(opener.read("requires").splitlines())
+    missings = []
     for r in requirements:
         if r not in supported:
             if not r or not r[0].isalnum():
                 raise error.RequirementError(_(".hg/requires file is corrupt"))
-            raise error.RequirementError(_("unknown repository format: "
-                "requires feature '%s' (upgrade Mercurial)") % r)
+            missings.append(r)
+    missings.sort()
+    if missings:
+        raise error.RequirementError(_("unknown repository format: "
+            "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
     return requirements
--- a/mercurial/ui.py	Mon Jun 27 13:24:28 2011 -0300
+++ b/mercurial/ui.py	Mon Jun 27 19:06:18 2011 +0200
@@ -629,7 +629,8 @@
 
             util.system("%s \"%s\"" % (editor, name),
                         environ={'HGUSER': user},
-                        onerr=util.Abort, errprefix=_("edit failed"))
+                        onerr=util.Abort, errprefix=_("edit failed"),
+                        out=self.fout)
 
             f = open(name)
             t = f.read()
--- a/tests/test-commit.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-commit.t	Mon Jun 27 19:06:18 2011 +0200
@@ -98,7 +98,7 @@
   $ echo foo >> foo
   $ echo fake >> .hg/requires
   $ hg commit -m bla
-  abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
+  abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
   [255]
 
   $ cd ..
--- a/tests/test-identify.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-identify.t	Mon Jun 27 19:06:18 2011 +0200
@@ -107,11 +107,11 @@
 
   $ echo fake >> .hg/requires
   $ hg id
-  abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
+  abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
   [255]
 
   $ cd ..
   $ hg id test
-  abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
+  abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
   [255]
 
--- a/tests/test-requires.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-requires.t	Mon Jun 27 19:06:18 2011 +0200
@@ -9,5 +9,9 @@
   [255]
   $ echo indoor-pool > .hg/requires
   $ hg tip
-  abort: unknown repository format: requires feature 'indoor-pool' (upgrade Mercurial)!
+  abort: unknown repository format: requires features 'indoor-pool' (upgrade Mercurial)!
   [255]
+  $ echo outdoor-pool >> .hg/requires
+  $ hg tip
+  abort: unknown repository format: requires features 'indoor-pool', 'outdoor-pool' (upgrade Mercurial)!
+  [255]
--- a/tests/test-revert.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-revert.t	Mon Jun 27 19:06:18 2011 +0200
@@ -5,6 +5,14 @@
   $ echo 123 > e
   $ hg add a c e
   $ hg commit -m "first" a c e
+
+nothing changed
+
+  $ hg revert
+  abort: no files or directories specified
+  (use --all to discard all changes)
+  [255]
+
   $ echo 123 > b
 
 should show b unknown
--- a/tests/test-setdiscovery.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-setdiscovery.t	Mon Jun 27 19:06:18 2011 +0200
@@ -3,7 +3,7 @@
 (which is currently not activated by default) and the full remotable protocol:
 
   $ testdesc() { # revs_a, revs_b, dagdesc
-  >     if [ -e foo ]; then rm -rf foo; fi
+  >     if [ -d foo ]; then rm -rf foo; fi
   >     hg init foo
   >     cd foo
   >     hg debugbuilddag "$3"
--- a/tests/test-wireproto.t	Mon Jun 27 13:24:28 2011 -0300
+++ b/tests/test-wireproto.t	Mon Jun 27 19:06:18 2011 +0200
@@ -57,6 +57,7 @@
 HTTP without the httpheader capability:
 
   $ HGRCPATH="`pwd`/repo/.hgrc"
+  $ export HGRCPATH
   $ CAP=httpheader
   $ . "$TESTDIR/notcapable"