# HG changeset patch # User Pierre-Yves David # Date 1414940760 0 # Node ID 3de3d85069fd694b7cd61e166c1ba88fb47957ba # Parent cc19b6400dae8a333980f6961df7cb1e86a93655# Parent fb51113a1c08e252b0b98d6ecb79d0563d541388 merge 5.x line into stable (drop pre hg-3.2 compat) diff -r cc19b6400dae -r 3de3d85069fd .hgtags --- a/.hgtags Tue Sep 30 10:27:54 2014 -0500 +++ b/.hgtags Sun Nov 02 15:06:00 2014 +0000 @@ -25,3 +25,4 @@ 0304fc2bab158658df53a8f4edd5aa300a9497d2 4.0.0 e914884fb7210d6350d94909cb25ebc602359680 4.0.1 4d5d101e878f6d6264a8e036b11afdf922c4ef94 4.1.0 +c13b408c00066af78cda88734909c6f2f3505f76 5.0.0 diff -r cc19b6400dae -r 3de3d85069fd README --- a/README Tue Sep 30 10:27:54 2014 -0500 +++ b/README Sun Nov 02 15:06:00 2014 +0000 @@ -57,8 +57,14 @@ Changelog ========= -4.2.0 -- +5.0.1 -- +- amend: fix --logfile argument +- evolve: preserve branch change when evolving + +5.0.0 -- 2014-10-22 + +- drop compat with Mercurial pre 3.2 - uncommit: add a --rev argument - evolve: add a `working directory now at xxxxxxxxxx` message - evolve: automatically translate obsolete hashes when evolving @@ -66,6 +72,11 @@ - prune: work around a massive slowdown from lazy revset - grab: "fix" the grab alias on window +- fix an issue where prune performance were quadratic with the number of + changesets pruned. +- pull: use discovery to pull less obsmarkers through bundle2 + + 4.1.0 -- 2014-08-08 - amend: add -D/--current-date option diff -r cc19b6400dae -r 3de3d85069fd debian/rules --- a/debian/rules Tue Sep 30 10:27:54 2014 -0500 +++ b/debian/rules Sun Nov 02 15:06:00 2014 +0000 @@ -1,10 +1,11 @@ #!/usr/bin/make -f +#export DH_VERBOSE=1 -clean %: +%: dh $@ --with python2 --buildsystem=python_distutils -build: - dh build --with python2 --buildsystem=python_distutils +override_dh_auto_build: + dh_auto_build $(MAKE) -C docs ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS))) @@ -17,12 +18,11 @@ find debian -name __init__.py -delete dh_python2 -clean: clean-docs +override_dh_auto_clean: clean-docs + dh_auto_clean rm -f tests/*.err clean-docs: rm -rf html rm -f docs/static/logo-evolve.ico rm -f docs/tutorials/tutorial.rst - -.PHONY: build clean clean-docs diff -r cc19b6400dae -r 3de3d85069fd hgext/drophack.py --- a/hgext/drophack.py Tue Sep 30 10:27:54 2014 -0500 +++ b/hgext/drophack.py Sun Nov 02 15:06:00 2014 +0000 @@ -119,7 +119,7 @@ newrevs = repo.revs('max(::. - %ld)', revs) if newrevs: assert len(newrevs) == 1 - newrev = newrevs[0] + newrev = newrevs.first() else: newrev = -1 commands.update(ui, repo, newrev) diff -r cc19b6400dae -r 3de3d85069fd hgext/evolve.py --- a/hgext/evolve.py Tue Sep 30 10:27:54 2014 -0500 +++ b/hgext/evolve.py Sun Nov 02 15:06:00 2014 +0000 @@ -19,7 +19,7 @@ - improves some aspect of the early implementation in Mercurial core ''' -testedwith = '3.0.1 3.1' +testedwith = '3.2' buglink = 'http://bz.selenic.com/' import sys, os @@ -85,7 +85,7 @@ return oldmemfilectx(*args, **kwargs) else: raise util.Abort('Your Mercurial is too old for this version of Evolve\n' - 'requires version 3.0.1 or above') + 'requires version 3.2 or above') # This extension contains the following code @@ -97,19 +97,6 @@ ##################################################################### -### Compatibility with core ### -##################################################################### - - -def retractboundary(repo, tr, targetphase, nodes): - """Older mercurial version does not move phase within a transaction""" - try: - return phases.retractboundary(repo, tr, targetphase, nodes) - except TypeError: - return phases.retractboundary(repo, targetphase, nodes) - - -##################################################################### ### Extension helper ### ##################################################################### @@ -362,120 +349,6 @@ if not opts.get('user') and opts.get('current_user'): opts['user'] = ui.username() - -createmarkers = obsolete.createmarkers -if not util.safehasattr(obsolete.obsstore, 'relevantmarkers'): - - @eh.wrapfunction(mercurial.obsolete, 'createmarkers') - def _createmarkers(orig, repo, relations, *args, **kwargs): - """register parent information at prune time""" - # every time this test is run, a kitten is slain. - # Change it as soon as possible - if '[,{metadata}]' in orig.__doc__: - relations = list(relations) - for idx, rel in enumerate(relations): - prec = rel[0] - sucs = rel[1] - if not sucs: - meta = {} - if 2 < len(rel): - meta.update(rel[2]) - for i, p in enumerate(prec.parents(), 1): - meta['p%i' % i] = p.hex() - relations[idx] = (prec, sucs, meta) - return orig(repo, relations, *args, **kwargs) - - def createmarkers(*args, **kwargs): - return obsolete.createmarkers(*args, **kwargs) - - class pruneobsstore(obsolete.obsstore): - - def __init__(self, *args, **kwargs): - self.prunedchildren = {} - return super(pruneobsstore, self).__init__(*args, **kwargs) - - def _load(self, markers): - markers = self._prunedetectingmarkers(markers) - return super(pruneobsstore, self)._load(markers) - - - def _prunedetectingmarkers(self, markers): - for m in markers: - if not m[1]: # no successors - meta = obsolete.decodemeta(m[3]) - if 'p1' in meta: - p1 = node.bin(meta['p1']) - self.prunedchildren.setdefault(p1, set()).add(m) - if 'p2' in meta: - p2 = node.bin(meta['p2']) - self.prunedchildren.setdefault(p2, set()).add(m) - yield m - - obsolete.obsstore = pruneobsstore - - @eh.addattr(obsolete.obsstore, 'relevantmarkers') - def relevantmarkers(self, nodes): - """return a set of all obsolescence marker relevant to a set of node. - - "relevant" to a set of node mean: - - - marker that use this changeset as successors - - prune marker of direct children on this changeset. - - recursive application of the two rules on precursors of these markers - - It a set so you cannot rely on order""" - seennodes = set(nodes) - seenmarkers = set() - pendingnodes = set(nodes) - precursorsmarkers = self.precursors - prunedchildren = self.prunedchildren - while pendingnodes: - direct = set() - for current in pendingnodes: - direct.update(precursorsmarkers.get(current, ())) - direct.update(prunedchildren.get(current, ())) - direct -= seenmarkers - pendingnodes = set([m[0] for m in direct]) - seenmarkers |= direct - pendingnodes -= seennodes - seennodes |= pendingnodes - return seenmarkers - -@command('debugobsoleterelevant', - [], - 'REVSET') -def debugobsoleterelevant(ui, repo, *revsets): - """print allobsolescence marker relevant to a set of revision""" - nodes = [ctx.node() for ctx in repo.set('%lr', revsets)] - markers = repo.obsstore.relevantmarkers(nodes) - for rawmarker in sorted(markers): - marker = obsolete.marker(repo, rawmarker) - cmdutil.showmarker(ui, marker) - - -##################################################################### -### Critical fix ### -##################################################################### - -@eh.wrapfunction(mercurial.obsolete, '_readmarkers') -def safereadmarkers(orig, data): - """safe maker wrapper to remove nullid succesors - - Nullid successors was created by older version of evolve. - """ - nb = 0 - for marker in orig(data): - if nullid in marker[1]: - marker = (marker[0], - tuple(s for s in marker[1] if s != nullid), - marker[2], - marker[3]) - nb += 1 - yield marker - if nb: - e = sys.stderr - print >> e, 'repo contains %i invalid obsolescence markers' % nb - getrevs = obsolete.getrevs ##################################################################### @@ -738,28 +611,21 @@ ui.warn(_('%i new divergent changesets\n') % newdivergents) return ret -@eh.reposetup -def _repostabilizesetup(ui, repo): +@eh.wrapfunction(mercurial.exchange, 'push') +def push(orig, repo, *args, **opts): """Add a hint for "hg evolve" when troubles make push fails """ - if not repo.local(): - return - - class evolvingrepo(repo.__class__): - def push(self, remote, *args, **opts): - """wrapper around pull that pull obsolete relation""" - try: - result = super(evolvingrepo, self).push(remote, *args, **opts) - except util.Abort, ex: - hint = _("use 'hg evolve' to get a stable history " - "or --force to ignore warnings") - if (len(ex.args) >= 1 - and ex.args[0].startswith('push includes ') - and ex.hint is None): - ex.hint = hint - raise - return result - repo.__class__ = evolvingrepo + try: + return orig(repo, *args, **opts) + except util.Abort, ex: + hint = _("use 'hg evolve' to get a stable history " + "or --force to ignore warnings") + if (len(ex.args) >= 1 + and ex.args[0].startswith('push includes ') + and ex.hint is None): + ex.hint = hint + raise + return result def summaryhook(ui, repo): def write(fmt, count): @@ -859,7 +725,7 @@ isexec='x' in flags, copied=copied.get(path)) return mctx - raise IOError() + return None message = cmdutil.logmessage(repo.ui, commitopts) if not message: @@ -892,7 +758,7 @@ class MergeFailure(util.Abort): pass -def relocate(repo, orig, dest): +def relocate(repo, orig, dest, keepbranch=False): """rewrite on dest""" if orig.rev() == dest.rev(): raise util.Abort(_('tried to relocate a node on top of itself'), @@ -906,7 +772,7 @@ if not orig.p2().rev() == node.nullrev: raise util.Abort( 'no support for evolving merge changesets yet', - hint="Redo the merge and use `hg prune` to obsolete the old one") + hint="Redo the merge and use `hg prune --succ ` to obsolete the old one") destbookmarks = repo.nodebookmarks(dest.node()) nodesrc = orig.node() destphase = repo[nodesrc].phase() @@ -934,32 +800,45 @@ commitmsg = commitmsg.replace(sha1, newsha1[:len(sha1)]) else: repo.ui.note(_('The stale commit message reference to %s could ' - 'not be updated') % sha1) + 'not be updated\n') % sha1) tr = repo.transaction('relocate') try: try: r = rebase.rebasenode(repo, orig.node(), dest.node(), - {node.nullrev: node.nullrev}, False) + {node.nullrev: node.nullrev}, False, + orig.p1().node()) if r[-1]: #some conflict raise util.Abort( 'unresolved merge conflicts (see hg help resolve)') - cmdutil.duplicatecopies(repo, orig.node(), dest.node()) + if keepbranch: + def _extrafn(ctx, extra): + extra['branch'] = ctx.branch() + else: + _extrafn = (lambda ctx, extra: None) + nodenew = rebase.concludenode(repo, orig.node(), dest.node(), - node.nullid, commitmsg) + node.nullid, commitmsg, + extrafn=_extrafn) except util.Abort, exc: + repo.dirstate.beginparentchange() + repo.setparents(repo['.'].node(), nullid) + repo.dirstate.write() + # fix up dirstate for copies and renames + copies.duplicatecopies(repo, dest.rev(), orig.p1().rev()) + repo.dirstate.endparentchange() class LocalMergeFailure(MergeFailure, exc.__class__): pass exc.__class__ = LocalMergeFailure raise oldbookmarks = repo.nodebookmarks(nodesrc) if nodenew is not None: - retractboundary(repo, tr, destphase, [nodenew]) - createmarkers(repo, [(repo[nodesrc], (repo[nodenew],))]) + phases.retractboundary(repo, tr, destphase, [nodenew]) + obsolete.createmarkers(repo, [(repo[nodesrc], (repo[nodenew],))]) for book in oldbookmarks: repo._bookmarks[book] = nodenew else: - createmarkers(repo, [(repo[nodesrc], ())]) + obsolete.createmarkers(repo, [(repo[nodesrc], ())]) # Behave like rebase, move bookmarks to dest for book in oldbookmarks: repo._bookmarks[book] = dest.node() @@ -1116,7 +995,6 @@ sucscount = [0, 0 , 0, 0] known = 0 parentsdata = 0 - metatotallenght = 0 metakeys = {} # node -> cluster mapping # a cluster is a (set(nodes), set(markers)) tuple @@ -1128,11 +1006,11 @@ known += 1 nbsucs = len(mark[1]) sucscount[min(nbsucs, 3)] += 1 - metatotallenght += len(mark[3]) - meta = obsolete.decodemeta(mark[3]) - for key in meta: + meta = mark[3] + for key, value in meta: metakeys.setdefault(key, 0) metakeys[key] += 1 + meta = dict(meta) parents = [meta.get('p1'), meta.get('p2')] parents = [node.bin(p) for p in parents if p is not None] if parents: @@ -1193,8 +1071,6 @@ ui.write(' 2 successors: %9i\n' % sucscount[2]) ui.write(' more than 2 successors: %9i\n' % sucscount[3]) # meta data info - ui.write('average meta length: %9i\n' - % (metatotallenght/len(store._all))) ui.write(' available keys:\n') for key in sorted(metakeys): ui.write(' %15s: %9i\n' % (key, metakeys[key])) @@ -1445,7 +1321,8 @@ # search of a parent which is not killed while not newer or newer == [()]: ui.debug("stabilize target %s is plain dead," - " trying to stabilize on its parent") + " trying to stabilize on its parent\n" % + obs) obs = obs.parents()[0] newer = obsolete.successorssets(repo, obs.node()) if len(newer) > 1: @@ -1472,8 +1349,9 @@ else: repo.ui.note(todo) if progresscb: progresscb() + keepbranch = orig.p1().branch() != orig.branch() try: - relocate(repo, orig, target) + relocate(repo, orig, target, keepbranch) except MergeFailure: repo.opener.write('graftstate', orig.hex() + '\n') repo.ui.write_err(_('evolve failed!\n')) @@ -1524,7 +1402,7 @@ tmpid = relocate(repo, bumped, prec.p1()) if tmpid is not None: tmpctx = repo[tmpid] - createmarkers(repo, [(bumped, (tmpctx,))]) + obsolete.createmarkers(repo, [(bumped, (tmpctx,))]) except MergeFailure: repo.opener.write('graftstate', bumped.hex() + '\n') repo.ui.write_err(_('evolution failed!\n')) @@ -1551,7 +1429,7 @@ isexec='x' in flags, copied=copied.get(path)) return mctx - raise IOError() + return None text = 'bumped update to %s:\n\n' % prec text += bumped.description() @@ -1566,11 +1444,11 @@ newid = repo.commitctx(new) if newid is None: - createmarkers(repo, [(tmpctx, ())]) + obsolete.createmarkers(repo, [(tmpctx, ())]) newid = prec.node() else: - retractboundary(repo, tr, bumped.phase(), [newid]) - createmarkers(repo, [(tmpctx, (repo[newid],))], + phases.retractboundary(repo, tr, bumped.phase(), [newid]) + obsolete.createmarkers(repo, [(tmpctx, (repo[newid],))], flag=obsolete.bumpedfix) bmupdate(newid) tr.close() @@ -1578,7 +1456,9 @@ finally: tr.release() # reroute the working copy parent to the new changeset + repo.dirstate.beginparentchange() repo.dirstate.setparents(newid, node.nullid) + repo.dirstate.endparentchange() def _solvedivergent(ui, repo, divergent, dryrun=False, confirm=False, progresscb=None): @@ -1666,7 +1546,9 @@ if progresscb: progresscb() tr = repo.transaction('stabilize-divergent') try: + repo.dirstate.beginparentchange() repo.dirstate.setparents(divergent.node(), node.nullid) + repo.dirstate.endparentchange() oldlen = len(repo) amend(ui, repo, message='', logfile='') if oldlen == len(repo): @@ -1674,8 +1556,8 @@ # no changes else: new = repo['.'] - createmarkers(repo, [(other, (new,))]) - retractboundary(repo, tr, other.phase(), [new.node()]) + obsolete.createmarkers(repo, [(other, (new,))]) + phases.retractboundary(repo, tr, other.phase(), [new.node()]) tr.close() finally: tr.release() @@ -1782,8 +1664,10 @@ "ancestors(bookmark() and not bookmark(%s)) - " "obsolete()", mark, mark, mark) + revs = set(revs) revs.update(set(rsrevs)) - return marks,revs + revs = sorted(revs) + return marks, revs def _deletebookmark(ui, marks, mark): del marks[mark] @@ -1831,7 +1715,7 @@ a future release (with the functionality absorbed automatically). """ - revs = set(scmutil.revrange(repo, list(revs) + opts.get('rev'))) + revs = scmutil.revrange(repo, list(revs) + opts.get('rev')) succs = opts['new'] + opts['succ'] bookmark = opts.get('bookmark') metadata = _getmetadata(**opts) @@ -1849,11 +1733,11 @@ wlock = lock = None try: wlock = repo.wlock() - sortedrevs = lambda specs: sorted(set(scmutil.revrange(repo, specs))) lock = repo.lock() # defines pruned changesets precs = [] - for p in sortedrevs(revs): + revs.sort() + for p in revs: cp = repo[p] if not cp.mutable(): # note: createmarkers() would have raised something anyway @@ -1864,7 +1748,9 @@ raise util.Abort('nothing to prune') # defines successors changesets - sucs = tuple(repo[n] for n in sortedrevs(succs)) + sucs = scmutil.revrange(repo, succs) + sucs.sort() + sucs = tuple(repo[n] for n in sucs) if not biject and len(sucs) > 1 and len(precs) > 1: msg = "Can't use multiple successors for multiple precursors" raise util.Abort(msg) @@ -1879,7 +1765,7 @@ relations = [(p, (s,)) for p, s in zip(precs, sucs)] # create markers - createmarkers(repo, relations, metadata=metadata) + obsolete.createmarkers(repo, relations, metadata=metadata) # informs that changeset have been pruned ui.status(_('%i changesets pruned\n') % len(precs)) @@ -1948,8 +1834,9 @@ """ opts = opts.copy() edit = opts.pop('edit', False) + log = opts.get('logfile') opts['amend'] = True - if not (edit or opts['message']): + if not (edit or opts['message'] or log): opts['message'] = repo['.'].description() _resolveoptions(ui, opts) _alias, commitcmd = cmdutil.findcmd('commit', commands.table) @@ -1992,7 +1879,7 @@ if path in redirect: return filectxfn(repo, memctx, path, contentctx=target, redirect=()) if path not in contentctx: - raise IOError() + return None fctx = contentctx[path] flags = fctx.flags() mctx = memfilectx(repo, fctx.path(), fctx.data(), @@ -2101,6 +1988,9 @@ rev = None if opts.get('rev'): rev = scmutil.revsingle(repo, opts.get('rev')) + ctx = repo[None] + if ctx.p1() == rev or ctx.p2() == rev: + raise util.Abort(_("cannot uncommit to parent changeset")) # Recommit the filtered changeset tr = repo.transaction('uncommit') @@ -2113,10 +2003,12 @@ raise util.Abort(_('nothing to uncommit'), hint=_("use --all to uncommit all files")) # Move local changes on filtered changeset - createmarkers(repo, [(old, (repo[newid],))]) - retractboundary(repo, tr, oldphase, [newid]) + obsolete.createmarkers(repo, [(old, (repo[newid],))]) + phases.retractboundary(repo, tr, oldphase, [newid]) + repo.dirstate.beginparentchange() repo.dirstate.setparents(newid, node.nullid) _uncommitdirstate(repo, old, match) + repo.dirstate.endparentchange() updatebookmarks(newid) if not repo[newid].files(): ui.warn(_("new changeset is empty\n")) @@ -2144,7 +2036,7 @@ oldbookmarks.extend(repo.nodebookmarks(old.node())) markers.append((old, (new,))) if markers: - createmarkers(repo, markers) + obsolete.createmarkers(repo, markers) for book in oldbookmarks: repo._bookmarks[book] = new.node() if oldbookmarks: @@ -2199,10 +2091,12 @@ # store touched version to help potential children newmapping[ctx.node()] = new if not duplicate: - createmarkers(repo, [(ctx, (repo[new],))]) - retractboundary(repo, tr, ctx.phase(), [new]) + obsolete.createmarkers(repo, [(ctx, (repo[new],))]) + phases.retractboundary(repo, tr, ctx.phase(), [new]) if ctx in repo[None].parents(): + repo.dirstate.beginparentchange() repo.dirstate.setparents(new, node.nullid) + repo.dirstate.endparentchange() tr.close() finally: tr.release() @@ -2273,14 +2167,14 @@ if len(roots) > 1: raise util.Abort(_("cannot fold non-linear revisions " "(multiple roots given)")) - root = repo[roots[0]] + root = repo[roots.first()] if root.phase() <= phases.public: raise util.Abort(_("cannot fold public revisions")) heads = repo.revs('heads(%ld)', revs) if len(heads) > 1: raise util.Abort(_("cannot fold non-linear revisions " "(multiple heads given)")) - head = repo[heads[0]] + head = repo[heads.first()] wlock = lock = None try: wlock = repo.wlock() @@ -2303,8 +2197,8 @@ newid, unusedvariable = rewrite(repo, root, allctx, head, [root.p1().node(), root.p2().node()], commitopts=commitopts) - retractboundary(repo, tr, targetphase, [newid]) - createmarkers(repo, [(ctx, (repo[newid],)) + phases.retractboundary(repo, tr, targetphase, [newid]) + obsolete.createmarkers(repo, [(ctx, (repo[newid],)) for ctx in allctx]) tr.close() finally: @@ -2380,37 +2274,146 @@ topic = 'OBSEXC' ui.progress(topic, *args, **kwargs) +if getattr(exchange, '_pushdiscoveryobsmarkers', None) is not None: + @eh.wrapfunction(exchange, '_pushdiscoveryobsmarkers') + def _pushdiscoveryobsmarkers(orig, pushop): + if (obsolete._enabled + and pushop.repo.obsstore + and 'obsolete' in pushop.remote.listkeys('namespaces')): + repo = pushop.repo + obsexcmsg(repo.ui, "computing relevant nodes\n") + revs = list(repo.revs('::%ln', pushop.futureheads)) + unfi = repo.unfiltered() + cl = unfi.changelog + if not pushop.remote.capable('_evoext_obshash_0'): + # do not trust core yet + # return orig(pushop) + nodes = [cl.node(r) for r in revs] + if nodes: + obsexcmsg(repo.ui, "computing markers relevant to %i nodes\n" + % len(nodes)) + pushop.outobsmarkers = repo.obsstore.relevantmarkers(nodes) + else: + obsexcmsg(repo.ui, "markers already in sync\n") + pushop.outobsmarkers = [] + pushop.outobsmarkers = repo.obsstore.relevantmarkers(nodes) + return + common = [] + obsexcmsg(repo.ui, "looking for common markers in %i nodes\n" + % len(revs)) + commonrevs = list(unfi.revs('::%ln', pushop.outgoing.commonheads)) + common = findcommonobsmarkers(pushop.ui, unfi, pushop.remote, commonrevs) + + revs = list(unfi.revs('%ld - (::%ln)', revs, common)) + nodes = [cl.node(r) for r in revs] + if nodes: + obsexcmsg(repo.ui, "computing markers relevant to %i nodes\n" + % len(nodes)) + pushop.outobsmarkers = repo.obsstore.relevantmarkers(nodes) + else: + obsexcmsg(repo.ui, "markers already in sync\n") + pushop.outobsmarkers = [] + +@eh.wrapfunction(wireproto, 'capabilities') +def discocapabilities(orig, repo, proto): + """wrapper to advertise new capability""" + caps = orig(repo, proto) + if obsolete._enabled: + caps += ' _evoext_obshash_0' + return caps + +@eh.extsetup +def _installobsmarkersdiscovery(ui): + hgweb_mod.perms['evoext_obshash'] = 'pull' + # wrap command content + oldcap, args = wireproto.commands['capabilities'] + def newcap(repo, proto): + return discocapabilities(oldcap, repo, proto) + wireproto.commands['capabilities'] = (newcap, args) + wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes') + if getattr(exchange, '_pushdiscoveryobsmarkers', None) is None: + ui.warn('evolve: your mercurial version is too old\n' + 'evolve: (running in degraded mode, push will includes all markers)\n') + else: + olddisco = exchange.pushdiscoverymapping['obsmarker'] + def newdisco(pushop): + _pushdiscoveryobsmarkers(olddisco, pushop) + exchange.pushdiscoverymapping['obsmarker'] = newdisco + +### Set discovery START + +from mercurial import dagutil +from mercurial import setdiscovery + +def _obshash(repo, nodes): + hashs = _obsrelsethashtree(repo) + nm = repo.changelog.nodemap + revs = [nm.get(n) for n in nodes] + return [r is None and nullid or hashs[r][1] for r in revs] + +def srv_obshash(repo, proto, nodes): + return wireproto.encodelist(_obshash(repo, wireproto.decodelist(nodes))) + +@eh.addattr(localrepo.localpeer, 'evoext_obshash') +def local_obshash(peer, nodes): + return _obshash(peer._repo, nodes) + +@eh.addattr(wireproto.wirepeer, 'evoext_obshash') +def peer_obshash(self, nodes): + d = self._call("evoext_obshash", nodes=wireproto.encodelist(nodes)) + try: + return wireproto.decodelist(d) + except ValueError: + self._abort(error.ResponseError(_("unexpected response:"), d)) + +def findcommonobsmarkers(ui, local, remote, probeset, + initialsamplesize=100, + fullsamplesize=200): + # from discovery + roundtrips = 0 + cl = local.changelog + dag = dagutil.revlogdag(cl) + localhash = _obsrelsethashtree(local) + missing = set() + common = set() + undecided = set(probeset) + _takefullsample = setdiscovery._takefullsample + + while undecided: + + ui.note(_("sampling from both directions\n")) + sample = _takefullsample(dag, undecided, size=fullsamplesize) + + roundtrips += 1 + ui.debug("query %i; still undecided: %i, sample size is: %i\n" + % (roundtrips, len(undecided), len(sample))) + # indices between sample and externalized version must match + sample = list(sample) + remotehash = remote.evoext_obshash(dag.externalizeall(sample)) + + yesno = [localhash[ix][1] == remotehash[si] + for si, ix in enumerate(sample)] + + commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) + common.update(dag.ancestorset(commoninsample, common)) + + missinginsample = [n for i, n in enumerate(sample) if not yesno[i]] + missing.update(dag.descendantset(missinginsample, missing)) + + undecided.difference_update(missing) + undecided.difference_update(common) + + + result = dag.headsetofconnecteds(common) + ui.debug("%d total queries\n" % roundtrips) + + if not result: + return set([nullid]) + return dag.externalizeall(result) _pushkeyescape = getattr(obsolete, '_pushkeyescape', None) -if _pushkeyescape is None: - _maxpayload = 5300 - def _pushkeyescape(markers): - """encode markers into a dict suitable for pushkey exchange - - - binary data are base86 encoded - - splited in chunk less than 5300 bytes""" - parts = [] - currentlen = _maxpayload * 2 # ensure we create a new part - for marker in markers: - nextdata = obsolete._encodeonemarker(marker) - if (len(nextdata) + currentlen > _maxpayload): - currentpart = [] - currentlen = 0 - parts.append(currentpart) - currentpart.append(nextdata) - currentlen += len(nextdata) - keys = {} - for idx, part in enumerate(reversed(parts)): - data = ''.join([_pack('>B', 0)] + part) - keys['dump%i' % idx] = base85.b85encode(data) - return keys - -def _encodemarkersstream(fp, markers): - fp.write(_pack('>B', 0)) - for mark in markers: - fp.write(obsolete._encodeonemarker(mark)) class pushobsmarkerStringIO(StringIO): """hacky string io for progress""" @@ -2419,7 +2422,7 @@ def length(self): return len(self.getvalue()) - def read(self, size): + def read(self, size=None): obsexcprg(self.ui, self.tell(), unit="bytes", total=self.length) return StringIO.read(self, size) @@ -2429,137 +2432,6 @@ yield d d = self.read(4096) -bundle2partsgenerators = getattr(exchange, 'bundle2partsgenerators', None) - - -if bundle2partsgenerators is not None: - - def _pushb2phases(pushop, bundler): - """adds phases update to the main bundle2 push""" - outgoing = pushop.outgoing - unfi = pushop.repo.unfiltered() - remotephases = pushop.remote.listkeys('phases') - publishing = remotephases.get('publishing', False) - ana = phases.analyzeremotephases(pushop.repo, - outgoing.commonheads, - remotephases) - pheads, droots = ana - revset = 'heads((%ln::%ln))' - if not publishing: - revset += ' and public()' - # Get the list of all revs draft on remote by public here. - # XXX Beware that revset break if droots is not strictly - # XXX root we may want to ensure it is but it is costly - fallback = list(unfi.set(revset, droots, outgoing.commonheads)) - if not outgoing.missing: - future = fallback - else: - # adds changeset we are going to push as draft - # - # should not be necessary for pushblishing server, but because of - # an issue fixed in xxxxx we have to do it anyway. - fdroots = list(unfi.set('roots(%ln + %ln::)', outgoing.missing, droots)) - fdroots = [f.node() for f in fdroots] - future = list(unfi.set(revset, fdroots, outgoing.missingheads)) - - b2caps = bundle2.bundle2caps(pushop.remote) - if 'b2x:pushkey' not in b2caps: - return - pushop.stepsdone.add('phases') - part2node = [] - enc = pushkey.encode - for newremotehead in future: - part = bundler.newpart('b2x:pushkey') - part.addparam('namespace', enc('phases')) - part.addparam('key', enc(newremotehead.hex())) - part.addparam('old', enc(str(phases.draft))) - part.addparam('new', enc(str(phases.public))) - part2node.append((part.id, newremotehead)) - def handlereply(op): - for partid, pnode in part2node: - partrep = op.records.getreplies(partid) - results = partrep['pushkey'] - assert len(results) <= 1 - msg = None - if not results: - msg = _('server ignored update of %s to public!\n') % pnode - elif not int(results[0]['return']): - msg = _('updating %s to public failed!\n') % pnode - if msg is not None: - pushop.ui.warn(msg) - return handlereply - - def _pushb2obsmarker(pushop, bundler): - """adds obsmarker to the main bundle2 push""" - repo = pushop.repo - remote = pushop.remote - if ('obsmarkers' not in pushop.stepsdone - and (obsolete._enabled and repo.obsstore and - 'obsolete' in remote.listkeys('namespaces')) - and remote.capable('_evoext_b2x_obsmarkers_0')): - # - pushop.stepsdone.add('obsmarkers') - markers = _obsmarkersdiscovery(pushop) - if not markers: - obsexcmsg(repo.ui, "no marker to push\n") - obsexcmsg(repo.ui, "DONE\n") - return - obsdata = pushobsmarkerStringIO() - _encodemarkersstream(obsdata, markers) - obsdata.seek(0) - obsdata.ui = repo.ui - obsexcmsg(repo.ui, "pushing %i obsolescence markers (%i bytes)\n" - % (len(markers), len(obsdata.getvalue())), - True) - bundler.newpart('EVOLVE:B2X:OBSMARKERV1', data=obsdata) - def callback(op): - obsexcprg(repo.ui, None) - obsexcmsg(repo.ui, "DONE\n") - return callback - bundle2partsgenerators.append(_pushb2phases) - bundle2partsgenerators.append(_pushb2obsmarker) - - -def _obsmarkersdiscovery(pushop): - """return the list of marker that needs to be pushed to the server - - When used before (or at the same time) the changegroup have been pushed, it - returns the value as if the planned changegroup was succesful. Othewise it - use te actual common heads to decide whats needs to be pushed. - """ - repo = pushop.repo - remote = pushop.remote - unfi = repo.unfiltered() - cl = unfi.changelog - commonheads = pushop.commonheads - if commonheads is None: - if pushop.revs is None: - commonheads = pushop.outgoing.commonheads - sch = set(commonheads) - commonheads.extend(h for h in pushop.outgoing.missingheads - if h not in sch) - else: - commonheads = pushop.outgoing.missingheads - if (obsolete._enabled and repo.obsstore and - 'obsolete' in remote.listkeys('namespaces')): - obsexcmsg(repo.ui, "computing relevant nodes\n") - revs = unfi.revs('::%ln', commonheads) - common = [] - if remote.capable('_evoext_obshash_0'): - obsexcmsg(repo.ui, "looking for common markers in %i nodes\n" - % len(revs)) - common = findcommonobsmarkers(pushop.ui, unfi, remote, revs) - revs = list(unfi.revs('%ld - (::%ln)', revs, common)) - nodes = [cl.node(r) for r in revs] - if nodes: - obsexcmsg(repo.ui, "computing markers relevant to %i nodes\n" - % len(nodes)) - markers = repo.obsstore.relevantmarkers(nodes) - else: - obsexcmsg(repo.ui, "markers already in sync\n") - markers = [] - return markers - @eh.wrapfunction(exchange, '_pushobsolete') def _pushobsolete(orig, pushop): """utility function to push obsolete markers to a remote""" @@ -2568,6 +2440,12 @@ if 'obsmarkers' in stepsdone: return stepsdone.add('obsmarkers') + if util.safehasattr(pushop, 'cgresult'): + cgresult = pushop.cgresult + else: + cgresult = pushop.ret + if cgresult == 0: + return pushop.ui.debug('try to push obsolete markers to remote\n') repo = pushop.repo remote = pushop.remote @@ -2575,35 +2453,13 @@ cl = unfi.changelog if (obsolete._enabled and repo.obsstore and 'obsolete' in remote.listkeys('namespaces')): - markers = _obsmarkersdiscovery(pushop) + markers = pushop.outobsmarkers if not markers: obsexcmsg(repo.ui, "no marker to push\n") - elif remote.capable('_evoext_b2x_obsmarkers_0'): - obsdata = pushobsmarkerStringIO() - _encodemarkersstream(obsdata, markers) - obsdata.seek(0) - obsdata.ui = repo.ui - obsexcmsg(repo.ui, "pushing %i obsolescence markers (%i bytes)\n" - % (len(markers), len(obsdata.getvalue())), - True) - bundler = bundle2.bundle20(pushop.ui, {}) - capsblob = bundle2.encodecaps(pushop.repo.bundle2caps) - bundler.addpart(bundle2.bundlepart('b2x:replycaps', data=capsblob)) - cgpart = bundle2.bundlepart('EVOLVE:B2X:OBSMARKERV1', data=obsdata) - bundler.addpart(cgpart) - stream = util.chunkbuffer(bundler.getchunks()) - try: - reply = pushop.remote.unbundle(stream, ['force'], 'push') - except bundle2.UnknownPartError, exc: - raise util.Abort('missing support for %s' % exc) - try: - op = bundle2.processbundle(pushop.repo, reply) - except bundle2.UnknownPartError, exc: - raise util.Abort('missing support for %s' % exc) - obsexcprg(repo.ui, None) elif remote.capable('_evoext_pushobsmarkers_0'): obsdata = pushobsmarkerStringIO() - _encodemarkersstream(obsdata, markers) + for chunk in obsolete.encodemarkers(markers, True): + obsdata.write(chunk) obsdata.seek(0) obsdata.ui = repo.ui obsexcmsg(repo.ui, "pushing %i obsolescence markers (%i bytes)\n" @@ -2655,6 +2511,28 @@ self.ui.status(_('remote: '), l) return ret +@eh.wrapfunction(localrepo.localrepository, '_restrictcapabilities') +def local_pushobsmarker_capabilities(orig, repo, caps): + caps = orig(repo, caps) + caps.add('_evoext_pushobsmarkers_0') + return caps + +@eh.addattr(localrepo.localpeer, 'evoext_pushobsmarkers_0') +def local_pushobsmarkers(peer, obsfile): + data = obsfile.read() + lock = peer._repo.lock() + try: + tr = peer._repo.transaction('pushkey: obsolete markers') + try: + new = peer._repo.obsstore.mergemarkers(tr, data) + if new is not None: + obsexcmsg(peer._repo.ui, "%i obsolescence markers added\n" % new, True) + tr.close() + finally: + tr.release() + finally: + lock.release() + peer._repo.hook('evolve_pushobsmarkers') def srv_pushobsmarkers(repo, proto): """wireprotocol command""" @@ -2667,7 +2545,9 @@ try: tr = repo.transaction('pushkey: obsolete markers') try: - repo.obsstore.mergemarkers(tr, data) + new = repo.obsstore.mergemarkers(tr, data) + if new is not None: + obsexcmsg(repo.ui, "%i obsolescence markers added\n" % new, True) tr.close() finally: tr.release() @@ -2676,34 +2556,7 @@ repo.hook('evolve_pushobsmarkers') return wireproto.pushres(0) -@bundle2.parthandler('evolve:b2x:obsmarkerv1') -def handleobsmarkerv1(op, inpart): - """add a stream of obsmarker to the repo""" - tr = op.gettransaction() - advparams = dict(inpart.advisoryparams) - length = advparams.get('totalbytes') - if length is None: - obsdata = inpart.read() - else: - length = int(length) - data = StringIO() - current = 0 - obsexcprg(op.repo.ui, current, unit="bytes", total=length) - while current < length: - readsize = min(length-current, 4096) - data.write(inpart.read(readsize)) - current += readsize - obsexcprg(op.repo.ui, current, unit="bytes", total=length) - obsexcprg(op.repo.ui, None) - obsdata = data.getvalue() - totalsize = len(obsdata) - old = len(op.repo.obsstore._all) - op.repo.obsstore.mergemarkers(tr, obsdata) - new = len(op.repo.obsstore._all) - old - op.records.add('evo_obsmarkers', {'new': new, 'bytes': totalsize}) - tr.hookargs['evolve_new_obsmarkers'] = str(new) - -def _buildpullobsmerkersboundaries(pullop): +def _buildpullobsmarkersboundaries(pullop): """small funtion returning the argument for pull markers call may to contains 'heads' and 'common'. skip the key for None. @@ -2712,7 +2565,7 @@ cl = pullop.repo.changelog remote = pullop.remote unfi = repo.unfiltered() - revs = unfi.revs('::%ln', pullop.pulledsubset) + revs = unfi.revs('::%ln', pullop.common) common = [nullid] if remote.capable('_evoext_obshash_0'): obsexcmsg(repo.ui, "looking for common markers in %i nodes\n" @@ -2722,46 +2575,51 @@ @eh.uisetup def addgetbundleargs(self): - if gboptsmap is not None: - gboptsmap['evo_obsmarker'] = 'plain' - gboptsmap['evo_obscommon'] = 'plain' - gboptsmap['evo_obsheads'] = 'plain' - else: - gboptslist.append('evo_obsheads') - gboptslist.append('evo_obscommon') - gboptslist.append('evo_obsmarker') + gboptsmap['evo_obscommon'] = 'nodes' - +@eh.wrapfunction(exchange, '_pullbundle2extraprepare') +def _addobscommontob2pull(orig, pullop, kwargs): + ret = orig(pullop, kwargs) + if 'obsmarkers' in kwargs and pullop.remote.capable('_evoext_getbundle_obscommon'): + boundaries = _buildpullobsmarkersboundaries(pullop) + common = boundaries['common'] + if common != [nullid]: + kwargs['evo_obscommon'] = common + return ret -@eh.wrapfunction(exchange, '_getbundleextrapart') -def _getbundleextrapart(orig, bundler, repo, source, **kwargs): - if int(kwargs.pop('evo_obsmarker', False)): - common = kwargs.pop('evo_obscommon') - common = wireproto.decodelist(common) - heads = kwargs.pop('evo_obsheads') - heads = wireproto.decodelist(heads) - obsdata = _getobsmarkersstream(repo, common=common, heads=heads) - if len(obsdata.getvalue()) > 5: - advparams = [('totalbytes', str(len(obsdata.getvalue())))] - obspart = bundle2.bundlepart('EVOLVE:B2X:OBSMARKERV1', - advisoryparams=advparams, - data=obsdata) - bundler.addpart(obspart) - orig(bundler, repo, source) +if getattr(exchange, '_getbundleobsmarkerpart', None) is not None: + @eh.wrapfunction(exchange, '_getbundleobsmarkerpart') + def _getbundleobsmarkerpart(orig, bundler, repo, source, heads=None, common=None, + bundlecaps=None, **kwargs): + if 'evo_obscommon' not in kwargs: + return orig(bundler, repo, source, heads, common, bundlecaps, **kwargs) + + if kwargs.get('obsmarkers', False): + if heads is None: + heads = repo.heads() + obscommon = kwargs.get('evo_obscommon', ()) + obsset = repo.set('::%ln - ::%ln', heads, obscommon) + subset = [c.node() for c in obsset] + markers = repo.obsstore.relevantmarkers(subset) + exchange.buildobsmarkerspart(bundler, markers) + @eh.wrapfunction(exchange, '_pullobsolete') def _pullobsolete(orig, pullop): if not obsolete._enabled: return None - b2xpull = pullop.remote.capable('_evoext_b2x_obsmarkers_0') + if 'obsmarkers' not in getattr(pullop, 'todosteps', ['obsmarkers']): + return None + if 'obsmarkers' in getattr(pullop, 'stepsdone', []): + return None wirepull = pullop.remote.capable('_evoext_pullobsmarkers_0') - if not (b2xpull or wirepull): + if not wirepull: return orig(pullop) if 'obsolete' not in pullop.remote.listkeys('namespaces'): return None # remote opted out of obsolescence marker exchange tr = None ui = pullop.repo.ui - boundaries = _buildpullobsmerkersboundaries(pullop) + boundaries = _buildpullobsmarkersboundaries(pullop) if not set(boundaries['heads']) - set(boundaries['common']): obsexcmsg(ui, "nothing to pull\n") return None @@ -2769,33 +2627,7 @@ obsexcmsg(ui, "pull obsolescence markers\n", True) new = 0 - if b2xpull: - kwargs = {'bundlecaps': set(['HG2X'])} - capsblob = bundle2.encodecaps(pullop.repo.bundle2caps) - kwargs['bundlecaps'].add('bundle2=' + urllib.quote(capsblob)) - kwargs['heads'] = [nullid] - kwargs['common'] = [nullid] - kwargs['evo_obsmarker'] = '1' - kwargs['evo_obscommon'] = wireproto.encodelist(boundaries['common']) - kwargs['evo_obsheads'] = wireproto.encodelist(boundaries['heads']) - bundle = pullop.remote.getbundle('pull', **kwargs) - try: - op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction) - except bundle2.UnknownPartError, exc: - raise util.Abort('missing support for %s' % exc) - bytes = new = 0 - for entry in op.records['evo_obsmarkers']: - bytes += entry.get('bytes', 0) - new += entry.get('new', 0) - if 5 < bytes: - obsexcmsg(ui, "merging obsolescence markers (%i bytes)\n" - % bytes) - obsexcmsg(ui, "%i obsolescence markers added\n" % new, True) - tr = op.gettransaction() - else: - obsexcmsg(ui, "no unknown remote markers\n") - obsexcmsg(ui, "DONE\n") - elif wirepull: + if wirepull: obsdata = pullop.remote.evoext_pullobsmarkers_0(**boundaries) obsdata = obsdata.read() if len(obsdata) > 5: @@ -2830,7 +2662,8 @@ nodes = [c.node() for c in repo.set(revset, *args)] markers = repo.obsstore.relevantmarkers(nodes) obsdata = StringIO() - _encodemarkersstream(obsdata, markers) + for chunk in obsolete.encodemarkers(markers, True): + obsdata.write(chunk) obsdata.seek(0) return obsdata @@ -2898,7 +2731,7 @@ sha.update(p) tmarkers = repo.obsstore.relevantmarkers([ctx.node()]) if tmarkers: - bmarkers = [obsolete._encodeonemarker(m) for m in tmarkers] + bmarkers = [obsolete._fm0encodeonemarker(m) for m in tmarkers] bmarkers.sort() for m in bmarkers: entry += 1 @@ -2921,77 +2754,6 @@ ui.status('%s %s\n' % (node.hex(chg), node.hex(obs))) -### Set discovery START - -import random -from mercurial import dagutil -from mercurial import setdiscovery - -def _obshash(repo, nodes): - hashs = _obsrelsethashtree(repo) - nm = repo.changelog.nodemap - return [hashs[nm.get(n)][1] for n in nodes] - -def srv_obshash(repo, proto, nodes): - return wireproto.encodelist(_obshash(repo, wireproto.decodelist(nodes))) - -@eh.addattr(localrepo.localpeer, 'evoext_obshash') -def local_obshash(peer, nodes): - return _obshash(peer._repo, nodes) - -@eh.addattr(wireproto.wirepeer, 'evoext_obshash') -def peer_obshash(self, nodes): - d = self._call("evoext_obshash", nodes=wireproto.encodelist(nodes)) - try: - return wireproto.decodelist(d) - except ValueError: - self._abort(error.ResponseError(_("unexpected response:"), d)) - -def findcommonobsmarkers(ui, local, remote, probeset, - initialsamplesize=100, - fullsamplesize=200): - # from discovery - roundtrips = 0 - cl = local.changelog - dag = dagutil.revlogdag(cl) - localhash = _obsrelsethashtree(local) - missing = set() - common = set() - undecided = set(probeset) - _takefullsample = setdiscovery._takefullsample - - while undecided: - - ui.note(_("sampling from both directions\n")) - sample = _takefullsample(dag, undecided, size=fullsamplesize) - - roundtrips += 1 - ui.debug("query %i; still undecided: %i, sample size is: %i\n" - % (roundtrips, len(undecided), len(sample))) - # indices between sample and externalized version must match - sample = list(sample) - remotehash = remote.evoext_obshash(dag.externalizeall(sample)) - - yesno = [localhash[ix][1] == remotehash[si] - for si, ix in enumerate(sample)] - - commoninsample = set(n for i, n in enumerate(sample) if yesno[i]) - common.update(dag.ancestorset(commoninsample, common)) - - missinginsample = [n for i, n in enumerate(sample) if not yesno[i]] - missing.update(dag.descendantset(missinginsample, missing)) - - undecided.difference_update(missing) - undecided.difference_update(common) - - - result = dag.headsetofconnecteds(common) - ui.debug("%d total queries\n" % roundtrips) - - if not result: - return set([nullid]) - return dag.externalizeall(result) - @eh.wrapfunction(wireproto, 'capabilities') def capabilities(orig, repo, proto): """wrapper to advertise new capability""" @@ -3000,17 +2762,15 @@ caps += ' _evoext_pushobsmarkers_0' caps += ' _evoext_pullobsmarkers_0' caps += ' _evoext_obshash_0' - caps += ' _evoext_b2x_obsmarkers_0' + caps += ' _evoext_getbundle_obscommon' return caps @eh.extsetup def _installwireprotocol(ui): localrepo.moderncaps.add('_evoext_pullobsmarkers_0') - localrepo.moderncaps.add('_evoext_b2x_obsmarkers_0') hgweb_mod.perms['evoext_pushobsmarkers_0'] = 'push' hgweb_mod.perms['evoext_pullobsmarkers_0'] = 'pull' - hgweb_mod.perms['evoext_obshash'] = 'pull' wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '') wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') # wrap command content @@ -3018,4 +2778,3 @@ def newcap(repo, proto): return capabilities(oldcap, repo, proto) wireproto.commands['capabilities'] = (newcap, args) - wireproto.commands['evoext_obshash'] = (srv_obshash, 'nodes') diff -r cc19b6400dae -r 3de3d85069fd hgext/simple4server.py --- a/hgext/simple4server.py Tue Sep 30 10:27:54 2014 -0500 +++ b/hgext/simple4server.py Sun Nov 02 15:06:00 2014 +0000 @@ -75,15 +75,6 @@ repo.hook('evolve_pushobsmarkers') return wireproto.pushres(0) -# from mercurial.obsolete: 19e9478c1a22 -def _encodemarkersstream(fp, markers): - """write a binary version of a set of markers - - Includes the initial version number""" - fp.write(_pack('>B', 0)) - for mark in markers: - fp.write(obsolete._encodeonemarker(mark)) - # from evolve extension: 1a23c7c52a43 def _getobsmarkersstream(repo, heads=None, common=None): """Get a binary stream for all markers relevant to `:: - ::` @@ -104,7 +95,8 @@ nodes = [c.node() for c in repo.set(revset, *args)] markers = repo.obsstore.relevantmarkers(nodes) obsdata = StringIO() - _encodemarkersstream(obsdata, markers) + for chunk in obsolete.encodemarkers(markers, True): + obsdata.write(chunk) obsdata.seek(0) return obsdata @@ -208,7 +200,7 @@ sha.update(p) tmarkers = repo.obsstore.relevantmarkers([ctx.node()]) if tmarkers: - bmarkers = [obsolete._encodeonemarker(m) for m in tmarkers] + bmarkers = [obsolete._fm0encodeonemarker(m) for m in tmarkers] bmarkers.sort() for m in bmarkers: entry += 1 @@ -226,7 +218,8 @@ (special case so that all empty are hashed as nullid)""" hashs = _obsrelsethashtree(repo) nm = repo.changelog.nodemap - return [hashs[nm.get(n)][1] for n in nodes] + revs = [nm.get(n) for n in nodes] + return [r is None and node.nullid or hashs[r][1] for r in revs] # from evolve extension: 1a23c7c52a43 def srv_obshash(repo, proto, nodes): @@ -244,22 +237,28 @@ caps += ' _evoext_pushobsmarkers_0' caps += ' _evoext_pullobsmarkers_0' caps += ' _evoext_obshash_0' - caps += ' _evoext_b2x_obsmarkers_0' + caps += ' _evoext_getbundle_obscommon' return caps +def _getbundleobsmarkerpart(orig, bundler, repo, source, heads=None, common=None, + bundlecaps=None, **kwargs): + if 'evo_obscommon' not in kwargs: + return orig(bundler, repo, source, heads, common, bundlecaps, **kwargs) + + if kwargs.get('obsmarkers', False): + if heads is None: + heads = repo.heads() + obscommon = kwargs.get('evo_obscommon', ()) + obsset = repo.set('::%ln - ::%ln', heads, obscommon) + subset = [c.node() for c in obsset] + markers = repo.obsstore.relevantmarkers(subset) + exchange.buildobsmarkerspart(bundler, markers) # from evolve extension: 10867a8e27c6 # heavily modified def extsetup(ui): localrepo.moderncaps.add('_evoext_b2x_obsmarkers_0') - if gboptsmap is not None: - gboptsmap['evo_obsmarker'] = 'plain' - gboptsmap['evo_obscommon'] = 'plain' - gboptsmap['evo_obsheads'] = 'plain' - else: - gboptslist.append('evo_obsheads') - gboptslist.append('evo_obscommon') - gboptslist.append('evo_obsmarker') + gboptsmap['evo_obscommon'] = 'nodes' if not util.safehasattr(obsolete.obsstore, 'relevantmarkers'): obsolete.obsstore = pruneobsstore obsolete.obsstore.relevantmarkers = relevantmarkers @@ -269,7 +268,7 @@ wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '') wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*') # wrap module content - extensions.wrapfunction(exchange, '_getbundleextrapart', _getbundleextrapart) + extensions.wrapfunction(exchange, '_pullbundle2extraprepare', _getbundleobsmarkerpart) extensions.wrapfunction(wireproto, 'capabilities', capabilities) # wrap command content oldcap, args = wireproto.commands['capabilities'] @@ -281,47 +280,3 @@ extensions.wrapfunction(pushkey, '_nslist', _nslist) pushkey._namespaces['namespaces'] = (lambda *x: False, pushkey._nslist) - -#from evolve extension -@bundle2.parthandler('evolve:b2x:obsmarkerv1') -def handleobsmarkerv1(op, inpart): - """add a stream of obsmarker to the repo""" - tr = op.gettransaction() - advparams = dict(inpart.advisoryparams) - length = advparams.get('totalbytes') - if length is None: - obsdata = inpart.read() - else: - length = int(length) - data = StringIO() - current = 0 - op.ui.progress('OBSEXC', current, unit="bytes", total=length) - while current < length: - readsize = min(length-current, 4096) - data.write(inpart.read(readsize)) - current += readsize - op.ui.progress('OBSEXC', current, unit="bytes", total=length) - op.ui.progress('OBSEXC', None) - obsdata = data.getvalue() - totalsize = len(obsdata) - old = len(op.repo.obsstore._all) - op.repo.obsstore.mergemarkers(tr, obsdata) - new = len(op.repo.obsstore._all) - old - op.records.add('evo_obsmarkers', {'new': new, 'bytes': totalsize}) - tr.hookargs['evolve_new_obsmarkers'] = str(new) - -#from evolve extension -def _getbundleextrapart(orig, bundler, repo, source, **kwargs): - if int(kwargs.pop('evo_obsmarker', False)): - common = kwargs.pop('evo_obscommon') - common = wireproto.decodelist(common) - heads = kwargs.pop('evo_obsheads') - heads = wireproto.decodelist(heads) - obsdata = _getobsmarkersstream(repo, common=common, heads=heads) - if len(obsdata.getvalue()) > 5: - advparams = [('totalbytes', str(len(obsdata.getvalue())))] - obspart = bundle2.bundlepart('EVOLVE:B2X:OBSMARKERV1', - advisoryparams=advparams, - data=obsdata) - bundler.addpart(obspart) - orig(bundler, repo, source) diff -r cc19b6400dae -r 3de3d85069fd setup.py --- a/setup.py Tue Sep 30 10:27:54 2014 -0500 +++ b/setup.py Sun Nov 02 15:06:00 2014 +0000 @@ -5,7 +5,7 @@ setup( name='hg-evolve', - version='4.0.0', + version='5.0.0', author='Pierre-Yves David', maintainer='Pierre-Yves David', maintainer_email='pierre-yves.david@ens-lyon.org', diff -r cc19b6400dae -r 3de3d85069fd tests/_exc-util.sh --- a/tests/_exc-util.sh Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/_exc-util.sh Sun Nov 02 15:06:00 2014 +0000 @@ -12,7 +12,8 @@ publish=False [experimental] -verbose-obsolescence-exchange=true +verbose-obsolescence-exchange=false +bundle2-exp=true [alias] debugobsolete=debugobsolete -d '0 0' diff -r cc19b6400dae -r 3de3d85069fd tests/test-amend.t --- a/tests/test-amend.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-amend.t Sun Nov 02 15:06:00 2014 +0000 @@ -97,3 +97,22 @@ $ HGUSER=newbie hg amend -U $ hg parents --template '{rev} {author}\n' 7 newbie + +Check that --logfile works + $ echo "logfile message" > logfile.txt + $ hg amend -l logfile.txt + $ hg log -r . -T "{desc}\n" + logfile message + +# Make sure we don't get reparented to -1 with no username (issue4211) + $ HGUSER= + $ hg amend -e --config ui.username= -m "empty user" + abort: no username supplied + (use "hg config --edit" to set your username) + [255] + $ hg sum + parent: 8:* tip (glob) + logfile message + branch: foo + commit: 1 unknown (clean) + update: (current) diff -r cc19b6400dae -r 3de3d85069fd tests/test-corrupt.t --- a/tests/test-corrupt.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-corrupt.t Sun Nov 02 15:06:00 2014 +0000 @@ -111,7 +111,8 @@ adding manifests adding file changes added 1 changesets with 2 changes to 2 files - pushing 2 obsolescence markers (147 bytes) + pushing 2 obsolescence markers (* bytes) (glob) + 2 obsolescence markers added $ hg -R ../other verify checking changesets checking manifests diff -r cc19b6400dae -r 3de3d85069fd tests/test-evolve.t --- a/tests/test-evolve.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-evolve.t Sun Nov 02 15:06:00 2014 +0000 @@ -636,7 +636,8 @@ 3 changesets folded 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg fold 6 # want to run hg fold 6 - abort: unknown revision '6'! + abort: hidden revision '6'! + (use --hidden to access hidden revisions) [255] $ hg log -r 11 --template '{desc}\n' add 3 @@ -697,9 +698,7 @@ 1 successors: 10 2 successors: 0 more than 2 successors: 0 - average meta length: 27 available keys: - date: 10 user: 10 disconnected clusters: 1 any known node: 1 @@ -771,3 +770,79 @@ 7 - 5c9c8d9c2e4e another feature (child of ba0ec09b1bab) (public) 6 - ba0ec09b1bab a nifty feature (public) 0 - e55e0562ee93 base (public) + + $ cd .. + +Test branch preservation: +=========================== + + $ hg init evolving-branch + $ cd evolving-branch + $ touch a + $ hg add a + $ hg ci -m 'a0' + $ echo 1 > a + $ hg ci -m 'a1' + $ echo 2 > a + $ hg ci -m 'a2' + $ echo 3 > a + $ hg ci -m 'a3' + + $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' + @ 3 [default] a3 + | + o 2 [default] a2 + | + o 1 [default] a1 + | + o 0 [default] a0 + + +branch change propagated + + $ hg up 'desc(a2)' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg branch mybranch + marked working directory as branch mybranch + (branches are permanent and global, did you want a bookmark?) + $ hg amend + 1 new unstable changesets + + $ hg evolve + move:[3] a3 + atop:[5] a2 + working directory is now at 7c5649f73d11 + + $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' + @ 6 [mybranch] a3 + | + o 5 [mybranch] a2 + | + o 1 [default] a1 + | + o 0 [default] a0 + + +branch change preserved + + $ hg up 'desc(a1)' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg amend -m 'a1_' + 2 new unstable changesets + $ hg evolve + move:[5] a2 + atop:[7] a1_ + working directory is now at 5406c5cfee42 + $ hg evolve + move:[6] a3 + atop:[8] a2 + working directory is now at c7661e655801 + $ hg log -G --template '{rev} [{branch}] {desc|firstline}\n' + @ 9 [mybranch] a3 + | + o 8 [mybranch] a2 + | + o 7 [default] a1_ + | + o 0 [default] a0 + diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A1.t --- a/tests/test-exchange-A1.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A1.t Sun Nov 02 15:06:00 2014 +0000 @@ -68,14 +68,11 @@ ## pushing "A" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -89,10 +86,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -118,14 +112,11 @@ ## pushing from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -139,10 +130,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -227,14 +215,11 @@ ## pushing "B" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -248,10 +233,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -274,14 +256,11 @@ ## pushing from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -295,10 +274,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A2.t --- a/tests/test-exchange-A2.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A2.t Sun Nov 02 15:06:00 2014 +0000 @@ -76,14 +76,11 @@ ## pushing "A" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -98,10 +95,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A3.t --- a/tests/test-exchange-A3.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A3.t Sun Nov 02 15:06:00 2014 +0000 @@ -88,14 +88,11 @@ ## pushing "A1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -110,10 +107,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -192,14 +186,11 @@ ## pushing "A1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files (+1 heads) + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -214,10 +205,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 2 files (+1 heads) - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg heads' to see heads, 'hg merge' to merge) 1 new unstable changesets ## post pull state diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A4.t --- a/tests/test-exchange-A4.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A4.t Sun Nov 02 15:06:00 2014 +0000 @@ -81,14 +81,11 @@ ## pushing "B" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -103,10 +100,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A5.t --- a/tests/test-exchange-A5.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A5.t Sun Nov 02 15:06:00 2014 +0000 @@ -88,14 +88,11 @@ ## pushing "B1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -111,10 +108,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A6.t --- a/tests/test-exchange-A6.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A6.t Sun Nov 02 15:06:00 2014 +0000 @@ -80,10 +80,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -93,10 +90,7 @@ ## pulling "e5ea8f9c7314" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -119,10 +113,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 1 obsolescence markers (65 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -133,10 +124,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (65 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-A7.t --- a/tests/test-exchange-A7.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-A7.t Sun Nov 02 15:06:00 2014 +0000 @@ -60,10 +60,6 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: no marker to push - OBSEXC: DONE ## post push state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -72,9 +68,6 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: no unknown remote markers - OBSEXC: DONE ## post pull state # obstore: main aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B1.t --- a/tests/test-exchange-B1.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B1.t Sun Nov 02 15:06:00 2014 +0000 @@ -67,14 +67,11 @@ ## pushing "A" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -88,10 +85,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -114,14 +108,11 @@ ## pushing from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers ## post push state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -135,10 +126,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B2.t --- a/tests/test-exchange-B2.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B2.t Sun Nov 02 15:06:00 2014 +0000 @@ -63,10 +63,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -76,10 +73,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -102,10 +96,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -116,10 +107,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B3.t --- a/tests/test-exchange-B3.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B3.t Sun Nov 02 15:06:00 2014 +0000 @@ -75,14 +75,10 @@ ## pushing "A" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: no marker to push - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files ## post push state # obstore: main e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -95,9 +91,6 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: no unknown remote markers - OBSEXC: DONE (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B4.t --- a/tests/test-exchange-B4.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B4.t Sun Nov 02 15:06:00 2014 +0000 @@ -41,17 +41,17 @@ $ hg push ../pushdest pushing to ../pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files $ hg push ../pulldest pushing to ../pulldest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files $ hg update -q 0 $ mkcommit C created new head @@ -89,10 +89,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -102,10 +99,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -128,10 +122,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 1 obsolescence markers (89 bytes) - OBSEXC: DONE + remote: 1 new obsolescence markers ## post push state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -142,10 +133,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (89 bytes) - OBSEXC: 1 obsolescence markers added - OBSEXC: DONE + 1 new obsolescence markers ## post pull state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B5.t --- a/tests/test-exchange-B5.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B5.t Sun Nov 02 15:06:00 2014 +0000 @@ -87,14 +87,11 @@ ## pushing "B" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 2 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -110,10 +107,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) 1 new unstable changesets ## post pull state @@ -142,14 +136,11 @@ ## pushing "B" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 3 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 2 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -165,10 +156,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 2 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) 1 new unstable changesets ## post pull state diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B6.t --- a/tests/test-exchange-B6.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B6.t Sun Nov 02 15:06:00 2014 +0000 @@ -75,10 +75,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: 2 new obsolescence markers ## post push state # obstore: main 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -90,10 +87,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers ## post pull state # obstore: main 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-B7.t --- a/tests/test-exchange-B7.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-B7.t Sun Nov 02 15:06:00 2014 +0000 @@ -67,10 +67,6 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: no marker to push - OBSEXC: DONE ## post push state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -79,9 +75,6 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: no unknown remote markers - OBSEXC: DONE ## post pull state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-C1.t --- a/tests/test-exchange-C1.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-C1.t Sun Nov 02 15:06:00 2014 +0000 @@ -70,10 +70,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 2 obsolescence markers (177 bytes) - OBSEXC: DONE + remote: 2 new obsolescence markers ## post push state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -85,10 +82,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (177 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers ## post pull state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -115,10 +109,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 2 obsolescence markers (177 bytes) - OBSEXC: DONE + remote: 2 new obsolescence markers ## post push state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -131,10 +122,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (177 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers ## post pull state # obstore: main f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-C2.t --- a/tests/test-exchange-C2.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-C2.t Sun Nov 02 15:06:00 2014 +0000 @@ -76,14 +76,11 @@ ## pushing "A1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers ## post push state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -99,10 +96,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main @@ -129,14 +123,11 @@ ## pushing from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers ## post push state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -152,10 +143,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-C3.t --- a/tests/test-exchange-C3.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-C3.t Sun Nov 02 15:06:00 2014 +0000 @@ -83,10 +83,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 3 obsolescence markers (241 bytes) - OBSEXC: DONE + remote: 3 new obsolescence markers ## post push state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -100,10 +97,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (241 bytes) - OBSEXC: 3 obsolescence markers added - OBSEXC: DONE + 3 new obsolescence markers ## post pull state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -134,10 +128,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 3 obsolescence markers (241 bytes) - OBSEXC: DONE + remote: 3 new obsolescence markers ## post push state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -152,10 +143,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (241 bytes) - OBSEXC: 3 obsolescence markers added - OBSEXC: DONE + 3 new obsolescence markers ## post pull state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-C4.t --- a/tests/test-exchange-C4.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-C4.t Sun Nov 02 15:06:00 2014 +0000 @@ -90,10 +90,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: 2 new obsolescence markers ## post push state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -106,10 +103,7 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers ## post pull state # obstore: main 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-D1.t --- a/tests/test-exchange-D1.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-D1.t Sun Nov 02 15:06:00 2014 +0000 @@ -70,14 +70,11 @@ ## pushing "A1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers ## post push state # obstore: main 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -93,10 +90,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-D2.t --- a/tests/test-exchange-D2.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-D2.t Sun Nov 02 15:06:00 2014 +0000 @@ -67,10 +67,7 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: pushing 2 obsolescence markers (153 bytes) - OBSEXC: DONE + remote: 2 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -83,10 +80,7 @@ pulling from main searching for changes no changes found - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (153 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers ## post pull state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-D3.t --- a/tests/test-exchange-D3.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-D3.t Sun Nov 02 15:06:00 2014 +0000 @@ -72,10 +72,6 @@ pushing to pushdest searching for changes no changes found - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 1 nodes - OBSEXC: no marker to push - OBSEXC: DONE ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -85,9 +81,6 @@ ## pulling "a9bdc8b26820" from main into pulldest pulling from main no changes found - OBSEXC: pull obsolescence markers - OBSEXC: no unknown remote markers - OBSEXC: DONE ## post pull state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-exchange-D4.t --- a/tests/test-exchange-D4.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-exchange-D4.t Sun Nov 02 15:06:00 2014 +0000 @@ -85,14 +85,11 @@ ## pushing "A1" from main to pushdest pushing to pushdest searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - OBSEXC: computing relevant nodes - OBSEXC: computing markers relevant to 2 nodes - OBSEXC: pushing 2 obsolescence markers (129 bytes) - OBSEXC: DONE + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers ## post push state # obstore: main 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} @@ -110,10 +107,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - OBSEXC: pull obsolescence markers - OBSEXC: merging obsolescence markers (129 bytes) - OBSEXC: 2 obsolescence markers added - OBSEXC: DONE + 2 new obsolescence markers (run 'hg update' to get a working copy) ## post pull state # obstore: main diff -r cc19b6400dae -r 3de3d85069fd tests/test-obsolete.t --- a/tests/test-obsolete.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-obsolete.t Sun Nov 02 15:06:00 2014 +0000 @@ -183,7 +183,8 @@ adding manifests adding file changes added 5 changesets with 5 changes to 5 files (+1 heads) - pushing 2 obsolescence markers (129 bytes) + pushing 2 obsolescence markers (* bytes) (glob) + 2 obsolescence markers added $ hg -R ../other-new verify checking changesets checking manifests @@ -237,7 +238,8 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) - pushing 3 obsolescence markers (193 bytes) + pushing 3 obsolescence markers (* bytes) (glob) + 1 obsolescence markers added $ qlog -R ../other-new 5 - 95de7fc6918d @@ -259,7 +261,8 @@ pushing to ../other-new searching for changes no changes found - pushing 3 obsolescence markers (193 bytes) + pushing 3 obsolescence markers (* bytes) (glob) + 0 obsolescence markers added [1] $ hg up --hidden -q .^ # 3 @@ -538,7 +541,8 @@ adding manifests adding file changes added 2 changesets with 1 changes to [12] files (re) - pushing 7 obsolescence markers (467 bytes) + pushing 7 obsolescence markers (* bytes) (glob) + 3 obsolescence markers added $ hg up -q 10 $ mkcommit "obsol_d'''" created new head @@ -550,7 +554,8 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) - pushing 8 obsolescence markers (531 bytes) + pushing 8 obsolescence markers (* bytes) (glob) + 1 obsolescence markers added $ cd .. check bumped detection @@ -814,18 +819,18 @@ Simple rewrite - $ hg --hidden debugobsoleterelevant 3 + $ hg --hidden debugobsolete --rev 3 4538525df7e2b9f09423636c61ef63a4cb872a2d 0d3f46688ccc6e756c7e96cf64c391c411309597 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} simple rewrite with a prune attached to it - $ hg debugobsoleterelevant 15 + $ hg debugobsolete --rev 15 0b1b6dd009c037985363e2290a0b579819f659db 705ab2a6b72e2cd86edb799ebe15f2695f86143e 0 (*) {'user': 'test'} (glob) 33d458d86621f3186c40bfccd77652f4a122743e 0 {0b1b6dd009c037985363e2290a0b579819f659db} (*) {'user': 'test'} (glob) Transitive rewrite - $ hg --hidden debugobsoleterelevant 8 + $ hg --hidden debugobsolete --rev 8 909a0fb57e5d909f353d89e394ffd7e0890fec88 159dfc9fa5d334d7e03a0aecfc7f7ab4c3431fea 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 95de7fc6918dea4c9c8d5382f50649794b474c4a 909a0fb57e5d909f353d89e394ffd7e0890fec88 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 95de7fc6918dea4c9c8d5382f50649794b474c4a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r cc19b6400dae -r 3de3d85069fd tests/test-prune.t --- a/tests/test-prune.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-prune.t Sun Nov 02 15:06:00 2014 +0000 @@ -250,7 +250,8 @@ working directory now at d62d843c9a01 bookmark 'todelete' deleted $ hg id -ir dcbb326fdec2 - abort: unknown revision 'dcbb326fdec2'! + abort: hidden revision 'dcbb326fdec2'! + (use --hidden to access hidden revisions) [255] $ hg id -ir d62d843c9a01 d62d843c9a01 @@ -262,7 +263,8 @@ bookmark 'delete' deleted $ hg tag --remove --local c $ hg id -ir 6:2702dd0c91e7 - abort: unknown revision '2702dd0c91e7'! + abort: hidden revision '6'! + (use --hidden to access hidden revisions) [255] $ hg debugobsstorestat @@ -273,9 +275,7 @@ 1 successors: 0 2 successors: 0 more than 2 successors: 0 - average meta length: (27|71) (re) available keys: - date: 4 user: 4 disconnected clusters: 4 any known node: 4 diff -r cc19b6400dae -r 3de3d85069fd tests/test-sharing.t --- a/tests/test-sharing.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-sharing.t Sun Nov 02 15:06:00 2014 +0000 @@ -112,7 +112,8 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files - pushing 4 obsolescence markers (341 bytes) + pushing 4 obsolescence markers (* bytes) (glob) + 4 obsolescence markers added Figure SG05 $ hg -R ../public shortlog -G diff -r cc19b6400dae -r 3de3d85069fd tests/test-simple4server.t --- a/tests/test-simple4server.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-simple4server.t Sun Nov 02 15:06:00 2014 +0000 @@ -29,6 +29,7 @@ no changes found updating to branch default 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat ./errors.log $ echo "[extensions]" >> ./client/.hg/hgrc $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> ./client/.hg/hgrc $ cp -r client other @@ -50,6 +51,7 @@ pulling from http://localhost:$HGPORT/ searching for changes no changes found + $ cat ../errors.log $ hg pull -R ../other pulling from http://localhost:$HGPORT/ requesting all changes @@ -59,19 +61,21 @@ added 2 changesets with 2 changes to 2 files pull obsolescence markers (run 'hg update' to get a working copy) + $ cat ../errors.log $ hg push -R ../other pushing to http://localhost:$HGPORT/ searching for changes no changes found [1] + $ cat ../errors.log Capacity testing =================== $ curl --silent http://localhost:$HGPORT/?cmd=hello - capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 + capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon $ curl --silent http://localhost:$HGPORT/?cmd=capabilities - lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 (no-eol) + lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol) $ curl --silent "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort bookmarks @@ -91,12 +95,14 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files (+1 heads) - pushing 2 obsolescence markers (171 bytes) + pushing 2 obsolescence markers (* bytes) (glob) + $ cat ../errors.log $ hg push pushing to http://localhost:$HGPORT/ searching for changes no changes found [1] + $ cat ../errors.log Pull ============= @@ -111,10 +117,12 @@ pull obsolescence markers 2 obsolescence markers added (run 'hg heads' to see heads) + $ cat ../errors.log $ hg -R ../other pull pulling from http://localhost:$HGPORT/ searching for changes no changes found + $ cat ../errors.log $ cd .. @@ -128,9 +136,9 @@ obsolete phases $ curl --silent http://localhost:$HGPORT/?cmd=hello - capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 + capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon $ curl --silent http://localhost:$HGPORT/?cmd=capabilities - lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 (no-eol) + lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol) $ echo '[__temporary__]' >> server/.hg/hgrc $ echo 'advertiseobsolete=False' >> server/.hg/hgrc @@ -158,6 +166,6 @@ obsolete phases $ curl --silent http://localhost:$HGPORT/?cmd=hello - capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 + capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon $ curl --silent http://localhost:$HGPORT/?cmd=capabilities - lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_b2x_obsmarkers_0 (no-eol) + lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 _evoext_pushobsmarkers_0 _evoext_pullobsmarkers_0 _evoext_obshash_0 _evoext_getbundle_obscommon (no-eol) diff -r cc19b6400dae -r 3de3d85069fd tests/test-stabilize-conflict.t --- a/tests/test-stabilize-conflict.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-stabilize-conflict.t Sun Nov 02 15:06:00 2014 +0000 @@ -143,7 +143,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: babar count up to ten | - | @ changeset: 5:71c18f70c34f + | o changeset: 5:71c18f70c34f | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: babar count up to fifteen @@ -217,7 +217,8 @@ atop:[10] babar count up to ten merging babar output file babar appears unchanged - was merge successful (yn)? merging babar failed! + was merge successful (yn)? n + merging babar failed! evolve failed! fix conflict and run "hg evolve --continue" abort: unresolved merge conflicts (see hg help resolve) @@ -232,7 +233,7 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: babar count up to ten | - | @ changeset: 8:1836b91c6c1d + | o changeset: 8:1836b91c6c1d | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: babar count up to fifteen diff -r cc19b6400dae -r 3de3d85069fd tests/test-tutorial.t --- a/tests/test-tutorial.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-tutorial.t Sun Nov 02 15:06:00 2014 +0000 @@ -403,7 +403,8 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files - pushing 6 obsolescence markers (487 bytes) + pushing 6 obsolescence markers (* bytes) (glob) + 6 obsolescence markers added for simplicity sake we get the bathroom change in line again @@ -511,6 +512,7 @@ $ cd ../remote $ hg -R ../local/ showconfig phases + [1] the localrepo does not have any specific configuration for `phases.publish`. It is ``true`` by default. @@ -732,7 +734,8 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files (+1 heads) - pushing 10 obsolescence markers (803 bytes) + pushing 10 obsolescence markers (* bytes) (glob) + 3 obsolescence markers added remote get a warning that current working directory is based on an obsolete changeset diff -r cc19b6400dae -r 3de3d85069fd tests/test-uncommit.t --- a/tests/test-uncommit.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-uncommit.t Sun Nov 02 15:06:00 2014 +0000 @@ -347,6 +347,9 @@ $ hg cat b --rev 0 b: no such file in rev 07f494440405 [1] + $ hg uncommit --rev . b + abort: cannot uncommit to parent changeset + [255] $ hg uncommit --rev 0 b $ hg cat b --rev . b: no such file in rev 5b27f6b17da2 diff -r cc19b6400dae -r 3de3d85069fd tests/test-userguide.t --- a/tests/test-userguide.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-userguide.t Sun Nov 02 15:06:00 2014 +0000 @@ -38,7 +38,8 @@ $ echo 'tweak feature Y' >> file1.c $ hg commit --amend -u alice -d '2 0' -m 'implement feature Y' $ hg shortlog -q -r fe0ecd3bd2a4 - abort: unknown revision 'fe0ecd3bd2a4'! + abort: hidden revision 'fe0ecd3bd2a4'! + (use --hidden to access hidden revisions) [255] $ hg --hidden shortlog -G @ 3:934359450037 draft implement feature Y diff -r cc19b6400dae -r 3de3d85069fd tests/test-wireproto.t --- a/tests/test-wireproto.t Tue Sep 30 10:27:54 2014 -0500 +++ b/tests/test-wireproto.t Sun Nov 02 15:06:00 2014 +0000 @@ -71,7 +71,8 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files (+1 heads) - pushing 2 obsolescence markers (171 bytes) + pushing 2 obsolescence markers (* bytes) (glob) + remote: 2 obsolescence markers added $ hg push pushing to ssh://user@dummy/server searching for changes