chiark / gitweb /
dgit: Move cmd_push_source down the file
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 11:41:50 +0000 (12:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 26 Jul 2018 12:00:47 +0000 (13:00 +0100)
Pure code motion.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 9384f64e87faba171d6c761de8e6963d34773d01..23e66b2cf4b34638c178c8a272c7c66dd4258957 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4758,27 +4758,6 @@ sub cmd_push {
 
 our $sourcechanges;
 
-sub cmd_push_source {
-    prep_push();
-    fail "dgit push-source: --include-dirty/--ignore-dirty does not make".
-      "sense with push-source!" if $includedirty;
-    build_maybe_quilt_fixup();
-    if ($changesfile) {
-        my $changes = parsecontrol("$buildproductsdir/$changesfile",
-                                   "source changes file");
-        unless (test_source_only_changes($changes)) {
-            fail "user-specified changes file is not source-only";
-        }
-    } else {
-        # Building a source package is very fast, so just do it
-       build_source();
-       die "er, patches are applied dirtily but shouldn't be.."
-           if $patches_applied_dirtily;
-       $changesfile = $sourcechanges;
-    }
-    dopush();
-}
-
 #---------- remote commands' implementation ----------
 
 sub pre_remote_push_build_host {
@@ -6492,6 +6471,27 @@ sub cmd_build_source {
     printdone "source built, results in $dscfn and $sourcechanges";
 }
 
+sub cmd_push_source {
+    prep_push();
+    fail "dgit push-source: --include-dirty/--ignore-dirty does not make".
+      "sense with push-source!" if $includedirty;
+    build_maybe_quilt_fixup();
+    if ($changesfile) {
+        my $changes = parsecontrol("$buildproductsdir/$changesfile",
+                                   "source changes file");
+        unless (test_source_only_changes($changes)) {
+            fail "user-specified changes file is not source-only";
+        }
+    } else {
+        # Building a source package is very fast, so just do it
+       build_source();
+       die "er, patches are applied dirtily but shouldn't be.."
+           if $patches_applied_dirtily;
+       $changesfile = $sourcechanges;
+    }
+    dopush();
+}
+
 sub cmd_sbuild {
     build_prep(WANTSRC_SOURCE); # not BUILDER because sbuild uses the .dsc
     build_source();