Find all files modified in a specific ClearCase br

2019-05-15 16:45发布

问题:

Is there a way I can create a view that will give me a snapshot of all the files modified in a specific ClearCase branch?

For example, say I have two branches:

product_1.0_dev
product_migration_1.0_dev

The second branch is conceived as a testing ground for upgrading our core framework dependencies. I know that if I modify a file in product_migration_1.0_dev, then I will have a \1 version under this branch, so there has to be a way to write a load rule to get this info easily into a snapshot.

Any ideas?

回答1:

That would be a selection rule (not a load rule)

 element * .../product_migration_1.0_dev/LATEST
 element * .../product_1.0_dev/LATEST
 element * /main/LATEST

Note the '...' notation (see version selector), an ellipsis wildcard which allows to select a branch at any branch level.

Note that would list all files, including the ones you want.

If you want to see only the files for a particular branch, you still need to select their parent directories: and those might not have a version in the product_migration_1.0_dev branch.

So the following config spec (that I invite you to test in a dynamic view first: it is quicker, then you will report that config spec in a snapshot view, with its own load rules) would be more precise:

 element * .../product_migration_1.0_dev/LATEST
 element -directory * .../product_1.0_dev/LATEST
 element -directory * /main/LATEST

So you would select files and directories having a LATEST in product_migration_1.0_dev branch.
Otherwise, you select directories only in product_1.0_dev branch or in main branch.

That way, you are sure to select the parent directory of an element which might have a version in product_migration_1.0_dev branch.
If you don't do that, your view won't ever be able to select the files, because their parent directories are not accessible (none of their versions is selected from which a product_migration_1.0_dev branch starts).



标签: clearcase