Does DVC actually require Git, or would Mercurial work just as well?

#1

My question is as the title states really, does DVC actually require Git, or would Mercurial work just as well? Does DVC actually call Git to do anything, or does it just store information in normal files which the user commits.

0 Likes

DVC and version control systems other than Git
#2

Hi @crobar !

DVC uses Git for things such as:

  1. adding files tracked by dvc to .gitignore for user comfort;
  2. once calling git add after dvc init for user comfort;
  3. 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! :slightly_smiling_face:

Thanks,
Ruslan

0 Likes

#3

Thanks, that’s all very useful info. I agree it looks like it would be very easy to add hg support the way you have designed it. I’m just getting started with this, so need to play around and get a feel for how it works. I can use Git for now. Perhaps a patch some day, but I think you’ll probably beat me to it.

1 Like

#4

No worries :slight_smile: Thank you for trying out dvc!

-Ruslan

0 Likes