--- a/hgext/convert/git.py Fri Jun 24 18:00:29 2011 -0500
+++ b/hgext/convert/git.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/hgext/extdiff.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/hgext/transplant.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/mercurial/commands.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/mercurial/dispatch.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/mercurial/hg.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/mercurial/scmutil.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/mercurial/ui.py Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-commit.t Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-identify.t Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-requires.t Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-revert.t Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-setdiscovery.t Mon Jun 27 11:19:27 2011 -0500
@@ -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 Fri Jun 24 18:00:29 2011 -0500
+++ b/tests/test-wireproto.t Mon Jun 27 11:19:27 2011 -0500
@@ -57,6 +57,7 @@
HTTP without the httpheader capability:
$ HGRCPATH="`pwd`/repo/.hgrc"
+ $ export HGRCPATH
$ CAP=httpheader
$ . "$TESTDIR/notcapable"