Your message dated Fri, 14 Aug 2015 19:48:57 +0000
with message-id <e1zqkyh-0004y1...@franck.debian.org>
and subject line Bug#790889: fixed in git-buildpackage 0.6.33
has caused the Debian Bug report #790889,
regarding gbp-clone should allow referencing local repos
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
790889: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790889
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: git-buildpackage
Version: 0.6.31
Severity: wishlist
Tags: patch

Hello,

On the off chance you forget to clone a git repo for a debian package
with gbp-clone instead of git-clone, it would be handy to be able to
reference the local copy you already have when re-cloning the repo with
gbp-clone, in the same way that git-clone allows you to with the
--reference option.

Patch included.

Carlos

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git-buildpackage depends on:
ii  devscripts            2.15.5
ii  git                   1:2.1.4-2.1
ii  man-db                2.7.0.2-5
ii  python                2.7.9-1
ii  python-dateutil       2.2-2
ii  python-pkg-resources  17.0-1
ii  python-six            1.9.0-3

Versions of packages git-buildpackage recommends:
ii  cowbuilder       0.73
ii  pristine-tar     1.33
ii  python-requests  2.7.0-3

Versions of packages git-buildpackage suggests:
ii  python-notify  0.1.1-4
ii  unzip          6.0-17

-- no debconf information
>From ab576c7d6e9358928c63c6d223ed89791a9b3d77 Mon Sep 17 00:00:00 2001
From: Carlos Maddela <madd...@labyrinth.net.au>
Date: Thu, 2 Apr 2015 03:35:06 +1100
Subject: [PATCH] Added support for referencing existing local repositories
 when cloning repositories.

---
 docs/manpages/gbp-clone.sgml | 8 ++++++++
 gbp/git/repository.py        | 5 ++++-
 gbp/scripts/clone.py         | 4 +++-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/docs/manpages/gbp-clone.sgml b/docs/manpages/gbp-clone.sgml
index 20e6147..5b68158 100644
--- a/docs/manpages/gbp-clone.sgml
+++ b/docs/manpages/gbp-clone.sgml
@@ -27,6 +27,7 @@
       <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
       <arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg>
       <arg><option>--depth=</option><replaceable>depth</replaceable></arg>
+      <arg><option>--reference=</option><replaceable>repository</replaceable></arg>
       <arg choice="plain"><replaceable>remote_uri</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
@@ -77,6 +78,13 @@
         </listitem>
       </varlistentry>
       <varlistentry>
+        <term><option>--reference</option>=<replaceable>repository</replaceable>
+        </term>
+        <listitem>
+          <para>Local repository to use as alternate instead of re-copying data from remote repository.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
         <term><option>--pristine-tar</option>
         </term>
         <listitem>
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 2fa4fdd..8142a25 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1891,7 +1891,7 @@ class GitRepository(object):
 
     @classmethod
     def clone(klass, path, remote, depth=0, recursive=False, mirror=False,
-              bare=False, auto_name=True):
+              bare=False, auto_name=True, reference=None):
         """
         Clone a git repository at I{remote} to I{path}.
 
@@ -1910,6 +1910,8 @@ class GitRepository(object):
         @param auto_name: If I{True} create a directory below I{path} based on
             the I{remote}s name. Otherwise create the repo directly at I{path}.
         @type auto_name: C{bool}
+        @param reference: create a clone using local objects from I{reference} repository
+        @type reference: C{str}
         @return: git repository object
         @rtype: L{GitRepository}
         """
@@ -1924,6 +1926,7 @@ class GitRepository(object):
         args.add_true(recursive, '--recursive')
         args.add_true(mirror, '--mirror')
         args.add_true(bare, '--bare')
+        args.add_true(reference, '--reference', reference)
         args.add(remote)
         args.add_true(name, name)
         try:
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py
index 1c7f4a9..216bf99 100755
--- a/gbp/scripts/clone.py
+++ b/gbp/scripts/clone.py
@@ -47,6 +47,8 @@ def build_parser(name):
     branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
     branch_group.add_option("--depth", action="store", dest="depth", default=0,
                             help="git history depth (for creating shallow clones)")
+    branch_group.add_option("--reference", action="store", dest="reference", default=None,
+                            help="git reference repository (use local copies where possible)")
 
     parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False,
                       help="verbose command execution")
@@ -89,7 +91,7 @@ def main(argv):
 
     try:
         repo = DebianGitRepository.clone(clone_to, source, options.depth,
-                                         auto_name=auto_name)
+                                         auto_name=auto_name,reference=options.reference)
         os.chdir(repo.path)
 
         # Reparse the config files of the cloned repository so we pick up the
-- 
2.1.4


--- End Message ---
--- Begin Message ---
Source: git-buildpackage
Source-Version: 0.6.33

