I am considering DVC as a tool that could help my team better organize our work. The problem is that we use Mercurial for versioning our code. I have read that DVC somehow depends on Git, but I’m not sure in what way. Is Git the only versionioning software that DVC can work with? The only part that I’ve spotted in the docs that really relies on Git is the dvc init command that creates .dvc/.gitignore. Would adding contents of this file to hgignore (equivalent of gitignore in Mercurial) solve the problem? Are there other caveats that would prevent me from using Mercurial with DVC?
Thank you for considering dvc! I hope you don’t mind me citing a question that has been asked before:
DVC uses Git for things such as:
adding files tracked by dvc to .gitignore for user comfort;
once calling git add after dvc init for user comfort;
iterating git branches to retrieve information about used dvc files and metrics(e.g. dvc push --all->branches and dvc metrics show --all-branches );
That is pretty much it. User does all the other git add -ing and git commit -ing. Dvc stores information about your data in plain yaml files that are committed by user to git.
DVC doesn’t generally require Git, it can even work without any SCM system(use dvc init --no-scm for that) if you don’t need those there features listed above. We have thought about supporting other SCMs and thus left a possibility to easily extend the list of supported SCMs by simply adding a proper driver to https://github.com/iterative/dvc/blob/master/dvc/scm.py (see Git class as an example). So it should be pretty easy to support Hg. I’ve added https://github.com/iterative/dvc/issues/945 to track the progress on it, we will be sure to take a look at it in the nearest future. That being said, if you wish to contribute a patch, please feel free to do so, we will be happy to merge it!
So yes, you could indeed just add corresponding entries to hgignore yourself after dvc init --no-scm and then be adding every data file cached by dvc to appropriate hgignrore, but it would be a much better and easier solution to simply contribute a simple patch for dvc to support hg.