Mercurial > hg
changeset 11529:52874ddeb166
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 Jul 2010 17:27:32 -0500 |
parents | f4eddec324b7 (diff) 6f44bd4cc4f2 (current diff) |
children | 724362365ea0 |
files | |
diffstat | 9 files changed, 36 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/mergetools.hgrc Sat Jul 10 14:28:38 2010 -0300 +++ b/contrib/mergetools.hgrc Mon Jul 12 17:27:32 2010 -0500 @@ -13,6 +13,9 @@ gvimdiff.regname=path gvimdiff.priority=-9 +vimdiff.args=$local $other $base +vimdiff.priority=-10 + merge.checkconflicts=True merge.priority=-100
--- a/hgext/churn.py Sat Jul 10 14:28:38 2010 -0300 +++ b/hgext/churn.py Mon Jul 12 17:27:32 2010 -0500 @@ -149,7 +149,8 @@ if opts.get('diffstat'): width -= 15 - def format(name, (added, removed)): + def format(name, diffstat): + added, removed = diffstat return "%s %15s %s%s\n" % (pad(name, maxname), '+%d/-%d' % (added, removed), ui.label('+' * charnum(added),
--- a/hgext/convert/transport.py Sat Jul 10 14:28:38 2010 -0300 +++ b/hgext/convert/transport.py Mon Jul 12 17:27:32 2010 -0500 @@ -98,9 +98,8 @@ svn.ra.reparent(self.ra, self.svn_url.encode('utf8')) class Reporter(object): - def __init__(self, (reporter, report_baton)): - self._reporter = reporter - self._baton = report_baton + def __init__(self, reporter_data): + self._reporter, self._baton = reporter_data def set_path(self, path, revnum, start_empty, lock_token, pool=None): svn.ra.reporter2_invoke_set_path(self._reporter, self._baton,
--- a/hgext/record.py Sat Jul 10 14:28:38 2010 -0300 +++ b/hgext/record.py Mon Jul 12 17:27:32 2010 -0500 @@ -10,7 +10,7 @@ from mercurial.i18n import gettext, _ from mercurial import cmdutil, commands, extensions, hg, mdiff, patch from mercurial import util -import copy, cStringIO, errno, operator, os, re, tempfile +import copy, cStringIO, errno, os, re, tempfile lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)') @@ -186,7 +186,8 @@ self.hunk = [] self.stream = [] - def addrange(self, (fromstart, fromend, tostart, toend, proc)): + def addrange(self, limits): + fromstart, fromend, tostart, toend, proc = limits self.fromline = int(fromstart) self.toline = int(tostart) self.proc = proc @@ -354,8 +355,8 @@ applied[chunk.filename()].append(chunk) else: fixoffset += chunk.removed - chunk.added - return reduce(operator.add, [h for h in applied.itervalues() - if h[0].special() or len(h) > 1], []) + return sum([h for h in applied.itervalues() + if h[0].special() or len(h) > 1], []) def record(ui, repo, *pats, **opts): '''interactively select changes to commit
--- a/mercurial/commands.py Sat Jul 10 14:28:38 2010 -0300 +++ b/mercurial/commands.py Mon Jul 12 17:27:32 2010 -0500 @@ -1867,7 +1867,10 @@ if not doc: doc = _("(no help text available)") if hasattr(entry[0], 'definition'): # aliased command - doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) + if entry[0].definition.startswith('!'): # shell alias + doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] + else: + doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) if ui.quiet: doc = doc.splitlines()[0] keep = ui.verbose and ['verbose'] or []
--- a/mercurial/dispatch.py Sat Jul 10 14:28:38 2010 -0300 +++ b/mercurial/dispatch.py Mon Jul 12 17:27:32 2010 -0500 @@ -6,7 +6,7 @@ # GNU General Public License version 2 or any later version. from i18n import _ -import os, sys, atexit, signal, pdb, socket, errno, shlex, time +import os, sys, atexit, signal, pdb, socket, errno, shlex, time, traceback import util, commands, hg, fancyopts, extensions, hook, error import cmdutil, encoding import ui as uimod @@ -49,6 +49,8 @@ try: # enter the debugger before command execution if '--debugger' in args: + ui.warn(_("entering debugger - " + "type c to continue starting hg or h for help\n")) pdb.set_trace() try: return _dispatch(ui, args) @@ -57,6 +59,7 @@ except: # enter the debugger when we hit an exception if '--debugger' in args: + traceback.print_exc() pdb.post_mortem(sys.exc_info()[2]) ui.traceback() raise @@ -205,6 +208,13 @@ return + if self.definition.startswith('!'): + def fn(ui, *args): + cmd = '%s %s' % (self.definition[1:], ' '.join(args)) + return util.system(cmd) + self.fn = fn + return + args = shlex.split(self.definition) cmd = args.pop(0) args = map(util.expandpath, args)
--- a/mercurial/revlog.py Sat Jul 10 14:28:38 2010 -0300 +++ b/mercurial/revlog.py Mon Jul 12 17:27:32 2010 -0500 @@ -131,7 +131,7 @@ self.dataf = dataf self.s = struct.calcsize(indexformatng) self.datasize = size - self.l = size / self.s + self.l = size // self.s self.index = [None] * self.l self.map = {nullid: nullrev} self.allmap = 0 @@ -176,8 +176,8 @@ # limit blocksize so that we don't get too much data. blocksize = max(self.datasize - blockstart, 0) data = self.dataf.read(blocksize) - lend = len(data) / self.s - i = blockstart / self.s + lend = len(data) // self.s + i = blockstart // self.s off = 0 # lazyindex supports __delitem__ if lend > len(self.index) - i:
--- a/tests/test-alias Sat Jul 10 14:28:38 2010 -0300 +++ b/tests/test-alias Mon Jul 12 17:27:32 2010 -0500 @@ -14,6 +14,7 @@ dln = lognull --debug nousage = rollback put = export -r 0 -o "\$FOO/%R.diff" +echo = !echo [defaults] mylog = -q @@ -64,3 +65,6 @@ echo '% path expanding' FOO=`pwd` hg put cat 0.diff + +echo '% shell aliases' +hg echo foo