pdiff not very smart
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Thu Dec 18 02:54:31 CST 2008
On Wed, Dec 17, 2008 at 10:31 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>
> I've now started playing with pbranch and have bumped into the following problem:
>
> $ hg id
> db35f879d3b8+ (dictopts) tip
> $ hg pgraph
> o dictopts
> |
> o gctrigger
> |
> o trunk
>
> $ hg pdiff -r trunk
> abort: branch dictopts is not in the patch graph (maybe update to it, or use
> --tips?)
>
>
> Also, "hg pdiff -r trunk -p dictopts" doesn't work as expected. I would have
> thought it would have given me the patch of dictops against trunk (that's what
Ah, a misunderstanding. pdiff never diffs arbitrary branches. It
always diffs according to the patch graph. So with pdiff, you only
ever compare dictopts to its base, gctrigger. This is because pdiff is
designed to show the patch that mq would store directly.
The reason you can pass a revision to pdiff is so you can go back in
time to see the pdiff as it was a few revisions back. However, if you
select a revision for pdiff where dictopts did not even exist yet (or,
more precisely, its .hgpatchinfo/dictopts.dep file), then pdiff will
complain that dictopts is not in the patchgraph. As indeed it was not
at the given revision.
So this explains why `hg up dictopts; hg pdiff -r trunk` complains. At
the tip of trunk, the dictopts patch branch did not exist.
> "hg diff -r trunk" does, but unfortunately it adds .hgpatchinfo stuff in the
> diff as well).
You can simply do `hg diff -r trunk -X .hgpatchinfo` (which is
basically what pdiff does to produce the final diff, too).
-parren
More information about the Mercurial
mailing list