update -r does a lookup in whole-branch history
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Parth Malwankar |
Bug Description
The current WorkingTree.
if revision is None:
else:
if revision not in self.branch.
Which has a couple issues:
1) I don't really know why we refuse to allow the revision to not be in the mainline of the branch. I don't see a specific problem doing "bzr update -r 1.2.1" for example.
2) Perhaps we meant to check if it was in the ancestry at all? I'm not sure that doing "bzr update -r revid:XXX" (for XXX not in the ancestry) needs to be forbidden, though.
3) Regardless, using 'revision_
revno = self.branch.
Which will raise NoSuchRevision for us if the revision is not in the lefthand ancestry. I don't think we have a quick shortcut for the non-mainline case, though revision_
Related branches
- Ian Clatworthy: Approve
- John A Meinel: Approve
-
Diff: 108 lines (+27/-18)4 files modifiedNEWS (+4/-0)
bzrlib/builtins.py (+6/-6)
bzrlib/tests/blackbox/test_update.py (+17/-9)
bzrlib/workingtree.py (+0/-3)
Changed in bzr: | |
status: | Confirmed → In Progress |
assignee: | nobody → Parth Malwankar (parthm) |
Changed in bzr: | |
status: | In Progress → Fix Released |
On 5 February 2010 21:40, John A Meinel <email address hidden> wrote:
> 1) I don't really know why we refuse to allow the revision to not be in the mainline of the branch. I don't see a specific problem doing "bzr update -r 1.2.1" for example.
> 2) Perhaps we meant to check if it was in the ancestry at all? I'm not sure that doing "bzr update -r revid:XXX" (for XXX not in the ancestry) needs to be forbidden, though.
I don't see any good reason to forbid it either.
-- launchpad. net/~mbp/>
Martin <http://