Hugo
Hugo

Reputation: 1822

How can I promote an issue from one stream to its parent via the CLI

While trying to automate my process as much as possible, I would like to be able to promote an issue from one stream to another, via the CLI, in AccuRev 6.0.2

I've tried seemingly every documented example and permutation of the accurev promote command, to no avail. It seems that when using the -s switch, it isn't recognized. And when using it with the -S switch, an error is reported that the source stream must be specified by the -s switch, which it is.

I've tried specifying the issue as well, with the -I <issuenumber> -3 from the external issue tracker, as well as with -I <accurev issue number> which was created from the external system, retrieved via the accurev cpkdescribe command. I've also tried with the external list file, in both XML and one-item-per-line, again, with both the 3rd party issue number, as well as the AccuRev issue number.

Boiled down to its simplest form, which I would have expected to work, is this command: accurev promote -c "Move changes from DEV to QA stream" -I <issueNumber> -3. Can this be done via the CLI, or should I resign myself to using the GUI?

Upvotes: 1

Views: 471

Answers (2)

Martin Ba
Martin Ba

Reputation: 38766

Normally, when promoting from one stream to another, there's the question on what you want to promote (and you did not specify what in you question.)

@jstanley notes the -Fx switch to promote by issue, but possibly, you want to promote everything, in which case you'd just use the -d switch:

-d : Selects all elements in the default group of the workspace (or more generally, the child stream).

That would become accurev -s "from" -S "to" -d and then all pending files, hence all pending issues, will be promoted to the parent stream.

Note: The -Ior -3 -I switch is never useful when promoting from stream to stream, because you have already linked your files up to the issues when promoting from the workspace. Use -I only when promoting from a workspace.

If you want to promote-by-issue you must use -Fx -l as described in the other answer.

Upvotes: 0

jstanley
jstanley

Reputation: 2097

Run the command "accurev help promote"

You need to use the options below.

-Fx -l "XML-file"

The "XML-file" specifies a set of issue records with an XML-format text file.

Command:

accurev promote -s "From Stream" -S "To Stream" -Fx -l issuesToPromote.txt

where the file would contain:

<issues>
 <id>42</id>
</issues>

Upvotes: 1

Related Questions