I have to move code base from Clear Case to Git swarm. Inside the code there are lot of absolute path references based on /vobs/.... How to handle this scenario in this task with out code change ? Is this possible ?
Asked
Active
Viewed 116 times
1 Answers
0
But there are lot of absolute path references based on
/vobs/
How to handle this scenario in this task without code change?
Moving a ClearCase repo to a Git repo can be done without referencing any view path (like a dynamic view set with cleartool setview, and accessed through /vobs).
See this example.
But "inside the code",that does not seem to be a ClearCase or GitSwarm issue, more an issue with the content (scripts referencing /vobs/...
in them)
You might need to artificially create a /vobs/
folder on the host where you clone/checkout a Git repo, in order to find back a path compatible with your scripts. If needed, /vobs/ can be a symlink to your checked out repo.
That would respect the "without code change" part of your question.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
Thank you for your consideration. Suppose if I create a /vobs folder . Still the script will refer absolute path starting with /vobs as root (I use Linux machine to build) . But for the checked out folder vobs folder is just a parent folder path wont start with /vobs . right? Any solutions for that – Masthan Aug 07 '18 at 04:07
-
@Refinath Yes: symlink (https://stackoverflow.com/a/1951752/6309): /vobs/ would symlink to your repo root folder. – VonC Aug 07 '18 at 04:24
-
does symbolic link work while building .Because code refer clearcase path – Masthan Aug 07 '18 at 04:52
-
@Refinath if you make a symlink which mimics the ClearCase path (and reference your checked out repo), then yes, it does work. – VonC Aug 07 '18 at 04:58
-
And what is the approach creating symbolic link for the directory ? or for the entire file.? if the project contains more than 1000 files we have to create that much symlinks right ? – Masthan Aug 07 '18 at 04:58
-
@Refinath No. One symlink only (https://en.wikipedia.org/wiki/Symbolic_link#POSIX_and_Unix-like_operating_systems) to the root folder of your repo. – VonC Aug 07 '18 at 04:59
-
One more doubt . I f I use symlink , I f have check out two instances from git . Then there will occur a conflict. right? Because both project folder have symlink /vobs. So if I use at a time one person can can one instance . Am I correct ? Is there any way to handle multiple instances ? – Masthan Aug 07 '18 at 06:12
-
@Refinath yes: since you won't be using both *at the same time*, each repo can have its own build script which will handle/change the symlink to point to its own root folder. But if you were to use both at the same time, then you would need to checkout those repo in docker container, in order to benefit from filesystem isolation. – VonC Aug 07 '18 at 06:15
-
@Haji Is there anything else missing to this answer? – VonC Aug 10 '18 at 04:26
-
Not checked yet . busy with other works. Will check soon – Masthan Aug 10 '18 at 09:51