CLI 参考 > 工作流和文档命令 > im diffsegments
  
im diffsegments
compares the differences between document selections
Synopsis
im diffsegments [(-?|--usage)][--fields=field[:width[:rich|plain]],field[:width[:rich|plain]],...)] [--[no]hideItemsWithoutDifferences][--[no]compareUnrelatedDocuments][--[no]hideFieldsWithoutDifferences] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [(-g|--gui)] [--hostname=server] [--password=password] [--[no]persist] [--port=number] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|gui.actions|default]] [--user=name] DocumentID DocumentID
Description
im diffsegments compares the differences between one document at two different points in time, two versions of the same document (and optionally at different points in time), or two documents that share a common branch ancestor ID (and optionally at different points in time), such as a versioned document compared with a document that was branched.
From Integrity Lifecycle Manager 11.2, you can compare two unrelated documents using the --compareUnrelatedDocuments option. Unrelated documents are:
Those that are not the same document or a branch or a version of the same document.
Those that are not the As Of configurations of the same document or As Of configurations of a branch or version of the same document.
For example, this feature lets you compare a requirements document with an input document or specification document or test suite or any unrelated requirements document.
* 
The two unrelated documents being compared must have the same primary text field. For more information on primary text fields, refer to the Solution guide.
Example for viewing differences between two documents:
im diffsegments 851@label:Draft1 851@label:Draft2
returns all differences between a single document at two points in time based on labels.
The following are key considerations when using this command:
This command is only supported with the -g or --gui option. When you use the -g or --gui option, Windchill RV&S displays the View Document Differences window where you can specify a source and target document to compare. The Document Difference view displays all differences between the document selections side-by-side.
This command accepts two document IDs only. If the user has not specified any document IDs or has specified a single document ID, then the document selection dialog opens.
Example for comparing two unrelated documents:
im diffsegments --compareUnrelatedDocuments 851@label:Draft1 962@label:Draft2
returns all differences between two unrelated documents 851 and 962 at labels Draft1 and Draft2 in the respective documents.
Options
This command takes the universal options available to all im commands, as well as some general options. See the options reference page for descriptions.
DocumentID DocumentID
identifies the two documents selections you want to compare. Each document ID must correspond to a segment (e.g., a root node of a document). Use spaces between the two IDs, for example 3423. Can be one of:
an identifier (i.e., 851) which corresponds to the current document as of now.
a historical document ID which corresponds to a baseline document with a given revision, label, branch time and date, edit date, or time stamp. For example: 851@label:labelname.
an identifier for a branched document.
a versioned document when document versioning is enabled. To type the ID of a versioned document, use the format Live Item ID-major.minor. For example 184-1.2.
* 
For unrelated documents only Label is supported as part of historical document. Time and date, edit date, and time stamp are not supported. Branch is supported only when selecting documents through GUI, and not supported through CLI.
[--fields=field[:width[:rich|plain]],field[:width[:rich|plain]],...)]
specifies the fields and their respective widths to be compared and displayed in the Document Difference view. Your administrator defines the available fields. Fields can include Contains,Summary, and others. Use commas to specify more than one field.
* 
If you are comparing unrelated documents, then you cannot use the --fields option.
[--[no]compareUnrelatedDocuments]
Use this option to compare two unrelated documents.
[--[no]hideItemsWithoutDifferences]
filters the Document Difference view to hide items that have no field or document structure differences.
[--[no]hideFieldsWithoutDifferences]
filters the Document Difference view to hide additional comparison fields that contain no differences.
* 
If you are comparing unrelated documents, then you cannot use the [--[no]hideFieldsWithoutDifferences] option.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using im setprefs or im viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands: si diff, si difffiles, im viewsegment
Miscellaneous: ACL, diagnostics, options, preferences