changeset 15974:cd4504d26695 stable

merge with i18n
author Wagner Bruna <wbruna@softwareexpress.com.br>
date Mon, 23 Jan 2012 16:11:37 -0200
parents 610c4434973b (diff) c6464e943a9a (current diff)
children eeecaca2750b
files
diffstat 22 files changed, 198 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsigs	Fri Jan 20 11:11:36 2012 +0100
+++ b/.hgsigs	Mon Jan 23 16:11:37 2012 -0200
@@ -47,3 +47,4 @@
 41453d55b481ddfcc1dacb445179649e24ca861d 0 iD8DBQBOsFhpywK+sNU5EO8RAqM6AKCyfxUae3/zLuiLdQz+JR78690eMACfQ6JTBQib4AbE+rUDdkeFYg9K/+4=
 195dbd1cef0c2f9f8bcf4ea303238105f716bda3 0 iD8DBQBO1/fWywK+sNU5EO8RAmoPAKCR5lpv1D6JLURHD8KVLSV4GRVEBgCgnd0Sy78ligNfqAMafmACRDvj7vo=
 6344043924497cd06d781d9014c66802285072e4 0 iD8DBQBPALgmywK+sNU5EO8RAlfhAJ9nYOdWnhfVDHYtDTJAyJtXBAQS9wCgnefoSQt7QABkbGxM+Q85UYEBuD0=
+db33555eafeaf9df1e18950e29439eaa706d399b 0 iD8DBQBPGdzxywK+sNU5EO8RAppkAJ9jOXhUVE/97CPgiMA0pMGiIYnesQCfengAszcBiSiKGugiI8Okc9ghU+Y=
--- a/.hgtags	Fri Jan 20 11:11:36 2012 +0100
+++ b/.hgtags	Mon Jan 23 16:11:37 2012 -0200
@@ -59,3 +59,4 @@
 41453d55b481ddfcc1dacb445179649e24ca861d 2.0
 195dbd1cef0c2f9f8bcf4ea303238105f716bda3 2.0.1
 6344043924497cd06d781d9014c66802285072e4 2.0.2
+db33555eafeaf9df1e18950e29439eaa706d399b 2.1-rc
--- a/hgext/largefiles/basestore.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/hgext/largefiles/basestore.py	Mon Jan 23 16:11:37 2012 -0200
@@ -166,8 +166,11 @@
     ui = repo.ui
 
     if not remote:
-        path = (getattr(repo, 'lfpullsource', None) or
-                ui.expandpath('default-push', 'default'))
+        lfpullsource = getattr(repo, 'lfpullsource', None)
+        if lfpullsource:
+            path = ui.expandpath(lfpullsource)
+        else:
+            path = ui.expandpath('default-push', 'default')
 
         # ui.expandpath() leaves 'default-push' and 'default' alone if
         # they cannot be expanded: fallback to the empty string,
--- a/hgext/largefiles/overrides.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/hgext/largefiles/overrides.py	Mon Jan 23 16:11:37 2012 -0200
@@ -179,6 +179,11 @@
 # matcher which matches only the normal files and runs the original
 # version of add.
 def override_add(orig, ui, repo, *pats, **opts):
+    normal = opts.pop('normal')
+    if normal:
+        if opts.get('large'):
+            raise util.Abort(_('--normal cannot be used with --large'))
+        return orig(ui, repo, *pats, **opts)
     bad = add_largefiles(ui, repo, *pats, **opts)
     installnormalfilesmatchfn(repo[None].manifest())
     result = orig(ui, repo, *pats, **opts)
--- a/hgext/largefiles/uisetup.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/hgext/largefiles/uisetup.py	Mon Jan 23 16:11:37 2012 -0200
@@ -23,6 +23,7 @@
     entry = extensions.wrapcommand(commands.table, 'add',
                                    overrides.override_add)
     addopt = [('', 'large', None, _('add as largefile')),
+              ('', 'normal', None, _('add as normal file')),
               ('', 'lfsize', '', _('add all files above this size '
                                    '(in megabytes) as largefiles '
                                    '(default: 10)'))]
