1

プロジェクト間の配信を行うときに実行するのに最適なコマンドは何ですか? 私はどのようなマージを見つけるのが好きで、findmerge はあまり使いにくいと思われるので、他に何が利用できるのだろうかと思います。

4

1 に答える 1

1

cleartool deliverマニュアルページから試すことができます:

配信操作をプレビューします。

deliver –pre/view [ –s/hort | –l/ong ] [ –str/eam stream-selector ]
    [ –to integration-view-tag] [ –tar/get stream-selector ]
    [ –cac/t | –act/ivities activity-selector ...
    | –bas/elines baseline-selector ... ]

ただし、宛先プロジェクトの配信ポリシーが相互配信を許可していることを確認してください。「 UCMで1つのプロジェクトから別のプロジェクトにベースラインを配信する方法」を参照してください。


このスレッドは、実際にはの出力を解析するperlスクリプトを参照しますcleartool deliver -preview
これが抜粋です(ただし、完全なスクリプトではありません)

$deliver = 0;
$delmsg = "";
$sendmail = 0;
$mailprio = "";
$cmd = "cleartool deliver -preview -stream $stream";
print ("CMD ==> $cmd\n");
system ("echo $cmd >>$logfile");
$ct_out = `$cmd 2>&1 | $tee -a $logfile`;
print ("$ct_out\n\n");
if ($ct_out =~ /Changes will be POSTED/) {
    $deliver = 1;
    $sendmail = 1;
    $delmsg = "Changes to be delivered";
    print ("$delmsg\n");
    system ("echo $delmsg >>$logfile");
    $cmd = "cleartool deliver -force -stream $stream";
    print ("CMD ==> $cmd\n");
    system ("echo $cmd >>$logfile");
    system ("$cmd 2>&1 | $tee -a $logfile");
} elsif ($ct_out =~ /Deliver operation already in progress/) {
    $deliver = 0;
    $delmsg = "DELIVERY ALREADY IN PROGRESS";
    print ("$delmsg\n");
    $sendmail = 1;
} elsif ($ct_out =~ /No activities to deliver/) {
    $deliver = 0;
    $delmsg = "No activities to deliver";
    print ("$delmsg\n");
} elsif ($ct_out =~ /There are checkouts in activities/) {
    $deliver = 0;
    $delmsg = "UNABLE TO DELIVER DUE TO CHECKOUTS";
    print ("$delmsg\n");
    $sendmail = 1;
    $mailprio = "-priority 1";
} elsif ($ct_out =~ /Unable to start a deliver operation while a rebase operation is in progress/) {
    $deliver = 0;
    $delmsg = "UNABLE TO DELIVER DUE TO REBASE IN PROGRESS";
    print ("$delmsg\n");
    $sendmail = 1;
    $mailprio = "-priority 1";
} else { 
    $deliver = 0;
    $delmsg = "FAILED TO DETERMINE STATUS";
    $toaddr = $toaddr2;
    print ("$delmsg\n");
    $sendmail = 1;
    $mailprio = "-priority 1";
}

依存するアクティビティのみを表示したい場合は、このスレッドで次のことを提案します。

#!/usr/bin/perl -w
use strict;

my $streamSelector = 'stream@pvob'; # here you should specify the actual stream selector

#    HASH structure
#    activity-to-deliver => http://activity-depend-on, ...

my %dependency;

#    Get all new activities that can be delivered

my $cmd = "cleartool deliver -preview -stream $streamSelector";
open(ACTIVITIES, "$cmd|") or die("Error: $!\n");
while (<ACTIVITIES>)
{
  chomp;
  if (m/^\s+activity:(^\s+)\s+/)
  {
    $dependency{$1} = [];
  }
}
close(ACTIVITIES);

#    Get dependency of all the activities

foreach my $activity (sort(keys(%dependency)))
{
  $cmd = "cleartool deliver -preview -stream $streamSelector -activities $activity";

  open(DELIVER, "$cmd 2>&1 |") or die("Error: $!\n");
  while (<DELIVER>)
  {
    chomp;
    if (m/^cleartool: Error: Activity \"(+)\" must be added to activity list\.$/)
    {
      push(@{$dependency{$activity}}, $1);
    }
  }
  close(DELIVER);
}

#    Output result

foreach (sort(keys(%dependency)))
{
  print("$_\n");
  foreach (sort(@{$dependency{$_}}))
  {
    print("\t$_\n");
  }
  print("\n");
}
于 2012-04-24T20:11:39.190 に答える