Mercurial > hg
changeset 10764:df1b0c8c59cc
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 23 Mar 2010 17:06:58 -0500 |
parents | 0d454e1fa14a (current diff) 68a7b9ed3c71 (diff) |
children | 63c6c2d1123c |
files | |
diffstat | 10 files changed, 40 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Mon Mar 22 17:03:33 2010 -0500 +++ b/hgext/mq.py Tue Mar 23 17:06:58 2010 -0500 @@ -1905,7 +1905,7 @@ def commit(ui, repo, *pats, **opts): """commit changes in the queue repository (DEPRECATED) - This command is deprecated; use hg --mq commit instead.""" + This command is deprecated; use hg commit --mq instead.""" q = repo.mq r = q.qrepo() if not r:
--- a/hgext/rebase.py Mon Mar 22 17:03:33 2010 -0500 +++ b/hgext/rebase.py Tue Mar 23 17:06:58 2010 -0500 @@ -164,10 +164,7 @@ 'resolve then run hg rebase --continue')) updatedirstate(repo, rev, target, p2) if not collapsef: - extra = {'rebase_source': repo[rev].hex()} - if extrafn: - extrafn(repo[rev], extra) - newrev = concludenode(repo, rev, p1, p2, extra=extra) + newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn) else: # Skip commit if we are collapsing repo.dirstate.setparents(repo[p1].node()) @@ -193,7 +190,7 @@ commitmsg += '\n* %s' % repo[rebased].description() commitmsg = ui.edit(commitmsg, repo.ui.username()) newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, - extra=extrafn) + extrafn=extrafn) if 'qtip' in repo.tags(): updatemq(repo, state, skipped, **opts) @@ -269,17 +266,19 @@ if v in m2 and v not in m1: repo.dirstate.remove(v) -def concludenode(repo, rev, p1, p2, commitmsg=None, extra=None): +def concludenode(repo, rev, p1, p2, commitmsg=None, extrafn=None): 'Commit the changes and store useful information in extra' try: repo.dirstate.setparents(repo[p1].node(), repo[p2].node()) if commitmsg is None: commitmsg = repo[rev].description() - if extra is None: - extra = {} + ctx = repo[rev] + extra = {'rebase_source': ctx.hex()} + if extrafn: + extrafn(ctx, extra) # Commit might fail if unresolved files exist - newrev = repo.commit(text=commitmsg, user=repo[rev].user(), - date=repo[rev].date(), extra=extra) + newrev = repo.commit(text=commitmsg, user=ctx.user(), + date=ctx.date(), extra=extra) repo.dirstate.setbranch(repo[newrev].branch()) return newrev except util.Abort:
--- a/mercurial/help/templates.txt Mon Mar 22 17:03:33 2010 -0500 +++ b/mercurial/help/templates.txt Tue Mar 23 17:06:58 2010 -0500 @@ -66,8 +66,9 @@ The "date" keyword does not produce human-readable output. If you want to use a date in your output, you can use a filter to process it. Filters are functions which return a string based on the input -variable. You can also use a chain of filters to get the desired -output:: +variable. Be sure to use the stringify filter first when you're +applying a string-input filter to a list-like input variable. +You can also use a chain of filters to get the desired output:: $ hg tip --template "{date|isodate}\n" 2008-08-21 18:22 +0000
--- a/mercurial/posix.py Mon Mar 22 17:03:33 2010 -0500 +++ b/mercurial/posix.py Tue Mar 23 17:06:58 2010 -0500 @@ -7,7 +7,7 @@ from i18n import _ import osutil -import os, sys, errno, stat, getpass, pwd, grp, fcntl +import os, sys, errno, stat, getpass, pwd, grp posixfile = open nulldev = '/dev/null' @@ -118,6 +118,7 @@ return st1.st_dev == st2.st_dev if sys.platform == 'darwin': + import fcntl # only needed on darwin, missing on jython def realpath(path): ''' Returns the true, canonical file system path equivalent to the given
--- a/mercurial/util.py Mon Mar 22 17:03:33 2010 -0500 +++ b/mercurial/util.py Tue Mar 23 17:06:58 2010 -0500 @@ -36,6 +36,13 @@ _fastsha1 = sha1 = _sha1 return _sha1(s) +import __builtin__ + +def fakebuffer(sliceable, offset=0): + return sliceable[offset:] +if not hasattr(__builtin__, 'buffer'): + __builtin__.buffer = fakebuffer + import subprocess closefds = os.name == 'posix'
--- a/setup.py Mon Mar 22 17:03:33 2010 -0500 +++ b/setup.py Tue Mar 23 17:06:58 2010 -0500 @@ -26,6 +26,12 @@ raise SystemExit( "Couldn't import standard zlib (incomplete Python install).") +try: + import bz2 +except: + raise SystemExit( + "Couldn't import standard bz2 (incomplete Python install).") + import os, subprocess, time import shutil import tempfile
--- a/tests/run-tests.py Mon Mar 22 17:03:33 2010 -0500 +++ b/tests/run-tests.py Tue Mar 23 17:06:58 2010 -0500 @@ -70,6 +70,9 @@ SKIPPED_PREFIX = 'skipped: ' FAILED_PREFIX = 'hghave check failed: ' PYTHON = sys.executable +IMPL_PATH = 'PYTHONPATH' +if 'java' in sys.platform: + IMPL_PATH = 'JYTHONPATH' requiredtools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"] @@ -140,6 +143,9 @@ parser.set_defaults(**defaults) (options, args) = parser.parse_args() + # jython is always pure + options.pure = options.pure or 'java' in sys.platform + if options.with_hg: if not (os.path.isfile(options.with_hg) and os.access(options.with_hg, os.X_OK)): @@ -907,10 +913,10 @@ # it, in case external libraries are only available via current # PYTHONPATH. (In particular, the Subversion bindings on OS X # are in /opt/subversion.) - oldpypath = os.environ.get('PYTHONPATH') + oldpypath = os.environ.get(IMPL_PATH) if oldpypath: pypath.append(oldpypath) - os.environ['PYTHONPATH'] = os.pathsep.join(pypath) + os.environ[IMPL_PATH] = os.pathsep.join(pypath) COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") @@ -931,7 +937,7 @@ vlog("# Using TESTDIR", TESTDIR) vlog("# Using HGTMP", HGTMP) vlog("# Using PATH", os.environ["PATH"]) - vlog("# Using PYTHONPATH", os.environ["PYTHONPATH"]) + vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH]) try: if len(tests) > 1 and options.jobs > 1:
--- a/tests/test-convert-cvs Mon Mar 22 17:03:33 2010 -0500 +++ b/tests/test-convert-cvs Tue Mar 23 17:06:58 2010 -0500 @@ -80,7 +80,8 @@ ls srcfull hg convert srcfull srcfull-hg \ | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' \ - | grep -v 'log entries' | grep -v 'hook:' + | grep -v 'log entries' | grep -v 'hook:' \ + | grep -v '^[0-3] .*' # filter instable changeset order hg cat -r tip srcfull-hg/src/a hg cat -r tip srcfull-hg/src/b/c
--- a/tests/test-convert-cvs.out Mon Mar 22 17:03:33 2010 -0500 +++ b/tests/test-convert-cvs.out Tue Mar 23 17:06:58 2010 -0500 @@ -67,10 +67,6 @@ 4 changeset entries sorting... converting... -3 Initial revision -2 import -1 initial checkin -0 ci0 updating tags a c
--- a/tests/test-rebase-collapse Mon Mar 22 17:03:33 2010 -0500 +++ b/tests/test-rebase-collapse Tue Mar 23 17:06:58 2010 -0500 @@ -43,7 +43,7 @@ hg glog --template '{rev}: {desc}\n' echo '% Rebasing B onto H' hg up -C 3 -hg rebase --collapse 2>&1 | sed 's/\(saving bundle to \).*/\1/' +hg rebase --collapse --keepbranches 2>&1 | sed 's/\(saving bundle to \).*/\1/' hg glog --template '{rev}: {desc}\n' echo "Expected A, B, C, D, F, H" hg manifest