Bug#345616: svn-buildpackage: patch implementing --no-branches

2006-01-04 Thread Thierry Reding
* Eduard Bloch wrote:
 #include hallo.h
 * Thierry Reding [Mon, Jan 02 2006, 06:48:59PM]:
 
The patch is relatively small, but may need some cleaning up.
   
   Yeah.
   
   *hint* It would be really handy to see what it is actually supposed
   to do by reading something in the manual or at least in a manpage, but
   you did not add any docs.
  
  I should of course have done that, do you want me to prepare another patch?
 
 Yes, please ;)


Here goes. If you need me to provide something more, or if you think the
documentation could be more elaborate, please let me know.

Thierry

P.S.: sorry Eduard for not sending this mail to the BTS the first time

diff -Nur svn-buildpackage-0.6.14.orig/doc/HOWTO.sgml 
svn-buildpackage-0.6.14/doc/HOWTO.sgml
--- svn-buildpackage-0.6.14.orig/doc/HOWTO.sgml 2005-09-23 16:17:33.0 
+0200
+++ svn-buildpackage-0.6.14/doc/HOWTO.sgml  2006-01-02 19:15:05.0 
+0100
@@ -442,6 +442,11 @@
 p
 If you actually decide to stop using the mergeWithUpstream-mode, unset the
 mergeWithUpstream property as follows: ttsvn propdel mergeWithUpstream 
debian//tt.
+p
+If you don't want to store the upstream sources of all your packages in the
+repository, you can pass the tt--no-branches/tt switch to
+ttsvn-inject/tt, which will prevent ttsvn-inject/tt from creating a
+ttbranches/tt subdirectory.
 /sect
 
 !--sectImporting directories
@@ -591,7 +596,11 @@
 Put only files that are actually touched in the .diff file under the
 version control.
 svn-inject sets the mergeWithUpstream property automaticaly, see HOWTO.
-
+p
+ em--no-branches/em 
+Do not create the `branches#39; subdirectory. This is useful for repositories
+that store lots of packages and where versioning the upstream sources would
+consume lots of space.
 
 
 
diff -Nur svn-buildpackage-0.6.14.orig/doc/svn-inject.1 
svn-buildpackage-0.6.14/doc/svn-inject.1
--- svn-buildpackage-0.6.14.orig/doc/svn-inject.1   2005-09-10 
21:36:27.0 +0200
+++ svn-buildpackage-0.6.14/doc/svn-inject.12006-01-02 19:10:20.0 
+0100
@@ -36,5 +36,10 @@
 Put only files that are actually touched in the .diff file under the
 version control.
 svn-inject sets the mergeWithUpstream property automaticaly, see HOWTO.
+.TP
+\fB\--no-branches\fR
+Do not create the `branches' subdirectory. This is useful for repositories that
+store lots of packages and where versioning the upstream sources would consume
+lots of space.
 .SH SEE ALSO
 svn\-buildpackage(1), svn\-upgrade(1), svn(1), the HOWTO manual (in 
/usr/share/doc/svn-buildpackage/).


signature.asc
Description: Digital signature


Bug#345616: svn-buildpackage: patch implementing --no-branches

2006-01-02 Thread Thierry Reding
Package: svn-buildpackage
Version: 0.6.14
Severity: wishlist
Tags: patch

Hi,

after some discussion on IRC about the usefulness of a --no-branches option, I
implemented this patch, which adds the --no-branches option to svn-inject.

