bzr pull breaks hardlink of .bzr/x-pull

Bug #2350 reported by Scott James Remnant (Canonical)
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

Running bzr pull from a hardlinked other-copy of a branch. with a different pull location, writes the .bzr/x-pull file without taking care to break the hardlink -- therefore both branches default pull locations change.

Revision history for this message
John A Meinel (jameinel) wrote :

I think the general fix is to just make cmd_pull.run() use AtomicFile when it wants to change the contenst of .bzr/x-pull.

But there has also been some discussion between myself and Aaron Bentley (I think on the mailing list), that we don't actually want to change the contents of x-pull. Because from common use, it seems that most times a new location is the temporary one, not a permanent one.

Do you feel that "bzr pull <location>" should always override .bzr/x-pull, or only create it if it doesn't exist?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

I think most of the time "missing argument means repeat last command" seems sane ... you could add something like "bzr pull --dont-save" or something?

Revision history for this message
John A Meinel (jameinel) wrote :

The x-pull code has been changed to use .bzr/parent (and Branch.get_parent/Branch.set_parent). Which do use AtomicFile.

I think this can be closed.

Aaron Bentley (abentley)
Changed in bzr:
status: New → Fixed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.