I’ve stumbled upon an annoying problem while use Gnu Arch. During the development process, one of the directories in the source tree was given bad permissions (r-xr-x-rx
). With the next patch, this directory was removed altogether. That introduced a problem for tla get
as it was dying with permission denied error. That happens because when tla get
is executed, it gets the base-0 tree version and then applies patch-1, patch-2, … patch-N in order. Obviously, when it gets to the patch which tries to remove the directory, it fails with “permission denied” error.
The fix for this problem turned out to be very simple. tla get
can be executed with user root. It won’t fail as root has enough permissions to remove the directory. But what root can also do is tla cacherev project--branch--version--patch-X
. This will force arch to pack the whole tree at patch-X into the archive and use it as a unit. So, next time when someone will tla get
the tree version greater or equal to patch-X, he will get it straight ahead, without all the pacthing (except for the those paches that follow patch-X).
After tla cacherev
all users can execute tla get
without any problems.
This technique can also be used to save some time on the tla get
operation in those cases where lots of patching needs to be done.