Open ojarjur opened 2 years ago
- Add all of those reachable objects to a zip file stored under the ~/.rvcs/archive/ directory
only files need to be zipped and not directories , am I right ?
@jootd only files need to be zipped and not directories , am I right ?
I'm not sure what you mean; all objects that are transitively reachable need to be zipped. Those objects might represent individual files, or they might represent a directory.
The folder structure of the archive does not necessarily need to be maintained, but the objects within the archive do (regardless of whether that object represents a regular file or a directory)
Expected Behavior
The user's
~/.rvcs/archive
directory only maintains the history that the user still cares about, and does not require an excessive amount of additional storage versus the user's actual file contents.Actual Behavior
The user's
~/.rvcs/archive
directory grows without bounds and contains full copies of every version of every file tracked.Steps to Reproduce the Problem
To reproduce the issue of the directory growing without bound:
To reproduce the issue of a full copy of every version of every file being retained:
~/.rvcs/archive/objects/
for the contents of the two different versions of the file which differ by only one character.One way that we could fix both issues would be to add something like a
rvcs cleanup
command that would do the following:~/.rvcs/archive/paths/
, and find all of the objects reachable from those paths~/.rvcs/archive/
directory~/.rvcs/archive/objects/
directory~/.rvcs/archive/objects/
that were not reachable from any of the paths~/.rvcs/archive/paths/
and~/.rvcs/archive/cache
that do not correspond to any currently mapped pathsFor the last two steps, we would need to take extra care to make sure that we do not have any race conditions with simultaneous runs of the
rvcs snapshot
orrvcs merge
commands.Additionally, we would need to extend the tool to be able to read objects from the zip file under the
~/.rvcs/archive/
directory if they are not in the~/.rvcs/archive/objects/
directory.