We believe that the bug you reported is fixed in the latest version of
git-buildpackage, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 790...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guido Günther <a...@sigxcpu.org> (supplier of updated git-buildpackage package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 14 Aug 2015 18:29:53 +0200
Source: git-buildpackage
Binary: git-buildpackage git-buildpackage-rpm
Architecture: source all
Version: 0.6.33
Distribution: experimental
Urgency: medium
Maintainer: Guido Günther <a...@sigxcpu.org>
Changed-By: Guido Günther <a...@sigxcpu.org>
Description:
 git-buildpackage - Suite to help with Debian packages in Git repositories
 git-buildpackage-rpm - Suite to help with RPM packages in Git repositories
Closes: 778594 790889 790890 791473 792692
Changes:
 git-buildpackage (0.6.33) experimental; urgency=medium
 .
   [ Carlos Maddela ]
   * [da4d469] Add support for referencing existing local repositories when
     cloning repositories. (Closes: #790889)
   * [97c7a32] Allow exported patches to be renumbered and the patch number
     prefix format to be specified as an option. (Closes: #790890)
   * [279e946] import-orig: Honour --debian-branch option when importing into
     an empty repo. (Closes: #791473)
 .
   [ Guido Günther ]
   * [035b179] import-orig: Add new --merge-mode=replace.
     This allows one to not merge upstream versions into the debian branch
     but rather replace the content of the debian branch and only preserve
     the debian/ dirs content. (Closes: #778594)
   * [3d86432] buildpackage: in overlay mode remove debian/ from unpacked
     tarball.  We don't have a way to influence the upstream tarball in overlay
     mode so remove debian/ after unpack if the source format expects this.
     (Closes: #792692)
Checksums-Sha1:
 f099be9957ec13f616afbd17f02c0b08fb189ab3 2018 git-buildpackage_0.6.33.dsc
 cd7e98b8314422b3c1ab6d462353aee4c024bda0 1630500 git-buildpackage_0.6.33.tar.xz
 eade58f65e30935148d3430e386bb506706ed0fb 69908 
git-buildpackage-rpm_0.6.33_all.deb
 e2f8d916112b30df6a1243847a566812cecfa1d2 316968 git-buildpackage_0.6.33_all.deb
Checksums-Sha256:
 805a74b601dee6abfa75065f919653ed998df32ed49d48fe1a68baf0d8f9496b 2018 
git-buildpackage_0.6.33.dsc
 4d3ce4e8233de6bf20c1710b07bc76c3369297221db83df958ebfee05d9d23cb 1630500 
git-buildpackage_0.6.33.tar.xz
 bcfaa23b4a5b8f2e782ffa418b6429dbb8d876de7d8d9a6b3d143425f6bb448b 69908 
git-buildpackage-rpm_0.6.33_all.deb
 6b5ed1090aad6828aed437f499deb9e812681c68908db994c518daff9ffc7304 316968 
git-buildpackage_0.6.33_all.deb
Files:
 13a00ecdcaab21db97125b66172e6eb2 2018 vcs optional git-buildpackage_0.6.33.dsc
 610bb222cbba80bde2babf26a9e6ca15 1630500 vcs optional 
git-buildpackage_0.6.33.tar.xz
 cc368cb11ac7caa8a8b49f9bba9428b9 69908 vcs optional 
git-buildpackage-rpm_0.6.33_all.deb
 1a872c88e3bec03392fac22b9b8a8362 316968 vcs optional 
git-buildpackage_0.6.33_all.deb

-----BEGIN PGP SIGNATURE-----

iQIVAwUBVc4/aAe4t7DqmBILAQgncRAAlfH4GYo0fgdq4ECvAtK8ZVo9rC0nbd5p
1xaKpdIvCE8MvZHznCrjkhnb58VCKcdPgHHbMQyc6CqT2DQ6iRKqBcGyiC/171eF
eOGwRPlQ3jBSnxnHoWLGWlQth5C/v3gG5Bz/B88neeIgsCvNmFvTMZn0wVR6A1+0
AZ8bn/DQIy5MzD/+vetl8JrS+vG6tCSpyHIfEwW+6InMLgTkHfd2u2HPZ3ho5Pwt
1Bo12o1ewQi7RaZ++mh7VB2V6ayK4iIFKxjF7X9LNFe6mwqP1EAIy3fq2OGVZAq2
Ap79HmekVUeu3P/0RCN1JRmEWhgVD+9aZ28uUQ13y2G1CN3oA5S0W9GIGUVtOFQV
BEB+Zk97MWe2cnLBGCJEr/+PYq7KvxtWIewh6iRVqOLHaL52e1N/k4w7o7ZHONzy
HaQ0BG2Y4Dv1s0REM4ZQKQuSxW1apeYDPbniq5DkFkMDp4g8JPB23NRLI6i6If0N
eWdILHFqv2GLdxpIRkWXe3dT5A0lEmZqmwMwpNOHbvpg3jNUe/4XlXDsxsoo+Eaw
5bh0hlrizOVqVAFajMFeai9APIj4cZe1mwq/7tkg6IgOlX9QfcBRurGimUYaEMla
CLv+dw8gp1E+ffcNEEM6gpC3Lt+yrP7ozpbk8STnaEj4xIM654S5y8NQORIDnIqM
pRu4gvBUiNA=
=4kel
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to