if @ARGV == 0;
my $command_name = shift @ARGV;
- $command_name =~ s{-}{_}gxms;
-
my( $command ) = grep { $command_name eq $_->name } CIL->commands
or Getopt::Mixed::abortMsg("'$command_name' is not a valid cil command.");
--- /dev/null
+Issue: 1a5fb257
+CreatedBy: Andrew Chilton <andychilton@gmail.com>
+Inserted: 2010-01-24T11:14:08
+Updated: 2010-01-24T11:14:40
+
+Before even doing this issue, the 'depends-on' was being mapped to
+'depends_on', so that has also been fixed.
Summary: Make sure depends-on and precedes can --add and --commit
-Status: New
+Status: Finished
CreatedBy: Andrew Chilton <andychilton@gmail.com>
AssignedTo: Andrew Chilton <andychilton@gmail.com>
Label: Milestone-v0.07
+Comment: 146b6b88
Inserted: 2010-01-24T10:36:07
-Updated: 2010-01-24T10:39:29
+Updated: 2010-01-24T11:14:40
We need to support the following:
$issue->save($cil);
$depends->save($cil);
+
+ # if we want to add or commit this change
+ if ( $args->{add} or $args->{commit} ) {
+ $cil->vcs->add( $cil, $issue );
+ $cil->vcs->add( $cil, $depends );
+ }
+
+ # if we want to commit this change
+ if ( $args->{commit} ) {
+ my $message = 'Issue ' . $issue->name . ' has a new dependent ' . $depends->name;
+ $cil->vcs->commit_multiple( $cil, $message, $issue, $depends );
+ }
}
1;
$issue->save($cil);
$precedes->save($cil);
+
+ # if we want to add or commit this change
+ if ( $args->{add} or $args->{commit} ) {
+ $cil->vcs->add( $cil, $issue );
+ $cil->vcs->add( $cil, $precedes );
+ }
+
+ # if we want to commit this change
+ if ( $args->{commit} ) {
+ my $message = 'Issue ' . $issue->name . ' precedes ' . $precedes->name;
+ $cil->vcs->commit_multiple( $cil, $message, $issue, $precedes );
+ }
}
1;