When manually resolving directory conflicts isn't a feature
Ben Finney
ben+bazaar at benfinney.id.au
Tue Apr 7 08:52:32 BST 2009
Mary Gardiner <mary at puzzling.org> writes:
> Answers along the lines of "you don't need that many directories,
> surely" don't seem appropriate somehow. The tool should allow me to
> create new directories in branches and switch back and forth easily,
> and then my use of directories is between me and whichever
> unfortunates have to work on my codebase(s).
Bazaar certainly allows you to do this; better than many other tools,
I'd say, since it treats directories as first-class citizens in the
tree of versioned objects. So no, I don't think you need to adjust how
much you make and remove directories.
What seems to be causing you trouble, though, is that Bazaar isn't
being informed of your intentions. If you want an object (whether a
file or directory) to retain a common identity between branches, then
you can't add that object separately in different revisions. Doing
that just means that Bazaar will treat those two added objects as
different, regardless of their names. Attempting to add two different
things under the same name unintentionally is exactly the sort of
conflict a VCS is designed to prevent.
So, if you want a new object (file or directory) to have a common
identity, you need to add it in one revision and then bring that
revision across to other branches that should have the same object
added (which is very different, as you've found, from having two
entirely separate objects added under the same name).
You don't have to *add* the object in the trunk branch; you don't even
strictly need a trunk branch at all. You merely need to ensure that
the revision which *does* add the object makes its way into whatever
other branches that same object should appear in. You do that by
merging from one branch into another, and so forth into each one,
instead of creating the object multiple times with separate revisions.
--
\ “To succeed in the world it is not enough to be stupid, you |
`\ must also be well-mannered.” —Voltaire |
_o__) |
Ben Finney
More information about the bazaar
mailing list