changeset 23106:5f202d50a7e5 stable

merge with i18n
author Matt Mackall <mpm@selenic.com>
date Thu, 30 Oct 2014 16:57:28 -0500
parents 29bfa964d6d8 (diff) 257b49d4b3ec (current diff)
children 5459b30aa498
files
diffstat 27 files changed, 230 insertions(+), 98 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/zsh_completion	Mon Oct 27 20:38:17 2014 -0200
+++ b/contrib/zsh_completion	Thu Oct 30 16:57:28 2014 -0500
@@ -709,7 +709,7 @@
   '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
   '(--copies -C)'{-C,--copies}'[show copied files]' \
   '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
-  '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \
+  '*'{-r,--rev}'[show the specified revision or revset]:revision:_hg_revrange' \
   '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
   '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
   '(--graph -G)'{-G+,--graph}'[show the revision DAG]' \
--- a/hgext/churn.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/hgext/churn.py	Thu Oct 30 16:57:28 2014 -0500
@@ -92,7 +92,7 @@
 
 @command('churn',
     [('r', 'rev', [],
-     _('count rate for the specified revision or range'), _('REV')),
+     _('count rate for the specified revision or revset'), _('REV')),
     ('d', 'date', '',
      _('count rate for revisions matching date spec'), _('DATE')),
     ('t', 'template', '{author|email}',
--- a/hgext/graphlog.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/hgext/graphlog.py	Thu Oct 30 16:57:28 2014 -0500
@@ -31,7 +31,7 @@
     ('C', 'copies', None, _('show copied files')),
     ('k', 'keyword', [],
      _('do case-insensitive search for a given text'), _('TEXT')),
-    ('r', 'rev', [], _('show the specified revision or range'), _('REV')),
+    ('r', 'rev', [], _('show the specified revision or revset'), _('REV')),
     ('', 'removed', None, _('include revisions where files were removed')),
     ('m', 'only-merges', None, _('show only merges (DEPRECATED)')),
     ('u', 'user', [], _('revisions committed by user'), _('USER')),
--- a/hgext/keyword.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/hgext/keyword.py	Thu Oct 30 16:57:28 2014 -0500
@@ -619,7 +619,7 @@
                 ret = super(kwrepo, self).rollback(dryrun, force)
                 if not dryrun:
                     ctx = self['.']
-                    modified, added = _preselect(self[None].status(), changed)
+                    modified, added = _preselect(ctx.status(), changed)
                     kwt.overwrite(ctx, modified, True, True)
                     kwt.overwrite(ctx, added, True, False)
                 return ret
@@ -702,7 +702,7 @@
             # therefore compare nodes before and after
             kwt.postcommit = True
             ctx = repo['.']
-            wstatus = repo[None].status()
+            wstatus = ctx.status()
             ret = orig(ui, repo, commitfunc, *pats, **opts)
             recctx = repo['.']
             if ctx != recctx:
--- a/hgext/largefiles/reposetup.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/hgext/largefiles/reposetup.py	Thu Oct 30 16:57:28 2014 -0500
@@ -174,14 +174,24 @@
                         for lfile in tocheck:
                             standin = lfutil.standin(lfile)
                             if standin in ctx1:
-                                if ctx1[standin].data().strip() != \
-                                        lfutil.hashfile(self.wjoin(lfile)):
+                                abslfile = self.wjoin(lfile)
+                                if ((ctx1[standin].data().strip() !=
+                                     lfutil.hashfile(abslfile)) or
+                                    (('x' in ctx1.flags(standin)) !=
+                                     bool(lfutil.getexecutable(abslfile)))):
                                     modified.append(lfile)
                                 elif listclean:
                                     clean.append(lfile)
                             else:
                                 added.append(lfile)
 
+                        # at this point, 'removed' contains largefiles
+                        # marked as 'R' in the working context.
+                        # then, largefiles not managed also in the target
+                        # context should be excluded from 'removed'.
+                        removed = [lfile for lfile in removed
+                                   if lfutil.standin(lfile) in ctx1]
+
                     # Standins no longer found in lfdirstate has been
                     # removed
                     for standin in ctx1.walk(lfutil.getstandinmatcher(self)):
--- a/mercurial/bookmarks.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/bookmarks.py	Thu Oct 30 16:57:28 2014 -0500
@@ -271,6 +271,7 @@
     :diverge: diverge
     :differ:  changed, but changeset referred on src is unknown on dst
     :invalid: unknown on both side
+    :same:    same on both side
 
     Each elements of lists in result tuple is tuple "(bookmark name,
     changeset ID on source side, changeset ID on destination
@@ -299,12 +300,9 @@
     else:
         srcmarkset = set(srcmarks)
         dstmarkset = set(dstmarks)
-        bset = srcmarkset ^ dstmarkset
-        for b in srcmarkset & dstmarkset:
-            if srchex(srcmarks[b]) != dsthex(dstmarks[b]):
-                bset.add(b)
+        bset = srcmarkset | dstmarkset
 
-    results = ([], [], [], [], [], [], [])
+    results = ([], [], [], [], [], [], [], [])
     addsrc = results[0].append
     adddst = results[1].append
     advsrc = results[2].append
@@ -312,6 +310,7 @@
     diverge = results[4].append
     differ = results[5].append
     invalid = results[6].append
+    same = results[7].append
 
     for b in sorted(bset):
         if b not in srcmarks:
@@ -324,7 +323,9 @@
         else:
             scid = srchex(srcmarks[b])
             dcid = dsthex(dstmarks[b])
-            if scid in repo and dcid in repo:
+            if scid == dcid:
+                same((b, scid, dcid))
+            elif scid in repo and dcid in repo:
                 sctx = repo[scid]
                 dctx = repo[dcid]
                 if sctx.rev() < dctx.rev():
@@ -365,7 +366,7 @@
 def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
     ui.debug("checking for updated bookmarks\n")
     localmarks = repo._bookmarks
-    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
+    (addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same
      ) = compare(repo, remotemarks, localmarks, dsthex=hex)
 
     status = ui.status
--- a/mercurial/changelog.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/changelog.py	Thu Oct 30 16:57:28 2014 -0500
@@ -172,10 +172,10 @@
     def headrevs(self):
         if self.filteredrevs:
             try:
-                return self.index.headrevs(self.filteredrevs)
-            # AttributeError covers non-c-extension environments.
-            # TypeError allows us work with old c extensions.
-            except (AttributeError, TypeError):
+                return self.index.headrevsfiltered(self.filteredrevs)
+            # AttributeError covers non-c-extension environments and
+            # old c extensions without filter handling.
+            except AttributeError:
                 return self._headrevs()
 
         return super(changelog, self).headrevs()
--- a/mercurial/cmdutil.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/cmdutil.py	Thu Oct 30 16:57:28 2014 -0500
@@ -2121,6 +2121,11 @@
                       scmutil.match(repo[None], pats, opts), opts)
 
 def amend(ui, repo, commitfunc, old, extra, pats, opts):
+    # amend will reuse the existing user if not specified, but the obsolete
+    # marker creation requires that the current user's name is specified.
+    if obsolete._enabled:
+        ui.username() # raise exception if username not set
+
     ui.note(_('amending changeset %s\n') % old)
     base = old.p1()
 
--- a/mercurial/commands.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/commands.py	Thu Oct 30 16:57:28 2014 -0500
@@ -4322,7 +4322,7 @@
     ('C', 'copies', None, _('show copied files')),
     ('k', 'keyword', [],
      _('do case-insensitive search for a given text'), _('TEXT')),
-    ('r', 'rev', [], _('show the specified revision or range'), _('REV')),
+    ('r', 'rev', [], _('show the specified revision or revset'), _('REV')),
     ('', 'removed', None, _('include revisions where files were removed')),
     ('m', 'only-merges', None, _('show only merges (DEPRECATED)')),
     ('u', 'user', [], _('revisions committed by user'), _('USER')),
--- a/mercurial/context.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/context.py	Thu Oct 30 16:57:28 2014 -0500
@@ -121,10 +121,11 @@
 
         modified, added, clean = [], [], []
         deleted, unknown, ignored = s[3], s[4], s[5]
+        deletedset = set(deleted)
         withflags = mf1.withflags() | mf2.withflags()
         for fn, mf2node in mf2.iteritems():
             if fn in mf1:
-                if (fn not in deleted and
+                if (fn not in deletedset and
                     ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or
                      (mf1[fn] != mf2node and
                       (mf2node or self[fn].cmp(other[fn]))))):
@@ -132,7 +133,7 @@
                 elif listclean:
                     clean.append(fn)
                 del mf1[fn]
-            elif fn not in deleted:
+            elif fn not in deletedset:
                 added.append(fn)
         removed = mf1.keys()
         if removed:
@@ -1499,13 +1500,9 @@
                listclean=False, listunknown=False, listsubrepos=False):
         # yet to be determined: what to do if 'other' is a 'workingctx' or a
         # 'memctx'?
