summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-03 12:18:00 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-03 13:59:13 +0100
commit51a3f746ef8525c1a24085b97e28cc36c85b1268 (patch)
tree0d0ee873f3b6ff26b51901845679614af749688b /dgit
parente59fb2f70123dc40f515f60d707c4f99653d6d07 (diff)
dgit: Provide print-unapplied-treeish subcommand.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit18
1 files changed, 18 insertions, 0 deletions
diff --git a/dgit b/dgit
index 777532e..48feca9 100755
--- a/dgit
+++ b/dgit
@@ -6558,6 +6558,24 @@ sub cmd_quilt_fixup {
build_maybe_quilt_fixup();
}
+sub cmd_print_unapplied_treeish {
+ badusage "incorrect arguments to dgit print-unapplied-treeish" if @ARGV;
+ my $headref = git_rev_parse('HEAD');
+ my $clogp = commit_getclogp $headref;
+ $package = getfield $clogp, 'Source';
+ $version = getfield $clogp, 'Version';
+ $isuite = getfield $clogp, 'Distribution';
+ $csuite = $isuite; # we want this to be offline!
+ notpushing();
+
+ prep_ud();
+ changedir $playground;
+ my $uv = upstreamversion $version;
+ quilt_make_fake_dsc($uv);
+ my $u = quilt_fakedsc2unapplied($headref, $uv);
+ print $u, "\n" or die $!;
+}
+
sub import_dsc_result {
my ($dstref, $newhash, $what_log, $what_msg) = @_;
my @cmd = (git_update_ref_cmd $what_log, $dstref, $newhash);