Export changesets since a revision + 1

Yuya Nishihara yuya at tcha.org
Wed Sep 7 14:22:49 UTC 2016


On Wed, 7 Sep 2016 15:14:32 +0200, David Demelier wrote:
> I'm guessing what is the easiest way to export a patch since the last
> revision + 1 pulled locally from an upstream repository.
> 
> Example, I clone a repository that use the @ bookmark where I don't
> have write access, I commit two changesets that I want to send as a
> patch later.
> 
> hg clone repo-url && cd repo-url
> hg book -i @ (don't move @ to reference it as the last upstream commit)
> ... work ...
> hg ci -m "feature added"
> ... work ...
> hg ci -m "tests"
> 
> Now, @ still points to the last revision upstream, I want to export
> descendants of @ but not including @.

That is "@:: - @", but which means all descendants of @ including ancestors
of the other heads. So I think what you need is ". % @".

> It seems that hg export -r ". % @" works but I'm not sure if it's the
> correct one :)

Correct. ".%@" == "::. - ::@" (all ancestors of . excluding ancestors of @)



More information about the Mercurial mailing list