[ the technical aspect of the problem I'm describing is debian+git
specific, but the conceptual problem is applicable to every
distro/$DVCS, I guess ]

I've a git repository which has been used to version only the debian/
dir thus far [1]. Now that we have git and its space efficiency, I want
to version both upstream sources and the debian dir in the very same
system. The usual layout supported by git-buildpackage (but I guess one
of the obvious layout) is to have two branches, an "upstream" branch
with upstream source only and a "master" branch (which I believe is the
one called informally "integration" branch) with both upstream sources +
the debian/ dir.

Moving to what I have (i.e. just a single "master" branch) to such a
layout ain't easy apparently. The key problem is: how to generate from
scratch an upstream branch which only contains upstream sources.

The naive solution (which is actually what git-buildpackage tries to do
when using git-import-orig/dsc) of branching off an upstream branch from
the master branch and then deleting the debian/ dir does not work, as
when we try to merge usptream back into master git will merge even the
deletion of the debian/ dir.

Ideally I should be branching the root of the commit dag, but
unfortunately even that has a debian/ dir which has been added as the
first commit (and no, at least in git there is no such a think as the
parent of the commit dag root, I've tried that :)).

I've found some ugly solution using git-filter-branch on an upstream
branch branched from master, but the resulting history is horrible.

What I would need is the ability to create a separate history line from
scratch, call it "usptream", tie it with the master history with a new
(fake) commit root, and then merge the two into master. Is that possible
with git or some other $DVCS?

I guess solving this issue will be a common need for anyone which want
to move from the version of only distro-specific stuff to the versioning
of distro+usptream stuff.


[1] actually it is a such only because it is a git repo generated
converting from a svn repo, but this is not that relevant.

Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
[EMAIL PROTECTED],cs.unibo.it,debian.org}  -<%>-  http://upsilon.cc/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time

vcs-pkg-discuss mailing list

Reply via email to