[Python-Dev] hg diff
Stephen J. Turnbull
stephen at xemacs.org
Wed Mar 9 07:27:49 CET 2011
"Martin v. Löwis" writes:
> > Doesn't "hg diff -r 'ancestor(branch,default)::branch'", where "branch"
> > is the unmerged branch you would like to inspect, do the right thing?
>
> What would I specify as "branch" if all I have is
> "http://bitbucket.com/turnbull/foo", and know that it must be the
> default branch?
Dunno offhand; I'm a git person. Here I was specifically addressing
the "multiple patches per file" issue.
What I do in practice is git-like:
hg branch turnbull-foo
hg pull http://bitbucket.com/turnbull/foo
hg commit -m "Temporary turnbull-foo."
hg diff -r 'ancestor(<head>,default)::<head>'
hg branch default
Then if the code is good I merge it and close the branch, if the code
sucks I close the branch, if it needs improvement I keep the branch
until a decision is made. I haven't thought about automating the
clean up operations, probably you can just close the branch. Also,
for cases with multiple accesses to the same remote, I'm not sure
whether use of "hg branch --force" would be appropriate or not.
There's probably a way to get around the accumulation of branches and
revision data, but I don't need it (the few people who submit branches
generally submit good code that can be integrated) so I haven't looked
for it. One obvious approach would be to do this in a separate repo
used only for this purpose and throw it away occasionally, and create
a new one as a clone of the public repo.
More information about the Python-Dev
mailing list