--- a/hgext/mq.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/hgext/mq.py	Mon Jan 23 16:11:37 2012 -0200
@@ -3161,15 +3161,22 @@
 
         def checkpush(self, force, revs):
             if self.mq.applied and not force:
-                haspatches = True
+                outapplied = [e.node for e in self.mq.applied]
                 if revs:
-                    # Assume applied patches have no non-patch descendants
-                    # and are not on remote already. If they appear in the
-                    # set of resolved 'revs', bail out.
-                    applied = set(e.node for e in self.mq.applied)
-                    haspatches = bool([n for n in revs if n in applied])
-                if haspatches:
-                    raise util.Abort(_('source has mq patches applied'))
+                    # Assume applied patches have no non-patch descendants and
+                    # are not on remote already. Filtering any changeset not
+                    # pushed.
+                    heads = set(revs)
+                    for node in reversed(outapplied):
+                        if node in heads:
+                            break
+                        else:
+                            outapplied.pop()
+                # looking for pushed and shared changeset
+                for node in outapplied:
+                    if repo[node].phase() < phases.secret:
+                        raise util.Abort(_('source has mq patches applied'))
+                # no non-secret patches pushed
             super(mqrepo, self).checkpush(force, revs)
 
         def _findtags(self):
--- a/hgext/rebase.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/hgext/rebase.py	Mon Jan 23 16:11:37 2012 -0200
@@ -210,7 +210,7 @@
                       " unrebased descendants"),
                     hint=_('use --keep to keep original changesets'))
             elif not keepf and not repo[root].mutable():
-                raise util.Abort(_("Can't rebase immutable changeset %s")
+                raise util.Abort(_("can't rebase immutable changeset %s")
                                  % repo[root],
                                  hint=_('see hg help phases for details'))
             else:
--- a/mercurial/commands.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/commands.py	Mon Jan 23 16:11:37 2012 -0200
@@ -725,7 +725,7 @@
     ('r', 'rev', '', _('revision'), _('REV')),
     ('d', 'delete', False, _('delete a given bookmark')),
     ('m', 'rename', '', _('rename a given bookmark'), _('NAME')),
-    ('i', 'inactive', False, _('do not mark a new bookmark active'))],
+    ('i', 'inactive', False, _('mark a bookmark inactive'))],
     _('hg bookmarks [-f] [-d] [-i] [-m NAME] [-r REV] [NAME]'))
 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False,
              rename=None, inactive=False):
