Le Tue, Nov 03, 2009 at 09:25:20AM +0100, Guido Günther a écrit :
> Yes please do. We can even add a patch to the gbp documentation if that
> helps in the interim. A patch against the docbook source would be
> welcome.

Today is our lucky day, it is holiday in Japan :) Here are two patches: one to
document the workaround in the main doc, and one to document --empty-upstream
when it is implemented.

Have a nice day,

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan
>From e30cb1a410839a70dae90b4bf2182d691395bf9c Mon Sep 17 00:00:00 2001
From: Charles Plessy <ple...@debian.org>
Date: Tue, 3 Nov 2009 21:53:32 +0900
Subject: [PATCH 1/2] Added --empty-upstream to the git-import-orig manpage.

---
 docs/manpages/git-import-orig.sgml |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/docs/manpages/git-import-orig.sgml b/docs/manpages/git-import-orig.sgml
index 84811b4..1dd8178 100644
--- a/docs/manpages/git-import-orig.sgml
+++ b/docs/manpages/git-import-orig.sgml
@@ -25,6 +25,7 @@
       <arg><option>--upstream-version=</option><replaceable>version</replaceable></arg>
       <arg><option>--no-merge</option></arg>
       <arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg>
+      <arg><option>--empty-upstream</option></arg>
       <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
       <arg><option>--[no-]sign-tags</option></arg>
       <arg><option>--keyid=</option><replaceable>gpg-keyid</replaceable></arg>
@@ -80,6 +81,13 @@
         </listitem>
       </varlistentry>
       <varlistentry>
+        <term><option>--empty-upstream</option></term>
+        <listitem>
+	  <para>The Git repository does not yet contain an upstream branch, and
+	  &git-import-orig; will create one, named “upstream”.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
         <term><option>--debian-branch</option>=<replaceable>branch_name</replaceable>
         </term>
         <listitem>
-- 
1.6.3.3

>From 9a44e161462f1b74a098338e2ea68d6f402a900d Mon Sep 17 00:00:00 2001
From: Charles Plessy <ple...@debian.org>
Date: Tue, 3 Nov 2009 22:04:36 +0900
Subject: [PATCH 2/2] =?utf-8?q?Stefano=20Zacchiroli=E2=80=99s=20workaround=20for=20creating=20empty=20upstream=20branches.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

(See ‘http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471560’)
---
 docs/chapters/import.sgml |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/docs/chapters/import.sgml b/docs/chapters/import.sgml
index 521cc2f..429f9f1 100644
--- a/docs/chapters/import.sgml
+++ b/docs/chapters/import.sgml
@@ -130,6 +130,17 @@ EOF
     url="http://git.or.cz/gitwiki/GraftPoint";>grafts</ulink>. Afterwards you
     can simply create a branch as explained above and &git-import-orig; will 
     work as expected.</para>
+    <para>Alternatively, if you are only importing source from original tarballs
+    (for instance when converting from a Subversion repository where the
+    mergeWithUpstream was set for svn-buildpackage), you can create an empty
+    upstream branch with the following commands:
+<screen>
+    git symbolic-ref HEAD refs/heads/upstream
+    git rm --cached -r .
+    git commit --allow-empty -m 'Initial upstream branch.'
+    git checkout -f master
+</screen>
+    </para>
     </sect2>
     </sect1>
 
-- 
1.6.3.3

Reply via email to