The original idea came up in the pkg-ruby-extras project, which uses a build
system that pulls in upstream sources using a different script. The `branches'
subdirectory is not needed in their repository layout.

The patch is relatively small, but may need some cleaning up.

Cheers,
Thierry

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-fglrx-alsa
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)

Versions of packages svn-buildpackage depends on:
ii  devscripts  2.9.10   Scripts to make the life of a Debi
ii  libsvn-core-perl1.2.3dfsg1-3 perl bindings for Subversion (aka.
ii  perl5.8.7-10 Larry Wall's Practical Extraction 
ii  subversion  1.2.3dfsg1-3 advanced version control system (a
ii  subversion-tools1.2.3dfsg1-3 assorted tools related to Subversi

svn-buildpackage recommends no packages.

-- no debconf information

diff -Nur svn-buildpackage-0.6.14.orig/svn-inject 
svn-buildpackage-0.6.14/svn-inject
--- svn-buildpackage-0.6.14.orig/svn-inject 2005-10-13 21:29:24.0 
+0200
+++ svn-buildpackage-0.6.14/svn-inject  2006-01-02 01:50:36.0 +0100
@@ -49,6 +49,7 @@
 my $opt_dolike;
 my $opt_addtar;
 #my $opt_trackmode;
+my $opt_no_branches;
 
 # parse Command line
 %options = (
@@ -61,7 +62,8 @@
o = \$opt_onlychanged,
 #   u=s = \$opt_trackmode,
add-tar = \$opt_addtar,
-   c=i   = \$opt_checkout
+   c=i   = \$opt_checkout,
+   no-branches  = \$opt_no_branches
 );
 
 help unless ( GetOptions(%options));
@@ -173,7 +175,7 @@
 chdir $tempdir;
 
 # preparing a package tree that will be inserted into repository later
-if($dscOrig) {
+if($dscOrig  !$opt_no_branches) {
# prepare the upstream source
withecho mkdir, -p, $package/branches/upstream;
chdir $package/branches/upstream;
@@ -227,20 +229,25 @@
 # Final tree prepation before commit, preconfiguring already
 mkdir $package/tags;
 $SDCommon::c{tagsUrl}=$opt_svnurl/$package/tags;
-$SDCommon::c{upsCurrentUrl}=$opt_svnurl/$package/branches/upstream/current;
-$SDCommon::c{upsTagUrl}=$opt_svnurl/$package/branches/upstream;
+
+if (!$opt_no_branches) {
+   
$SDCommon::c{upsCurrentUrl}=$opt_svnurl/$package/branches/upstream/current;
+   $SDCommon::c{upsTagUrl}=$opt_svnurl/$package/branches/upstream;
+}
 
 # go, go, go
 withecho svn $SVN_QUIET import -m\$scriptname Installing original source of 
$package\ $package $opt_svnurl/$package;
 
 # for non-native: create the trunk copy from the source and modify it
 if($dscOrig) {
-   withecho(svn, -m, $scriptname Tagging upstream source version of 
$package, copy,
-   $opt_svnurl/$package/branches/upstream/current,
-   $opt_svnurl/$package/branches/upstream/$upsVersion, $SVN_QUIET);
-   withecho(svn, -m, $scriptname Forking $package source to Trunk, 
copy,
-   $opt_svnurl/$package/branches/upstream/current,
-   $opt_svnurl/$package/trunk, $SVN_QUIET);
+   if (!$opt_no_branches) {
+  withecho(svn, -m, $scriptname Tagging upstream source version of 
$package, copy,
+  $opt_svnurl/$package/branches/upstream/current,
+  $opt_svnurl/$package/branches/upstream/$upsVersion, $SVN_QUIET);
+  withecho(svn, -m, $scriptname Forking $package source to Trunk, 
copy,
+  $opt_svnurl/$package/branches/upstream/current,
+  $opt_svnurl/$package/trunk, $SVN_QUIET);
+   }
mkdir tmp;
chdir tmp;
withecho dpkg-source -x $opt_dsc;


signature.asc
Description: Digital signature


Bug#345616: svn-buildpackage: patch implementing --no-branches

2006-01-02 Thread Eduard Bloch
#include hallo.h
* Thierry Reding [Mon, Jan 02 2006, 09:53:22AM]:
 Package: svn-buildpackage
 Version: 0.6.14
 Severity: wishlist
 Tags: patch
 
 Hi,
 
 after some discussion on IRC about the usefulness of a --no-branches option, I
 implemented this patch, which adds the --no-branches option to svn-inject.
 
 The original idea came up in the pkg-ruby-extras project, which uses a build
 system that pulls in upstream sources using a different script. The `branches'
 subdirectory is not needed in their repository layout.
 
 The patch is relatively small, but may need some cleaning up.

Yeah.

*hint* It would be really handy to see what it is actually supposed
to do by reading something in the manual or at least in a manpage, but
you did not add any docs.

Eduard.

-- 
Stilblüten aus Polizeiberichten und Gerichtsverhandlungen:
Ullrich H. störte den Verkehr dadurch, daß er auf den Knien vom Park
auf die Fahrbahn kroch, wo er nach dem Regen die verirrten
Regenwürmer einsammelte.



Bug#345616: svn-buildpackage: patch implementing --no-branches

2006-01-02 Thread Thierry Reding
* Eduard Bloch wrote:
 #include hallo.h
 * Thierry Reding [Mon, Jan 02 2006, 09:53:22AM]:
  Package: svn-buildpackage
  Version: 0.6.14
  Severity: wishlist
  Tags: patch
  
  Hi,
  
  after some discussion on IRC about the usefulness of a --no-branches 
  option, I
  implemented this patch, which adds the --no-branches option to svn-inject.
  
  The original idea came up in the pkg-ruby-extras project, which uses a build
  system that pulls in upstream sources using a different script. The 
  `branches'
  subdirectory is not needed in their repository layout.
  
  The patch is relatively small, but may need some cleaning up.
 
 Yeah.
 
 *hint* It would be really handy to see what it is actually supposed
 to do by reading something in the manual or at least in a manpage, but
 you did not add any docs.

I should of course have done that, do you want me to prepare another patch?

Thierry

 Eduard.



signature.asc
Description: Digital signature


Bug#345616: svn-buildpackage: patch implementing --no-branches

2006-01-02 Thread Eduard Bloch
#include hallo.h
* Thierry Reding [Mon, Jan 02 2006, 06:48:59PM]:

   The patch is relatively small, but may need some cleaning up.
  
  Yeah.
  
  *hint* It would be really handy to see what it is actually supposed
  to do by reading something in the manual or at least in a manpage, but
  you did not add any docs.
 
 I should of course have done that, do you want me to prepare another patch?

Yes, please ;)

Eduard.
-- 
Liebe ist kein Solo. Liebe ist ein Duett. Schwindet sie beim einen,
verstummt das Lied.
-- Adalbert von Chamisso


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]