[PATCH 2 of 2] Adding bundle -r,
which will only bundle the changesets needed to reach the
Benoit Boissinot
bboissin at gmail.com
Fri Sep 30 11:56:28 CDT 2005
Just some comments.
regards,
Benoit
On 9/30/05, Eric Hopper <hopper at omnifarious.org> wrote:
> # HG changeset patch
> # User Eric Hopper <hopper at omnifarious.org>
> # Node ID e91ea9bb945d76c0f58fcc030d501e650904fddb
> # Parent 0e58a4547982146b59a93500b34b785dc5095eb5
> Adding bundle -r, which will only bundle the changesets needed to reach the
> given revision.
>
> diff -r 0e58a4547982 -r e91ea9bb945d mercurial/commands.py
> --- a/mercurial/commands.py Fri Sep 30 04:12:53 2005
> +++ b/mercurial/commands.py Fri Sep 30 15:36:18 2005
> [snip]
> + self.ui.debug('%u:%u\n' % (lowestrev, targetrev))
> + selected = {targetnode: 1}
> + prunedset = selected.copy()
> + for i in xrange(targetrev, lowestrev, -1):
> + n = cl.node(i)
> + if n in prunedset:
> + for p in cl.parents(n):
> + if (p != nullid) and cl.rev(p) >= lowestrev:
> + prunedset[p] = 1
you can use something like cl.reachable(targetrev, stop=lowestrev)
(maybe you have to add lowestrev to the dict after the call)
> [snip]
>
> - def changegroup(self, basenodes):
> + def changegroup(self, basenodes, targetnode = None):
i think targetnode=None is preferred for keyword arguments
> genread = util.chunkbuffer
>
More information about the Mercurial
mailing list