Mercurial > hg
changeset 16213:369a5e5441bb stable
merge with i18n
author | Wagner Bruna <wbruna@softwareexpress.com.br> |
---|---|
date | Wed, 29 Feb 2012 13:16:51 -0300 |
parents | 7c75924a6926 (diff) 4d80a5705a28 (current diff) |
children | a0ab72ac86f9 |
files | |
diffstat | 11 files changed, 81 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/common.py Wed Feb 29 21:09:21 2012 +0900 +++ b/hgext/convert/common.py Wed Feb 29 13:16:51 2012 -0300 @@ -385,8 +385,12 @@ raise return for i, line in enumerate(fp): + line = line.splitlines()[0].rstrip() + if not line: + # Ignore blank lines + continue try: - key, value = line.splitlines()[0].rstrip().rsplit(' ', 1) + key, value = line.rsplit(' ', 1) except ValueError: raise util.Abort( _('syntax error in %s(%d): key/value pair expected') @@ -418,8 +422,12 @@ try: fp = open(path, 'r') for i, line in enumerate(fp): + line = line.splitlines()[0].rstrip() + if not line: + # Ignore blank lines + continue try: - child, parents = line.splitlines()[0].rstrip().split(' ', 1) + child, parents = line.split(' ', 1) parents = parents.replace(',', ' ').split() except ValueError: raise util.Abort(_('syntax error in %s(%d): child parent1'
--- a/hgext/mq.py Wed Feb 29 21:09:21 2012 +0900 +++ b/hgext/mq.py Wed Feb 29 13:16:51 2012 -0300 @@ -1929,7 +1929,7 @@ return 0 @command("qapplied", - [('1', 'last', None, _('show only the last patch')) + [('1', 'last', None, _('show only the preceding applied patch')) ] + seriesopts, _('hg qapplied [-1] [-s] [PATCH]')) def applied(ui, repo, patch=None, **opts): @@ -2224,7 +2224,7 @@ @command("qprev", seriesopts, _('hg qprev [-s]')) def prev(ui, repo, **opts): - """print the name of the previous applied patch + """print the name of the preceding applied patch Returns 0 on success.""" q = repo.mq
--- a/mercurial/bookmarks.py Wed Feb 29 21:09:21 2012 +0900 +++ b/mercurial/bookmarks.py Wed Feb 29 13:16:51 2012 -0300 @@ -126,6 +126,17 @@ wlock.release() repo._bookmarkcurrent = mark +def unsetcurrent(repo): + wlock = repo.wlock() + try: + util.unlink(repo.join('bookmarks.current')) + repo._bookmarkcurrent = None + except OSError, inst: + if inst.errno != errno.ENOENT: + raise + finally: + wlock.release() + def updatecurrentbookmark(repo, oldnode, curbranch): try: return update(repo, oldnode, repo.branchtags()[curbranch])
--- a/mercurial/commands.py Wed Feb 29 21:09:21 2012 +0900 +++ b/mercurial/commands.py Wed Feb 29 13:16:51 2012 -0300 @@ -3849,9 +3849,11 @@ limit = cmdutil.loglimit(opts) count = 0 - endrev = None - if opts.get('copies') and opts.get('rev'): - endrev = max(scmutil.revrange(repo, opts.get('rev'))) + 1 + getrenamed, endrev = None, None + if opts.get('copies'): + if opts.get('rev'): + endrev = max(scmutil.revrange(repo, opts.get('rev'))) + 1 + getrenamed = templatekw.getrenamedfn(repo, endrev=endrev) df = False if opts["date"]: @@ -3895,9 +3897,8 @@ return copies = None - if opts.get('copies') and rev: + if getrenamed is not None and rev: copies = [] - getrenamed = templatekw.getrenamedfn(repo, endrev=endrev) for fn in ctx.files(): rename = getrenamed(fn, rev) if rename: @@ -5700,7 +5701,7 @@ # with no argument, we also move the current bookmark, if any movemarkfrom = None - if node is None or node == '': + if rev is None or node == '': movemarkfrom = repo['.'].node() # if we defined a bookmark, we have to remember the original bookmark name @@ -5731,6 +5732,8 @@ ui.status(_("updating bookmark %s\n") % repo._bookmarkcurrent) elif brev in repo._bookmarks: bookmarks.setcurrent(repo, brev) + elif brev: + bookmarks.unsetcurrent(repo) return ret
--- a/setup.py Wed Feb 29 21:09:21 2012 +0900 +++ b/setup.py Wed Feb 29 13:16:51 2012 -0300 @@ -452,10 +452,18 @@ if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'): # XCode 4.0 dropped support for ppc architecture, which is hardcoded in # distutils.sysconfig - version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()[0] - # Also parse only first digit, because 3.2.1 can't be parsed nicely - if (version.startswith('Xcode') and - StrictVersion(version.split()[1]) >= StrictVersion('4.0')): + version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines() + if version: + version = version.splitlines()[0] + xcode4 = (version.startswith('Xcode') and + StrictVersion(version.split()[1]) >= StrictVersion('4.0')) + else: + # xcodebuild returns empty on OS X Lion with XCode 4.3 not + # installed, but instead with only command-line tools. Assume + # that only happens on >= Lion, thus no PPC support. + xcode4 = True + + if xcode4: os.environ['ARCHFLAGS'] = '' setup(name='mercurial',
--- a/tests/test-bookmarks-current.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-bookmarks-current.t Wed Feb 29 13:16:51 2012 -0300 @@ -125,3 +125,29 @@ $ hg bookmarks X 0:719295282060 Z 0:719295282060 + +test deleting .hg/bookmarks.current when explicitly updating +to a revision + + $ echo a >> b + $ hg ci -m. + $ hg up -q X + $ test -f .hg/bookmarks.current + +try to update to it again to make sure we don't +set and then unset it + + $ hg up -q X + $ test -f .hg/bookmarks.current + + $ hg up -q 1 + $ test -f .hg/bookmarks.current + [1] + +when a bookmark is active, hg up -r . is +analogus to hg book -i <active bookmark> + + $ hg up -q X + $ hg up -q . + $ test -f .hg/bookmarks.current + [1]
--- a/tests/test-bookmarks-strip.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-bookmarks-strip.t Wed Feb 29 13:16:51 2012 -0300 @@ -34,7 +34,7 @@ $ hg book test2 -update to -2 +update to -2 (inactives the active bookmark) $ hg update -r -2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -61,7 +61,7 @@ $ hg book test 1:8cf31af87a2b - * test2 1:8cf31af87a2b + test2 1:8cf31af87a2b immediate rollback and reentrancy issue
--- a/tests/test-check-code-hg.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-check-code-hg.t Wed Feb 29 13:16:51 2012 -0300 @@ -1,6 +1,9 @@ $ check_code="$TESTDIR"/../contrib/check-code.py $ cd "$TESTDIR"/.. - + $ if ! hg identify -q > /dev/null; then + > echo "skipped: not a Mercurial working dir" >&2 + > exit 80 + > fi $ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!' $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0 || true
--- a/tests/test-convert-splicemap.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-convert-splicemap.t Wed Feb 29 13:16:51 2012 -0300 @@ -67,10 +67,12 @@ $ cat > splicemap <<EOF > $CHILDID1 $PARENTID1 > $CHILDID2 $PARENTID2,$CHILDID1 + > > EOF $ cat splicemap 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db + $ hg clone repo1 target1 updating to branch default 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-convert-svn-branches.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-convert-svn-branches.t Wed Feb 29 13:16:51 2012 -0300 @@ -14,6 +14,8 @@ $ cat > branchmap <<EOF > old3 newbranch + > + > > EOF $ hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg initializing destination A-hg repository
--- a/tests/test-mq.t Wed Feb 29 21:09:21 2012 +0900 +++ b/tests/test-mq.t Wed Feb 29 13:16:51 2012 -0300 @@ -74,7 +74,7 @@ qnew create a new patch qnext print the name of the next pushable patch qpop pop the current patch off the stack - qprev print the name of the previous applied patch + qprev print the name of the preceding applied patch qpush push the next patch onto the stack qqueue manage multiple patch queues qrefresh update the current patch