chiark / gitweb /
more fixes for error handling, @cmds
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 08:05:54 +0000 (09:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 08:05:54 +0000 (09:05 +0100)
TODO [new file with mode: 0644]
dgit

diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..4cd9ec3
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+manpage better descriptions
+die on config missing
+distro option
+autocommit not on HEAD, optionally
+field access error checks
diff --git a/dgit b/dgit
index 1c1e6e65c4ef0c59c701d2f1cae140eee2926495..a67cc7d05cbe9c7173c2dac45ccd57a6aca3da40 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -281,7 +281,7 @@ sub parsecontrol {
 sub parsechangelog {
     my $c = Dpkg::Control::Hash->new();
     my $p = new IO::Handle;
 sub parsechangelog {
     my $c = Dpkg::Control::Hash->new();
     my $p = new IO::Handle;
-    my @cmd = qw(dpkg-parsechangelog);
+    my @cmd = (qw(dpkg-parsechangelog));
     open $p, '-|', @cmd or die $!;
     $c->parse($p);
     $?=0; $!=0; close $p or failedcmd @cmd;
     open $p, '-|', @cmd or die $!;
     $c->parse($p);
     $?=0; $!=0; close $p or failedcmd @cmd;
@@ -329,12 +329,12 @@ sub archive_query_sshdakls ($$) {
 sub canonicalise_suite_sshdakls ($$) {
     my ($proto,$data) = @_;
     $data =~ m/:/ or badcfg "invalid sshdakls method string \`$data'";
 sub canonicalise_suite_sshdakls ($$) {
     my ($proto,$data) = @_;
     $data =~ m/:/ or badcfg "invalid sshdakls method string \`$data'";
-    my @cmd = 
-       access_cfg('ssh'), $`,
-       "set -e; cd $';".
-       " if test -h $isuite; then readlink $isuite; exit 0; fi;".
-       " if test -d $isuite; then echo $isuite; exit 0; fi;".
-       " exit 1";
+    my @cmd =
+       (access_cfg('ssh'), $`,
+        "set -e; cd $';".
+        " if test -h $isuite; then readlink $isuite; exit 0; fi;".
+        " if test -d $isuite; then echo $isuite; exit 0; fi;".
+        " exit 1");
     my $dakls = cmdoutput @cmd;
     failedcmd @cmd unless $dakls =~ m/^\w/;
     return $dakls;
     my $dakls = cmdoutput @cmd;
     failedcmd @cmd unless $dakls =~ m/^\w/;
     return $dakls;