Mercurial > hg
changeset 10763:68a7b9ed3c71
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 23 Mar 2010 22:59:31 +0100 |
parents | 2ed667a9dfcb (current diff) 129e96f7a87a (diff) |
children | df1b0c8c59cc fd31a3237498 |
files | hgext/mq.py hgext/rebase.py |
diffstat | 8 files changed, 28 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Mar 23 11:37:31 2010 +0100 +++ b/hgext/mq.py Tue Mar 23 22:59:31 2010 +0100 @@ -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 Tue Mar 23 11:37:31 2010 +0100 +++ b/hgext/rebase.py Tue Mar 23 22:59:31 2010 +0100 @@ -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 Tue Mar 23 11:37:31 2010 +0100 +++ b/mercurial/help/templates.txt Tue Mar 23 22:59:31 2010 +0100 @@ -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/hgweb/wsgicgi.py Tue Mar 23 11:37:31 2010 +0100 +++ b/mercurial/hgweb/wsgicgi.py Tue Mar 23 22:59:31 2010 +0100 @@ -69,5 +69,9 @@ return write content = application(environ, start_response) - for chunk in content: - write(chunk) + try: + for chunk in content: + write(chunk) + finally: + if hasattr(content, 'close'): + content.close()
--- a/setup.py Tue Mar 23 11:37:31 2010 +0100 +++ b/setup.py Tue Mar 23 22:59:31 2010 +0100 @@ -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/test-convert-cvs Tue Mar 23 11:37:31 2010 +0100 +++ b/tests/test-convert-cvs Tue Mar 23 22:59:31 2010 +0100 @@ -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 Tue Mar 23 11:37:31 2010 +0100 +++ b/tests/test-convert-cvs.out Tue Mar 23 22:59:31 2010 +0100 @@ -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 Tue Mar 23 11:37:31 2010 +0100 +++ b/tests/test-rebase-collapse Tue Mar 23 22:59:31 2010 +0100 @@ -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