* Paul Elliott <pelli...@blackpatchpanel.com> [140527 10:15]:
> The first incarnations of my packanging effort for a project
> did not use git dpm. I therefore have a bunch of
> .dsc source repositories that I want to be my first
> commits. I am having trouble importing the first one
> after "git init".
> If I startoff with a git-dpm import-tar the whole
> commit appears in a "detached head". but I can get
> around that by renaming the commit to be "upstream"
> and it is not lost any more.
> The problem happens when I do a "git-dpm import-dsc".
> It always complains that master does not exist.
That is strange. What exactly do you do if you get there?
(btw if you want to just start with importing old packages
you can just start with git-dpm import-dsc. No need to import
the tarballs first).
> If I get around that by doing an empty commit first
> with --allow-empty, then it complains that debian/.git-dpm
> does not exist.
> git-dpm import-dsc -b master --patch-system history
> git-dpm: ERROR: master does not exists, but upstream does. import-dsc does
> not know that this means.
Here it complains that some part of the project you are
starting/extending already exists, but the main part does not.
Unless configured git-dpm thinks (master,upstream,patched) belong
together and (SOMETHING,upstream-SOMETHING,patched-SOMTHING).
Thus when there is no master, upstream and patched branch and you tell
it to import something to master, it will create a new project.
While if there is already a project in master (i.e. a debian/.git-dpm
file) and you tell it to import on master, it will import the .dsc on
top of the existing state.
But if there is a upstream but no master branch, what should be used for
If the upstream branch is just a commit you did yourself by importing
a tar, the easiest way is to just delete it and let git-dpm create
everything from importing the .dsc.
If it is some older branch you want to keep, it would be easiest to
create the project in some other branch (i.e. "-b import" or "-b debian"
or something like that). If the branch you have is supposed to be used
in that process, you can use
--upstream-to-use (then the commit must be the contents .orig.tar (or a
subset of the files and none of the files not in that branch not needed
for build (and ideally deleted by debian/rules clean)) or
--upstream-parent (then the commit is parent commit for newly created
commit that contains the .orig.tar contents, especially useful for
including upstream's git history so one can blame through all the
When importing your .dsc's, you might consider using
--upstream-date=auto or --use-changelog, which behaves as if the .dscs
were some history in a foreign vcs and imports them as history.
> What is the correct way to import a tar.gz and a .dsc into
> git-dpm after a "git init"?
git init foobar && cd foobar && \
git-dpm import-dsc [options] /path/to/foobar_v1.dsc && \
git-dpm import-dsc [options] /path/to/foobar_v2.dsc && \
should hopefully work. Otherwise please point me to an example that does
Bernhard R. Link
F8AC 04D5 0B9B 064B 3383 C3DA AFFC 96D1 151D FFDC
Git-dpm-user mailing list