Bzr's startup time
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Jun 27 13:12:02 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> This is, incidentally, a classic case where you would like to try
> to merge across a split file. There are some cases where a sufficiently
> good merger ought to be able to do it, in this case by anchoring off the
> classname. I can imagine extracting something like patch hunks that
> can't be applied, then trying to anchor them by looking at lines that
> are unique across the whole tree. (Or perhaps at lines that are unique
> across all files that have split out from that point.)
I'm given some thought to this case, and I think the most promising
approach is to have a concept of line identify, and to use an edge-based
merge. If you look this file
helloworld-2349
a: def hello():
b: print "Hello",
c:
d: def world():
e: print "world."
If you split it to two files, you get
helloworld-2349
a: def hello():
b: print "Hello",
c:
world-5643
d: def world():
e: print "world."
In terms of edges, this is
del c <-> d
add c <-> EOF-helloworld-2349
add SOF-world-5643 <-> d
del e <-> EOF-helloworld-2349
add e <-> EOF-world-5643
Which means a merge that wants to alter either function can do so
seamlessly, whether the functions are in the same file or not.
I think line identity, intelligently handled by commit, makes this case
much easier to track, and edge merges have the nice property that don't
require sections to appear in a particular order.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEoSCS0F+nu1YWqI0RAoquAJ9yXx7TcLUC/LboZNrGYna69o7JrACfSXlQ
cSQUEmRwpWv4xcKg3U3EAic=
=bTaK
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list