bzr clone, pull, revert
Harald Meland
harald.meland at usit.uio.no
Tue Feb 17 10:09:34 GMT 2009
[Gerry Reno]
> I have not used bzr very long and I'm having trouble figuring out how
> to clone from a project, later pull to stay current, locate a specific
> revision that is tagged, revert to this tagged revision, the pull my
> copy current again with the project.
>
> bzr clone http://..... # project
> <time goes by>
> bzr pull # want to stay current
> bzr revno
> 1727
> bzr tags
> 5.0.0-2 1715
> 5.0.0-3 1725
> bzr revert -r tag:5.0.0-3 # want to work with this tagged version
> M bin/release.py
> M setup.py
You have now reverted your "tree" to revno 1725, but your branch is
still at revno 1727 (as reported by "bzr revno").
This means that a plain "bzr diff", that shows the difference between
the branch tip and your current tree, would now show the same as "bzr
diff -r 1727..1725".
> bzr diff -r 1725 setup.py
> # no diff, good
Indeed. This tells bzr to show the difference between the indicated
revno (rather than the branch tip) and your current tree version of
the setup.py file.
> # DO STUFF WITH revno 1725
Is this just a heading, or are you saying that you want to make
changes to the branch (as opposed to the tree) at revno 1725? If the
latter, you need to make a branch where the tip is at the correct
revno, e.g. "bzr branch -r 1725 . ../relase-5.0.0-3-fixes".
> bzr pull --overwrite # here is where I thought this would make all
> files current again with project
The current help for bzr pull does indeed say
If you want to forget your local changes and just update your branch to
match the remote one, use pull --overwrite.
... but I think it really only will "forget" local commits; any
uncommitted changes in your tree will not be forgotten (which I think
is fine, as it is the safe thing to do).
Exactly what will happen to files with uncommitted changes when a
"pull --overwrite" is issued doesn't appear to be covered by the
current help for bzr pull. I think it will try to merge the local
changes and any changes resulting from a change of the branch tip --
which in your case, where the branch tip stays at 1727, means that the
"local changes" from the above bzr revert stays in place.
--
Harald
More information about the bazaar
mailing list