Hi folks, I am playing around with TopGit and encountered a (conceptual) problem. I'd love to hear some input. I want to use TopGit for distro packaging. Any of my packages have one or more feature branches, some intended for upstream, some distro-specific. As I am packaging TopGit for Debian, I encountered the situation that two branches conflict with each other (they change the same line), but there is no dependency between the branches. Thus, when I squash the branches into a series, the resulting patches will not apply (they both change the same original line to something else). Obviously, I can introduce a "fake" dependency to force TopGit to create one patch based on another. However, this then prevents me from testing and developing the depending branch in isolation, meaning that I always have to have the dependent branch applied when I want to work on the second feature. Furthermore, it's not trivially possible in this situation to cherry-pick only the second patch. I see that this is a hard problem with no obvious solution. The only thing that comes to my mind is maintaining multiple patches for each branch. In the above, if B "fake-depends" on A, which depends on master, then I would have A and B depend on master only, but have TopGit also manage B2 for me, which is a diff against A. Doing this for all branches is polynomial, but then again, the number of independent branches, or rather branch trees, is likely to be pretty low in most cases. As an alternative, it may be possible, however, to let TopGit know about a "fake dependency" from B on A. When serialised, TopGit would notice that there are multiple paths from master to B (master->B and master->A->B) and use the longer one. Do you see any other ways in which the situation could be handled? Is the above something that TopGit could learn, Petr? Cheers, -- .''`. martin f. krafft <madduck@xxxxxxxxxx> : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~madduck - http://debiansystem.info `- Debian - when you have better things to do than fixing systems "with sufficient thrust, pigs fly just fine. however, this is not necessarily a good idea. it is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." -- rfc 1925
Attachment:
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)