fcpc diff object
fcpc diff network/aaa network/bbb
fcpc diff epoch1:object epoch2:object
usage: fcpc diff [-h] [--diff.format {json,table}] [objects ...]
positional arguments:
objects Object type to show. Can be more objects but it needs to be specific urls like "init:Asset/123
new:Asset/123". (default: None)
optional arguments:
-h, --help show this help message and exit
--diff.format {json,table}
[Defined:fcplib.cmd.diff] (default: json)
Choices:
json
table
We use these commands to find a difference between two objects with a same name in two different epochs. Let's say we are looking for a difference between the network n1 in an epoch called new2 and an epoch called new4. We need to make sure that you can edit those epochs (so they are not committed, otherwise you have to reopen them (fcpc epoch reopen new2))
Add n1 to new2:
fcpc --epoch=new2 add network name=n1 description=random3
Add n1 to new4:
fcpc --epoch=new4 add network name=n1 description=random1
To make sure whether these epochs really include a n1 network, you can run a command fcpc --epoch new2 search +
Once you are sure that both of these epochs include a n1 network, you can run the diff command:
fcpc --prev_epoch=new2 --epoch=new4 diff network/n1
This command only shows us a difference between an object (a network in this case) with the same name (n1). If you want to see a difference of two
object with a different name in 2 different epochs, you need to run this command:
fcpc diff epoch/new2:network/n1 epoch/new4:network/n10