Hard links in snapshot views
Be careful if you use hard links in snapshot views.
- On Linux® and the UNIX® system, instead of creating hard links in a snapshot view each time a load rule selects a hard link, the element is loaded into the view as a standard file.
- On the Windows® system, each time a load rule selects a hard link, the element is loaded into the view as a standard file instead of being created as a hard link.
Caution: Losing data because of VOB hard links
If you load multiple instances of a hard-linked element into a snapshot view, you must be careful to check out, modify, and check in only one instance of the file. When you check in a hard-linked file (or a file below a symbolic-linked directory), all other instances in your view are updated, which could result in loss of data if you modified multiple copies of the same file. (When instances of files are updated because of a checkin, any hijacked file is renamed to filename.keep before it is updated.)
For example, the following sequence of events will lead to lost data:
- You check out the hard-linked file util.h in the src directory.
- The read-only attribute (or permission) is removed from util.h in the src directory only (which is the location from which you issued the checkout command).
- You modify util.h in the src directory but do not check it in.
- Later, you lose track of which file you checked out. You then remove the read-only attribute and modify util.h in the tmp directory.
- You check in util.h in the tmp directory. Even though you checked out and modified util.h in the src directory, you are not prevented from checking in util.h in the temp directory; with a VOB hard link, tmp/util.h is just another name for src/util.h on Linux® and the UNIX® system, and tmp\util.h is just another name for src\util.h on Windows® systems.
- Any changes you made to util.h in the src directory
(src/util.h on Linux® and the UNIX® system or src\util.h on Windows® systems) are lost upon
checkin because all copies of duplicated files are updated when you check in an element. Tip: Any copy of util.h is not considered to be hijacked (even if you change attributes), because you checked out the element in the VOB.