@@ -745,6 +745,11 @@
     push` and :hg:`help pull`). This requires both the local and remote
     repositories to support bookmarks. For versions prior to 1.8, this means
     the bookmarks extension must be enabled.
+
+    With -i/--inactive, the new bookmark will not be made the active
+    bookmark. If -r/--rev is given, the new bookmark will not be made
+    active even if -i/--inactive is not given. If no NAME is given, the
+    current active bookmark will be marked inactive.
     '''
     hexfn = ui.debugflag and hex or short
     marks = repo._bookmarks
@@ -4214,7 +4219,7 @@
     revs = list(revs)
     revs.extend(opts['rev'])
     if not revs:
-        raise util.Abort(_('no revisions specified!'))
+        raise util.Abort(_('no revisions specified'))
 
     lock = None
     ret = 0
@@ -5633,7 +5638,8 @@
 
     Update the repository's working directory to the specified
     changeset. If no changeset is specified, update to the tip of the
-    current named branch and move the current bookmark.
+    current named branch and move the current bookmark (see :hg:`help
+    bookmarks`).
 
     If the changeset is not a descendant of the working directory's
     parent, the update is aborted. With the -c/--check option, the
--- a/mercurial/discovery.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/discovery.py	Mon Jan 23 16:11:37 2012 -0200
@@ -116,7 +116,7 @@
         sets = repo.changelog.findcommonmissing(og.commonheads, onlyheads)
         og._common, allmissing = sets
         og._missing = missing = []
-        og._excluded = excluded = []
+        og.excluded = excluded = []
         for node in allmissing:
             if repo[node].phase() >= phases.secret:
                 excluded.append(node)
@@ -124,8 +124,7 @@
                 missing.append(node)
         if excluded:
             # update missing heads
-            rset = repo.set('heads(%ln)', missing)
-            missingheads = [ctx.node() for ctx in rset]
+            missingheads = phases.newheads(repo, onlyheads, excluded)
         else:
             missingheads = onlyheads
         og.missingheads = missingheads
--- a/mercurial/fileset.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/fileset.py	Mon Jan 23 16:11:37 2012 -0200
@@ -199,7 +199,7 @@
     """
     # i18n: "binary" is a keyword
     getargs(x, 0, 0, _("binary takes no arguments"))
-    return [f for f in mctx.subset if util.binary(mctx.ctx[f].data())]
+    return [f for f in mctx.existing() if util.binary(mctx.ctx[f].data())]
 
 def exec_(mctx, x):
     """``exec()``
@@ -207,7 +207,7 @@
     """
     # i18n: "exec" is a keyword
     getargs(x, 0, 0, _("exec takes no arguments"))
-    return [f for f in mctx.subset if mctx.ctx.flags(f) == 'x']
+    return [f for f in mctx.existing() if mctx.ctx.flags(f) == 'x']
 
 def symlink(mctx, x):
     """``symlink()``
@@ -215,7 +215,7 @@
     """
     # i18n: "symlink" is a keyword
     getargs(x, 0, 0, _("symlink takes no arguments"))
-    return [f for f in mctx.subset if mctx.ctx.flags(f) == 'l']
+    return [f for f in mctx.existing() if mctx.ctx.flags(f) == 'l']
 
 def resolved(mctx, x):
     """``resolved()``
@@ -253,7 +253,7 @@
     """
     pat = getstring(x, _("grep requires a pattern"))
     r = re.compile(pat)
-    return [f for f in mctx.subset if r.search(mctx.ctx[f].data())]
+    return [f for f in mctx.existing() if r.search(mctx.ctx[f].data())]
 
 _units = dict(k=2**10, K=2**10, kB=2**10, KB=2**10,
               M=2**20, MB=2**20, G=2**30, GB=2**30)
@@ -320,7 +320,7 @@
     else:
         raise error.ParseError(_("couldn't parse size: %s") % expr)
 
-    return [f for f in mctx.subset if m(mctx.ctx[f].size())]
+    return [f for f in mctx.existing() if m(mctx.ctx[f].size())]
 
 def encoding(mctx, x):
     """``encoding(name)``
@@ -333,7 +333,7 @@
     enc = getstring(x, _("encoding requires an encoding name"))
 
     s = []
-    for f in mctx.subset:
+    for f in mctx.existing():
         d = mctx.ctx[f].data()
         try:
             d.decode(enc)
@@ -400,6 +400,8 @@
         return self.ctx.match(patterns)
     def filter(self, files):
         return [f for f in files if f in self.subset]
+    def existing(self):
+        return (f for f in self.subset if f in self.ctx)
     def narrow(self, files):
         return matchctx(self.ctx, self.filter(files), self._status)
 
--- a/mercurial/help/revsets.txt	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/help/revsets.txt	Mon Jan 23 16:11:37 2012 -0200
@@ -4,10 +4,9 @@
 The language supports a number of predicates which are joined by infix
 operators. Parenthesis can be used for grouping.
 
-Identifiers such as branch names must be quoted with single or double
-quotes if they contain characters outside of
-``[._a-zA-Z0-9\x80-\xff]`` or if they match one of the predefined
-predicates.
+Identifiers such as branch names may need quoting with single or
+double quotes if they contain characters like ``-`` or if they match
+one of the predefined predicates.
 
 Special characters can be used in quoted identifiers by escaping them,
 e.g., ``\n`` is interpreted as a newline. To prevent them from being
--- a/mercurial/localrepo.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/localrepo.py	Mon Jan 23 16:11:37 2012 -0200
@@ -1554,21 +1554,29 @@
                 clend = len(self.changelog)
                 added = [self.changelog.node(r) for r in xrange(clstart, clend)]
 
+            # compute target subset
+            if heads is None:
+                # We pulled every thing possible
+                # sync on everything common
+                subset = common + added
+            else:
+                # We pulled a specific subset
+                # sync on this subset
+                subset = heads
 
             # Get remote phases data from remote
             remotephases = remote.listkeys('phases')
             publishing = bool(remotephases.get('publishing', False))
             if remotephases and not publishing:
                 # remote is new and unpublishing
-                subset = common + added
                 pheads, _dr = phases.analyzeremotephases(self, subset,
                                                          remotephases)
                 phases.advanceboundary(self, phases.public, pheads)
-                phases.advanceboundary(self, phases.draft, common + added)
+                phases.advanceboundary(self, phases.draft, subset)
             else:
                 # Remote is old or publishing all common changesets
                 # should be seen as public
-                phases.advanceboundary(self, phases.public, common + added)
+                phases.advanceboundary(self, phases.public, subset)
         finally:
             lock.release()
 
@@ -1597,14 +1605,14 @@
         # unbundle assumes local user cannot lock remote repo (new ssh
         # servers, http servers).
 
-        self.checkpush(force, revs)
-        lock = None
-        unbundle = remote.capable('unbundle')
-        if not unbundle:
-            lock = remote.lock()
+        # get local lock as we might write phase data
+        locallock = self.lock()
         try:
-            # get local lock as we might write phase data
-            locallock = self.lock()
+            self.checkpush(force, revs)
+            lock = None
+            unbundle = remote.capable('unbundle')
+            if not unbundle:
+                lock = remote.lock()
             try:
                 # discovery
                 fci = discovery.findcommonincoming
@@ -1652,11 +1660,35 @@
                         # we return an integer indicating remote head count change
                         ret = remote.addchangegroup(cg, 'push', self.url())
 
-                cheads = outgoing.commonheads[:]
                 if ret:
-                    # push succeed, synchonize common + pushed
-                    # this is a no-op if there was nothing to push
-                    cheads += outgoing.missingheads
+                    # push succeed, synchonize target of the push
+                    cheads = outgoing.missingheads
+                elif revs is None:
+                    # All out push fails. synchronize all common
+                    cheads = outgoing.commonheads
+                else:
+                    # I want cheads = heads(::missingheads and ::commonheads)
+                    # (missingheads is revs with secret changeset filtered out)
+                    #
+                    # This can be expressed as:
+                    #     cheads = ( (missingheads and ::commonheads)
+                    #              + (commonheads and ::missingheads))"
+                    #              )
+                    #
+                    # while trying to push we already computed the following:
+                    #     common = (::commonheads)
+                    #     missing = ((commonheads::missingheads) - commonheads)
+                    #
+                    # We can pick:
+                    # * missingheads part of comon (::commonheads)
+                    common = set(outgoing.common)
+                    cheads = [n for node in revs if n in common]
+                    # and 
+                    # * commonheads parents on missing
+                    rvset = repo.revset('%ln and parents(roots(%ln))',
+                                        outgoing.commonheads,
+                                        outgoing.missing)
+                    cheads.extend(c.node() for c in rvset)
                 # even when we don't push, exchanging phase data is useful
                 remotephases = remote.listkeys('phases')
                 if not remotephases: # old server or public only repo
@@ -1687,10 +1719,10 @@
                             self.ui.warn(_('updating %s to public failed!\n')
                                             % newremotehead)
             finally:
-                locallock.release()
+                if lock is not None:
+                    lock.release()
         finally:
-            if lock is not None:
-                lock.release()
+            locallock.release()
 
         self.ui.debug("checking for updated bookmarks\n")
         rb = remote.listkeys('bookmarks')
--- a/mercurial/phases.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/phases.py	Mon Jan 23 16:11:37 2012 -0200
@@ -147,7 +147,7 @@
         missing = [node for node in nodes if node not in nodemap]
         if missing:
             for mnode in missing:
-                msg = _('Removing unknown node %(n)s from %(p)i-phase boundary')
+                msg = 'Removing unknown node %(n)s from %(p)i-phase boundary'
                 repo.ui.debug(msg, {'n': short(mnode), 'p': phase})
             nodes.symmetric_difference_update(missing)
             repo._dirtyphases = True
@@ -276,17 +276,24 @@
         phase = int(phase)
         if phase == 0:
             if node != nullid:
-                msg = _('ignoring inconsistense public root from remote: %s')
-                repo.ui.warn(msg, nhex)
+                repo.ui.warn(_('ignoring inconsistent public root'
+                               ' from remote: %s\n') % nhex)
         elif phase == 1:
             if node in nodemap:
                 draftroots.append(node)
         else:
-            msg = _('ignoring unexpected root from remote: %i %s')
-            repo.ui.warn(msg, phase, nhex)
+            repo.ui.warn(_('ignoring unexpected root from remote: %i %s\n')
+                         % (phase, nhex))
     # compute heads
-    revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
-                      subset, draftroots, draftroots, subset)
-    publicheads = [c.node() for c in revset]
+    publicheads = newheads(repo, subset, draftroots)
     return publicheads, draftroots
 
+def newheads(repo, heads, roots):
+    """compute new head of a subset minus another
+
+    * `heads`: define the first subset
+    * `rroots`: define the second we substract to the first"""
+    revset = repo.set('heads((%ln + parents(%ln)) - (%ln::%ln))',
+                      heads, roots, roots, heads)
+    return [c.node() for c in revset]
+
--- a/mercurial/revset.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/revset.py	Mon Jan 23 16:11:37 2012 -0200
@@ -79,7 +79,7 @@
             pos += 1
             while pos < l: # find end of symbol
                 d = program[pos]
-                if not (d.isalnum() or d in "._" or ord(d) > 127):
+                if not (d.isalnum() or d in "._/" or ord(d) > 127):
                     break
                 if d == '.' and program[pos - 1] == '.': # special case for ..
                     pos -= 1
@@ -296,15 +296,17 @@
     return [r for r in subset if r in s or repo[r].branch() in b]
 
 def checkstatus(repo, subset, pat, field):
-    m = matchmod.match(repo.root, repo.getcwd(), [pat])
+    m = None
     s = []
-    fast = (m.files() == [pat])
+    fast = not matchmod.patkind(pat)
     for r in subset:
         c = repo[r]
         if fast:
             if pat not in c.files():
                 continue
         else:
+            if not m or matchmod.patkind(pat) == 'set':
+                m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
             for f in c.files():
                 if m(f):
                     break
@@ -354,15 +356,18 @@
     """
     # i18n: "contains" is a keyword
     pat = getstring(x, _("contains requires a pattern"))
-    m = matchmod.match(repo.root, repo.getcwd(), [pat])
+    m = None
     s = []
-    if m.files() == [pat]:
+    if not matchmod.patkind(pat):
         for r in subset:
             if pat in repo[r]:
                 s.append(r)
     else:
         for r in subset:
-            for f in repo[r].manifest():
+            c = repo[r]
+            if not m or matchmod.patkind(pat) == 'set':
+                m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
+            for f in c.manifest():
                 if m(f):
                     s.append(r)
                     break
@@ -412,10 +417,11 @@
     """
 
     pat = getstring(x, _("filelog requires a pattern"))
-    m = matchmod.match(repo.root, repo.getcwd(), [pat], default='relpath')
+    m = matchmod.match(repo.root, repo.getcwd(), [pat], default='relpath',
+                       ctx=repo[None])
     s = set()
 
-    if not m.anypats():
+    if not matchmod.patkind(pat):
         for f in m.files():
             fl = repo.file(f)
             for fr in fl:
@@ -443,27 +449,20 @@
     """
     # i18n: "follow" is a keyword
     l = getargs(x, 0, 1, _("follow takes no arguments or a filename"))
-    p = repo['.'].rev()
+    c = repo['.']
     if l:
         x = getstring(l[0], _("follow expected a filename"))
-        if x in repo['.']:
-            s = set(ctx.rev() for ctx in repo['.'][x].ancestors())
+        if x in c:
+            cx = c[x]
+            s = set(ctx.rev() for ctx in cx.ancestors())
+            # include the revision responsible for the most recent version
+            s.add(cx.linkrev())
         else:
             return []
     else:
-        s = set(repo.changelog.ancestors(p))
-
-    s |= set([p])
-    return [r for r in subset if r in s]
+        s = set(repo.changelog.ancestors(c.rev()))
+        s.add(c.rev())
 
-def followfile(repo, subset, x):
-    """``follow()``
-    An alias for ``::.`` (ancestors of the working copy's first parent).
-    """
-    # i18n: "follow" is a keyword
-    getargs(x, 0, 0, _("follow takes no arguments"))
-    p = repo['.'].rev()
-    s = set(repo.changelog.ancestors(p)) | set([p])
     return [r for r in subset if r in s]
 
 def getall(repo, subset, x):
@@ -500,10 +499,13 @@
     """
     # i18n: "file" is a keyword
     pat = getstring(x, _("file requires a pattern"))
-    m = matchmod.match(repo.root, repo.getcwd(), [pat])
+    m = None
     s = []
     for r in subset:
-        for f in repo[r].files():
+        c = repo[r]
+        if not m or matchmod.patkind(pat) == 'set':
+            m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=c)
+        for f in c.files():
             if m(f):
                 s.append(r)
                 break
@@ -751,7 +753,7 @@
 
     import hg # avoid start-up nasties
     # i18n: "remote" is a keyword
-    l = getargs(x, 0, 2, _("outgoing takes one or two arguments"))
+    l = getargs(x, 0, 2, _("remote takes one or two arguments"))
 
     q = '.'
     if len(l) > 0:
--- a/mercurial/templatekw.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/mercurial/templatekw.py	Mon Jan 23 16:11:37 2012 -0200
@@ -276,11 +276,11 @@
     return ctx.hex()
 
 def showphase(repo, ctx, templ, **args):
-    """:rev: String. The changeset phase name."""
+    """:phase: String. The changeset phase name."""
     return ctx.phasestr()
 
 def showphaseidx(repo, ctx, templ, **args):
-    """:rev: Integer. The changeset phase index."""
+    """:phaseidx: Integer. The changeset phase index."""
     return ctx.phase()
 
 def showrev(repo, ctx, templ, **args):
--- a/tests/run-tests.py	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/run-tests.py	Mon Jan 23 16:11:37 2012 -0200
@@ -98,7 +98,7 @@
     'jobs': ('HGTEST_JOBS', 1),
     'timeout': ('HGTEST_TIMEOUT', 180),
     'port': ('HGTEST_PORT', 20059),
-    'shell': ('HGTEST_SHELL', '/bin/sh'),
+    'shell': ('HGTEST_SHELL', 'sh'),
 }
 
 def parselistfiles(files, listtype, warn=True):
@@ -200,6 +200,7 @@
         options.pure = True
 
     if options.with_hg:
+        options.with_hg = os.path.expanduser(options.with_hg)
         if not (os.path.isfile(options.with_hg) and
                 os.access(options.with_hg, os.X_OK)):
             parser.error('--with-hg must specify an executable hg script')
@@ -598,6 +599,8 @@
     f.close()
 
     script = []
+    if options.debug:
+        script.append('set -x\n')
     if os.getenv('MSYSTEM'):
         script.append('alias pwd="pwd -W"\n')
     for n, l in enumerate(t):
--- a/tests/test-hook.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-hook.t	Mon Jan 23 16:11:37 2012 -0200
@@ -179,7 +179,6 @@
   pushing to ../a
   searching for changes
   no changes found
-  pushkey hook: HG_KEY=07f3376c1e655977439df2a814e3cc14b27abac2 HG_NAMESPACE=phases HG_NEW=0 HG_OLD=1 HG_RET=1 
   exporting bookmark foo
   pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 
   $ cd ../a
@@ -193,7 +192,7 @@
   pulling from ../a
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} 
   no changes found
-  listkeys hook: HG_NAMESPACE=phases HG_VALUES={'539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10': '1', 'publishing': 'True'} 
+  listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} 
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} 
   importing bookmark bar
   $ cd ../a
@@ -207,7 +206,7 @@
   pushing to ../a
   searching for changes
   no changes found
-  listkeys hook: HG_NAMESPACE=phases HG_VALUES={'539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10': '1', 'publishing': 'True'} 
+  listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} 
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} 
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} 
   exporting bookmark baz
--- a/tests/test-largefiles.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-largefiles.t	Mon Jan 23 16:11:37 2012 -0200
@@ -768,7 +768,18 @@
   $ hg st
   A sub2/large6-renamed
   R sub2/large6
-  $ cd ../..
+  $ cd ..
+
+Test --normal flag
+
+  $ dd if=/dev/urandom bs=2k count=11k > new-largefile 2> /dev/null
+  $ hg add --normal --large new-largefile
+  abort: --normal cannot be used with --large
+  [255]
+  $ hg add --normal new-largefile
+  new-largefile: up to 69 MB of RAM may be required to manage this file
+  (use 'hg revert new-largefile' to cancel the pending addition)
+  $ cd ..
 
 vanilla clients not locked out from largefiles servers on vanilla repos
   $ mkdir r1
--- a/tests/test-mq-safety.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-mq-safety.t	Mon Jan 23 16:11:37 2012 -0200
@@ -144,7 +144,18 @@
 
 Pushing applied patch with --rev without --force
 
-  $ hg push -r default ../forcepush2
+All secret
+
+  $ hg push -r . ../forcepush2
+  pushing to ../forcepush2
+  searching for changes
+  no changes to push but 1 secret changesets
+
+some draft
+
+  $ hg phase --draft 'mq()'
+
+  $ hg push -r . ../forcepush2
   pushing to ../forcepush2
   abort: source has mq patches applied
   [255]
@@ -168,11 +179,12 @@
 
 Pushing applied patch with --force
 
+  $ hg phase --force --secret 'mq()'
   $ hg push --force -r default ../forcepush2
   pushing to ../forcepush2
   searching for changes
-  no changes found
-  $ hg phase -d 'mq()'
+  no changes to push but 1 secret changesets
+  $ hg phase --draft 'mq()'
   $ hg push --force -r default ../forcepush2
   pushing to ../forcepush2
   searching for changes
--- a/tests/test-mq.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-mq.t	Mon Jan 23 16:11:37 2012 -0200
@@ -393,8 +393,9 @@
   abort: cannot commit over an applied mq patch
   [255]
 
-push should fail
+push should fail if draft
 
+  $ hg phase --draft 'mq()'
   $ hg push ../../k
   pushing to ../../k
   abort: source has mq patches applied
--- a/tests/test-phases-exchange.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-phases-exchange.t	Mon Jan 23 16:11:37 2012 -0200
@@ -238,10 +238,10 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
   (run 'hg update' to get a working copy)
-  $ hgph
+  $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
   o  4 public a-D - b555f63b6063
   |
-  | o  3 public b-A - f54f1bb90ff3
+  | o  3 draft b-A - f54f1bb90ff3
   | |
   o |  2 public a-C - 54acac6f23ab
   |/
@@ -262,7 +262,7 @@
   |
   | o  4 public a-D - b555f63b6063
   | |
-  o |  3 public b-A - f54f1bb90ff3
+  o |  3 draft b-A - f54f1bb90ff3
   | |
   | o  2 public a-C - 54acac6f23ab
   |/
@@ -288,7 +288,7 @@
   | |
   | o  3 public a-C - 54acac6f23ab
   | |
-  o |  2 public b-A - f54f1bb90ff3
+  o |  2 draft b-A - f54f1bb90ff3
   |/
   o  1 public a-B - 548a3d25dbf0
   |
@@ -497,20 +497,21 @@
   
 
   $ cd ../mu
-  $ hgph # d6bcb4f74035 and 145e75495359 changed because common is too smart
+  $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
+  >      # not ancestor of -r
   o  8 draft a-F - b740e3e5c05d
   |
   o  7 draft a-E - e9f537e46dea
   |
-  | o  6 public n-B - 145e75495359
+  | o  6 draft n-B - 145e75495359
   | |
-  | o  5 public n-A - d6bcb4f74035
+  | o  5 draft n-A - d6bcb4f74035
   | |
   o |  4 public a-D - b555f63b6063
   | |
   o |  3 public a-C - 54acac6f23ab
   | |
-  | o  2 public b-A - f54f1bb90ff3
+  | o  2 draft b-A - f54f1bb90ff3
   |/
   o  1 public a-B - 548a3d25dbf0
   |
@@ -526,20 +527,21 @@
   adding manifests
   adding file changes
   added 2 changesets with 2 changes to 2 files
-  $ hgph # again d6bcb4f74035 and 145e75495359 changed because common is too smart
+  $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
+  >      # not ancestor of -r
   o  8 public a-F - b740e3e5c05d
   |
   o  7 public a-E - e9f537e46dea
   |
-  | o  6 public n-B - 145e75495359
+  | o  6 draft n-B - 145e75495359
   | |
-  | o  5 public n-A - d6bcb4f74035
+  | o  5 draft n-A - d6bcb4f74035
   | |
   o |  4 public a-D - b555f63b6063
   | |
   o |  3 public a-C - 54acac6f23ab
   | |
-  | o  2 public b-A - f54f1bb90ff3
+  | o  2 draft b-A - f54f1bb90ff3
   |/
   o  1 public a-B - 548a3d25dbf0
   |
@@ -569,7 +571,7 @@
   o  0 public a-A - 054250a37db4
   
   $ cd ../alpha
-  $ hgph # e9f537e46dea and b740e3e5c05d should have been sync to 0
+  $ hgph
   @  10 draft a-H - 967b449fbc94
   |
   | o  9 draft a-G - 3e27b6f1eee1
@@ -627,14 +629,14 @@
   
   $ cd ../mu
   $ hgph # d6bcb4f74035 should have changed phase
-  >      # again d6bcb4f74035 and 145e75495359 changed because common was too smart
+  >      # 145e75495359 is still draft. not ancestor of -r
   o  9 draft a-H - 967b449fbc94
   |
   | o  8 public a-F - b740e3e5c05d
   | |
   | o  7 public a-E - e9f537e46dea
   | |
-  +---o  6 public n-B - 145e75495359
+  +---o  6 draft n-B - 145e75495359
   | |
   o |  5 public n-A - d6bcb4f74035
   | |
--- a/tests/test-rebase-scenario-global.t	Fri Jan 20 11:11:36 2012 +0100
+++ b/tests/test-rebase-scenario-global.t	Mon Jan 23 16:11:37 2012 -0200
@@ -277,7 +277,7 @@
 
   $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
   $ hg rebase -d 5 -b 6
-  abort: Can't rebase immutable changeset e1c4361dd923
+  abort: can't rebase immutable changeset e1c4361dd923
   (see hg help phases for details)
   [255]