I’d advise against it for the reasons stated above, but more strenuously stated. Both mercurial and git have their own protocols for moving changesets between repositories. These protocols are optimized/built for:
- efficiency
- consistency (never can you pull from a repo in a half-updated state)
- hooks/triggers — doing things on push/pull including quality (no tabs allowed, etc.) filters
When you just let a directory sync handle the keeping of the .hg (or .git) directories in sync then during that sync you’ve got a remote store that’s in an inconsistent state and doesn’t know it.
Additionally both hg and git have a separation of what’s local-only and what’s remote-okay within their disk state. They know what info to share (example: commited changesets) and what not to (example: current, local working directory parent revision).
In other answers folks are saying “you’ll probably be fine” or “I’ve never had a problem” and that’s likely true, but it’s not guaranteed true, and revision control isn’t a place to play the odds. Use the proper, better, safer, more efficient, more full featured synchronization protocol for your source control system.