Q: finding parent changesents?

Perez-Gonzalez, Inaky inaky.perez-gonzalez at intel.com
Wed Aug 10 22:35:40 CDT 2005


Hi all

I am using mercurial--v0.6b as distributed by Debian--to
manage a bunch of trees and I am hitting this wall:

I cloned the kernel repo (kernel.org/hg/linux-2.6)
Added my stuff (patch here, edit there, ...)
pulled from linux-2.6
add/modify more stuff
pull again

Now I want to do a diff against the baseline (linux-2.6)
of my changes, but I am kind of lost on how to do it.
I am guessing I have to find the parent of my branch
with hg parents and diff against that, right?

So I try with hg parents and I get:

$ hg parents
changeset:   5791:ba4cb3f13630d72fc8b2ea08f039e8c517989e57
tag:         tip
user:        inaky.perez-gonzalez at intel.com
date:        Wed Aug 10 15:01:01 2005
summary:     kvm: more documentation and rants updates

I scratch my head and I go...well, it has to be somewhere, so
I do:

$ hg log | grep parents
$ hg log | grep -e ^parent: -e ^summary: -e ^changeset:
changeset:   5791:ba4cb3f13630d72fc8b2ea08f039e8c517989e57
summary:     kvm: more documentation and rants updates

changeset:   5790:4860f43fbe0e0703210754a5db174aabb2b93d16
summary:     kvm: documentation and style improvements

changeset:   5789:6a18e8b3cb51e7b30a502ee5d84f6ffcd863189c
parent:      5753:8cca03927a991baf4e60d0ded51725fe83c8ede0
parent:      5788:c226b932746a85bc61eab272fc76699b30c82ebb
summary:     kvm: merge linux-2.6
^^^^^^^^^^^^^^^^
changeset:   5788:c226b932746a85bc61eab272fc76699b30c82ebb
parent:      5787:3f2fa847518ebc33e0c96589f6e8372580ecc4ad
parent:      5781:397dfb16fb39e7f69365f2dd4295c0753327b8d0
summary:     Merge head 'upstream-fixes' of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

changeset:   5787:3f2fa847518ebc33e0c96589f6e8372580ecc4ad
summary:     [PATCH] remove name length check in a workqueue
...

I decide I am going to risk it and take the last merge I
did from what I know is the parent as the 'parent'...so
basically take the first parent in the log and use that.

So I diff against 5753 and I get plenty of changes that are
not related to my "modifications". I try 5788 though and I
get what I am looking for.

So, the question is: how do I ask my repo what is your last
merge from repo X so I can diff against it?

Or if I am getting everything wrong: how do I diff against
my baseline? 

Thanks a lot

-- Inaky 




More information about the Mercurial mailing list