-        s = super(workingctx, self).status(other, match, listignored, listclean,
-                                           listunknown, listsubrepos)
-        # calling 'super' subtly reveresed the contexts, so we flip the results
-        # (s[1] is 'added' and s[2] is 'removed')
-        s = list(s)
-        s[1], s[2] = s[2], s[1]
-        return scmutil.status(*s)
+        return super(workingctx, self).status(other, match, listignored,
+                                              listclean, listunknown,
+                                              listsubrepos)
 
 class committablefilectx(basefilectx):
     """A committablefilectx provides common functionality for a file context
--- a/mercurial/exchange.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/exchange.py	Thu Oct 30 16:57:28 2014 -0500
@@ -333,7 +333,7 @@
     explicit = set(pushop.bookmarks)
 
     comp = bookmod.compare(repo, repo._bookmarks, remotebookmark, srchex=hex)
-    addsrc, adddst, advsrc, advdst, diverge, differ, invalid = comp
+    addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = comp
     for b, scid, dcid in advsrc:
         if b in explicit:
             explicit.remove(b)
@@ -355,6 +355,10 @@
             explicit.remove(b)
             # treat as "deleted locally"
             pushop.outbookmarks.append((b, dcid, ''))
+    # identical bookmarks shouldn't get reported
+    for b, scid, dcid in same:
+        if b in explicit:
+            explicit.remove(b)
 
     if explicit:
         explicit = sorted(explicit)
--- a/mercurial/httppeer.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/httppeer.py	Thu Oct 30 16:57:28 2014 -0500
@@ -214,6 +214,7 @@
 
     def _calltwowaystream(self, cmd, fp, **args):
         fh = None
+        fp_ = None
         filename = None
         try:
             # dump bundle to disk
@@ -225,10 +226,12 @@
                 d = fp.read(4096)
             fh.close()
             # start http push
-            fp = httpconnection.httpsendfile(self.ui, filename, "rb")
+            fp_ = httpconnection.httpsendfile(self.ui, filename, "rb")
             headers = {'Content-Type': 'application/mercurial-0.1'}
-            return self._callstream(cmd, data=fp, headers=headers, **args)
+            return self._callstream(cmd, data=fp_, headers=headers, **args)
         finally:
+            if fp_ is not None:
+                fp_.close()
             if fh is not None:
                 fh.close()
                 os.unlink(filename)
--- a/mercurial/parsers.c	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/parsers.c	Thu Oct 30 16:57:28 2014 -0500
@@ -2109,7 +2109,9 @@
 	{"get", (PyCFunction)index_m_get, METH_VARARGS,
 	 "get an index entry"},
 	{"headrevs", (PyCFunction)index_headrevs, METH_VARARGS,
-	 "get head revisions"},
+	 "get head revisions"}, /* Can do filtering since 3.2 */
+	{"headrevsfiltered", (PyCFunction)index_headrevs, METH_VARARGS,
+	 "get filtered head revisions"}, /* Can always do filtering */
 	{"insert", (PyCFunction)index_insert, METH_VARARGS,
 	 "insert an index entry"},
 	{"partialmatch", (PyCFunction)index_partialmatch, METH_VARARGS,
--- a/mercurial/revset.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/revset.py	Thu Oct 30 16:57:28 2014 -0500
@@ -2500,7 +2500,7 @@
         return len(self._list)
 
     def __nonzero__(self):
-        return bool(self._r1 or self._r2)
+        return bool(self._r1) or bool(self._r2)
 
     @util.propertycache
     def _list(self):
--- a/mercurial/setdiscovery.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/setdiscovery.py	Thu Oct 30 16:57:28 2014 -0500
@@ -105,14 +105,19 @@
     # update from roots
     _updatesample(dag.inverse(), nodes, sample, always)
     assert sample
-    if len(sample) > desiredlen:
-        sample = set(random.sample(sample, desiredlen))
-    elif len(sample) < desiredlen:
+    sample = _limitsample(sample, desiredlen)
+    if len(sample) < desiredlen:
         more = desiredlen - len(sample)
         sample.update(random.sample(list(nodes - sample - always), more))
     sample.update(always)
     return sample
 
+def _limitsample(sample, desiredlen):
+    """return a random subset of sample of at most desiredlen item"""
+    if len(sample) > desiredlen:
+        sample = set(random.sample(sample, desiredlen))
+    return sample
+
 def findcommonheads(ui, local, remote,
                     initialsamplesize=100,
                     fullsamplesize=200,
@@ -128,7 +133,7 @@
     ui.debug("query 1; heads\n")
     roundtrips += 1
     ownheads = dag.heads()
-    sample = ownheads
+    sample = _limitsample(ownheads, initialsamplesize)
     if remote.local():
         # stopgap until we have a proper localpeer that supports batch()
         srvheadhashes = remote.heads()
--- a/mercurial/transaction.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/transaction.py	Thu Oct 30 16:57:28 2014 -0500
@@ -205,6 +205,26 @@
         assert vfs is None or filenames == ('bookmarks',)
         self._filegenerators[genid] = (order, filenames, genfunc, vfs)
 
+    def _generatefiles(self):
+        # write files registered for generation
+        for entry in sorted(self._filegenerators.values()):
+            order, filenames, genfunc, vfs = entry
+            if vfs is None:
+                vfs = self.opener
+            files = []
+            try:
+                for name in filenames:
+                    # Some files are already backed up when creating the
+                    # localrepo. Until this is properly fixed we disable the
+                    # backup for them.
+                    if name not in ('phaseroots', 'bookmarks'):
+                        self.addbackup(name)
+                    files.append(vfs(name, 'w', atomictemp=True))
+                genfunc(*files)
+            finally:
+                for f in files:
+                    f.close()
+
     @active
     def find(self, file):
         if file in self.map:
@@ -246,26 +266,8 @@
     @active
     def close(self):
         '''commit the transaction'''
-        # write files registered for generation
-        for entry in sorted(self._filegenerators.values()):
-            order, filenames, genfunc, vfs = entry
-            if vfs is None:
-                vfs = self.opener
-            files = []
-            try:
-                for name in filenames:
-                    # Some files are already backed up when creating the
-                    # localrepo. Until this is properly fixed we disable the
-                    # backup for them.
-                    if name not in ('phaseroots', 'bookmarks'):
-                        self.addbackup(name)
-                    files.append(vfs(name, 'w', atomictemp=True))
-                genfunc(*files)
-            finally:
-                for f in files:
-                    f.close()
-
         if self.count == 1 and self.onclose is not None:
+            self._generatefiles()
             self.onclose()
 
         self.count -= 1
--- a/mercurial/util.py	Mon Oct 27 20:38:17 2014 -0200
+++ b/mercurial/util.py	Thu Oct 30 16:57:28 2014 -0500
@@ -899,11 +899,8 @@
 
     The root should be normcase-ed, too.
     '''
-    def find(p, contents):
-        for n in contents:
-            if normcase(n) == p:
-                return n
-        return None
+    def _makefspathcacheentry(dir):
+        return dict((normcase(n), n) for n in os.listdir(dir))
 
     seps = os.sep
     if os.altsep:
@@ -919,16 +916,15 @@
             continue
 
         if dir not in _fspathcache:
-            _fspathcache[dir] = os.listdir(dir)
+            _fspathcache[dir] = _makefspathcacheentry(dir)
         contents = _fspathcache[dir]
 
-        found = find(part, contents)
+        found = contents.get(part)
         if not found:
             # retry "once per directory" per "dirstate.walk" which
             # may take place for each patches of "hg qpush", for example
-            contents = os.listdir(dir)
-            _fspathcache[dir] = contents
-            found = find(part, contents)
+            _fspathcache[dir] = contents = _makefspathcacheentry(dir)
+            found = contents.get(part)
 
         result.append(found or part)
         dir = os.path.join(dir, part)
--- a/tests/test-alias.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-alias.t	Thu Oct 30 16:57:28 2014 -0500
@@ -394,9 +394,18 @@
   $ cat >> .hg/hgrc <<EOF
   > [extensions]
   > hgext.rebase =
+  > EOF
+#if windows
+  $ cat >> .hg/hgrc <<EOF
+  > [alias]
+  > rebate = !echo this is %HG_ARGS%
+  > EOF
+#else
+  $ cat >> .hg/hgrc <<EOF
   > [alias]
   > rebate = !echo this is \$HG_ARGS
   > EOF
+#endif
   $ hg reba
   hg: command 'reba' is ambiguous:
       rebase rebate
--- a/tests/test-bookmarks-pushpull.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-bookmarks-pushpull.t	Thu Oct 30 16:57:28 2014 -0500
@@ -438,3 +438,29 @@
   cc978a373a53 tip W
 
   $ cd ..
+
+pushing an unchanged bookmark should result in no changes
+
+  $ hg init unchanged-a
+  $ hg init unchanged-b
+  $ cd unchanged-a
+  $ echo initial > foo
+  $ hg commit -A -m initial
+  adding foo
+  $ hg bookmark @
+  $ hg push -B @ ../unchanged-b
+  pushing to ../unchanged-b
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  exporting bookmark @
+
+  $ hg push -B @ ../unchanged-b
+  pushing to ../unchanged-b
+  searching for changes
+  no changes found
+  [1]
+
+  $ cd ..
--- a/tests/test-clone.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-clone.t	Thu Oct 30 16:57:28 2014 -0500
@@ -67,7 +67,6 @@
 #else
   $ hg --debug clone -U . ../c
   copied 8 files
-  listing keys for "bookmarks"
 #endif
   $ cd ../c
 
--- a/tests/test-commandserver.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-commandserver.t	Thu Oct 30 16:57:28 2014 -0500
@@ -557,7 +557,7 @@
   $ cd repo
   $ hg update -q
 
-#if unix-socket
+#if unix-socket unix-permissions
 
   >>> import cStringIO
   >>> from hgclient import unixserver, readchannel, runcommand, check
@@ -602,8 +602,8 @@
   listening at .hg/server.sock
   abort: unknown command unknowncommand
   killed!
-
-#else
+#endif
+#if no-unix-socket
 
   $ hg serve --cmdserver unix -a .hg/server.sock
   abort: unsupported platform
--- a/tests/test-convert-svn-sink.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-convert-svn-sink.t	Thu Oct 30 16:57:28 2014 -0500
@@ -224,15 +224,21 @@
   adding link
   $ hg --cwd a mv link newlink
   $ hg --cwd a commit -m 'move symlink'
-  $ hg convert -d svn a
-  assuming destination a-hg
-  initializing svn working copy 'a-hg-wc'
+  $ hg convert -d svn a a-svnlink
+  initializing svn repository 'a-svnlink'
+  initializing svn working copy 'a-svnlink-wc'
   scanning source...
   sorting...
   converting...
+  7 add a file
+  6 modify a file
+  5 rename a file
+  4 copy a file
+  3 remove a file
+  2 make a file executable
   1 add symlink
   0 move symlink
-  $ svnupanddisplay a-hg-wc 1
+  $ svnupanddisplay a-svnlink-wc 1
    8 1 test d1
    8 1 test d1/d2
    8 1 test d1/d2/b
@@ -245,6 +251,13 @@
    D /link
    A /newlink (from /link@7)
 
+Make sure our changes don't affect the rest of the test cases
+
+  $ hg --cwd a up 5
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg --cwd a --config extensions.strip= strip -r 6
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-backup.hg (glob)
+
 #endif
 
 Convert with --full adds and removes files that didn't change
@@ -260,17 +273,16 @@
   converting...
   0 f
   $ svnupanddisplay a-hg-wc 1
-   9 9 test .
-   9 9 test d
-   9 9 test f
-  revision: 9
+   7 7 test .
+   7 7 test d
+   7 7 test f
+  revision: 7
   author: test
   msg: f
    D /c
    A /d
    D /d1
    A /f
-   D /newlink
 
   $ rm -rf a a-hg a-hg-wc
 
--- a/tests/test-diff-reverse.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-diff-reverse.t	Thu Oct 30 16:57:28 2014 -0500
@@ -42,3 +42,24 @@
   -g
   -h
 
+should show removed file 'a' as being added
+  $ hg revert a
+  $ hg rm a
+  $ hg diff --reverse --nodates a
+  diff -r 2855cdcfcbb7 a
+  --- /dev/null
+  +++ b/a
+  @@ -0,0 +1,3 @@
+  +d
+  +e
+  +f
+
+should show added file 'b' as being removed
+  $ echo b >> b
+  $ hg add b
+  $ hg diff --reverse --nodates b
+  diff -r 2855cdcfcbb7 b
+  --- a/b
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -b
--- a/tests/test-largefiles-update.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-largefiles-update.t	Thu Oct 30 16:57:28 2014 -0500
@@ -543,4 +543,40 @@
   $ cat largeX
   largeX
 
+Test that "hg status" doesn't show removal of largefiles not managed
+in the target context.
+
+  $ hg update -q -C 4
+  $ hg remove largeX
+  $ hg status -A largeX
+  R largeX
+  $ hg status -A --rev '.^1' largeX
+
+#if execbit
+
+Test that "hg status" against revisions other than parent notices exec
+bit changes of largefiles.
+
+  $ hg update -q -C 4
+
+(the case that large2 doesn't have exec bit in the target context but
+in the working context)
+
+  $ chmod +x large2
+  $ hg status -A --rev 0 large2
+  M large2
+  $ hg commit -m 'chmod +x large2'
+
+(the case that large2 has exec bit in the target context but not in
+the working context)
+
+  $ echo dummy > dummy
+  $ hg add dummy
+  $ hg commit -m 'revision for separation'
+  $ chmod -x large2
+  $ hg status -A --rev '.^1' large2
+  M large2
+
+#endif
+
   $ cd ..
--- a/tests/test-obsolete.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-obsolete.t	Thu Oct 30 16:57:28 2014 -0500
@@ -83,7 +83,7 @@
   $ mkcommit new_c
   created new head
   $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
-  $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c`  `getid new_c` -d '56 120'
+  $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c`  `getid new_c` -d '121 120'
   $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
   2:245bde4270cd add original_c
   $ hg debugrevlog -cd
@@ -93,7 +93,7 @@
       2     1    -1   118   204         59   59   59    0      76       192           0     1        1
       3     1    -1   204   271        204  204   59    0      66       258           0     2        0
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
 
 (check for version number of the obsstore)
 
@@ -108,7 +108,7 @@
   created new head
   $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
 
 Register two markers with a missing node
@@ -120,7 +120,7 @@
   $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
   $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -281,7 +281,7 @@
   added 4 changesets with 4 changes to 4 files (+1 heads)
   (run 'hg heads' to see heads, 'hg merge' to merge)
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -291,7 +291,7 @@
 
   $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -302,7 +302,7 @@
   $ hg rollback
   repository tip rolled back to revision 3 (undo debugobsolete)
   $ hg debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -322,7 +322,7 @@
   added 4 changesets with 4 changes to 4 files (+1 heads)
   $ hg -R tmpd debugobsolete | sort
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
@@ -360,7 +360,7 @@
   o  0:1f0dee641bb7 (public) [ ] add a
   
   $ hg -R clone-dest debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -385,7 +385,7 @@
   (run 'hg heads' to see heads, 'hg merge' to merge)
   $ hg debugobsolete
   1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -400,7 +400,7 @@
   no changes found
   [1]
   $ hg -R ../tmpc debugobsolete
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -548,7 +548,7 @@
 
   $ hg debugobsolete
   1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
@@ -570,7 +570,7 @@
   $ hg debugobsolete --hidden --rev 3
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
   1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
@@ -581,7 +581,7 @@
   $ hg debugobsolete --hidden --rev 3::6
   1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
   1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
-  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Wed Dec 31 23:58:56 1969 -0002) {'user': 'test'}
+  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
   5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
   94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
--- a/tests/test-setdiscovery.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-setdiscovery.t	Thu Oct 30 16:57:28 2014 -0500
@@ -311,16 +311,16 @@
   searching for changes
   taking quick initial sample
   searching: 2 queries
-  query 2; still undecided: 1080, sample size is: 260
+  query 2; still undecided: 1240, sample size is: 260
   sampling from both directions
   searching: 3 queries
-  query 3; still undecided: 820, sample size is: 260
+  query 3; still undecided: 980, sample size is: 260
   sampling from both directions
   searching: 4 queries
-  query 4; still undecided: 560, sample size is: 260
+  query 4; still undecided: 720, sample size is: 260
   sampling from both directions
   searching: 5 queries
-  query 5; still undecided: 300, sample size is: 200
+  query 5; still undecided: 460, sample size is: 200
   5 total queries
   common heads: 3ee37d65064a
 
--- a/tests/test-transplant.t	Mon Oct 27 20:38:17 2014 -0200
+++ b/tests/test-transplant.t	Thu Oct 30 16:57:28 2014 -0500
@@ -99,7 +99,11 @@
   > env | grep HGEDITFORM
   > true
   > EOF
-  $ HGEDITOR="sh $TESTTMP/checkeditform.sh; cat" hg transplant --edit 7
+  $ cat > $TESTTMP/checkeditform-n-cat.sh <<EOF
+  > env | grep HGEDITFORM
+  > cat \$*
+  > EOF
+  $ HGEDITOR="sh $TESTTMP/checkeditform-n-cat.sh" hg transplant --edit 7
   applying ffd6818a3975
   HGEDITFORM=transplant.normal
   b3