From: Joey Hess Date: Sun, 18 Sep 2011 02:03:31 +0000 (-0400) Subject: 'pristine-tar list' displays a list of tarballs that are available for checkout. X-Git-Tag: 1.15~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=969fd5928ee35cf6bfd75c487c52bf814c21c080;p=tools%2Fpristine-tar.git 'pristine-tar list' displays a list of tarballs that are available for checkout. --- diff --git a/debian/changelog b/debian/changelog index 543f0aa..80bc8d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ pristine-tar (1.15) UNRELEASED; urgency=low * Fix Vcs-Browser url. Closes: #636926 * Propigate nonzero exit status from doit_redir. Closes: #600724 + * 'pristine-tar list' displays a list of tarballs that are available for + checkout. -- Joey Hess Sun, 07 Aug 2011 08:53:21 -0400 diff --git a/pristine-tar b/pristine-tar index 78a366e..67a5bd2 100755 --- a/pristine-tar +++ b/pristine-tar @@ -14,6 +14,8 @@ B [-vdk] [-m message] commit I [I] B [-vdk] checkout I +B [-vdk] list + =head1 DESCRIPTION pristine-tar can regenerate an exact copy of a pristine upstream tarball @@ -72,6 +74,11 @@ branch is created or updated as needed to add each new delta. This regenerates a copy of the specified I using information previously saved in version control by B. +=item pristine-tar list + +This lists tarballs that pristine-tar is able to checkout from version +control. + =back =head1 OPTIONS @@ -192,6 +199,7 @@ dispatch( ci => [\&commit, 1], checkout => [\&checkout, 1], co => [\&checkout, 1], + list => [\&list, 0], }, options => { "m|message=s" => \$message, @@ -759,3 +767,23 @@ sub checkout { message("successfully generated $tarball"); } + +sub list { + my $branch="pristine-tar"; + my $vcs=vcstype(); + if ($vcs eq "git") { + my $b=git_findbranch($branch); + if (defined $b) { + open (LIST, "git ls-tree $b --name-only |"); + while () { + chomp; + next unless s/\.delta$//; + print $_."\n"; + } + } + else { + die "unsupported vcs $vcs"; + } +} + +}