tags:

views:

215

answers:

2

Hey, I'm using Mercurial. I just found out that there is a .hg folder in my home directory. I presume it is keeping track of all mercurial repositories I have lying around in my home directory. Is this true?

Also , I need to move the .hg folder to another directory. Can anyone guide me as to how to do this?

Thanks

+1  A: 
  1. no
  2. cp src dst, or better hg clone

In contrast to e.g. svn, mercurial keeps all repository related information under one directory, so you just need to move this directory to its destination.

Ps. It's a little unusual to have a repository (.hg) under home, though. More typically, you'll find a .hgrc under home, which contains some mercurial configuration.

More on mercurial usage and internals: http://hgbook.red-bean.com

The MYYN
-1: The answer to his first question is "no": .hg tracks a single repo, it doesn't "keep track of all the Mercurial repos I have lying around in my home directory". And using cp to move a .hg directory is a bad idea, you should use hg clone instead.
Carl Meyer
+4  A: 

Having a .hg/ in your home directory indicates that your entire home directory is under version control, which probably is not what you want. Mercurial does not "keep track" of multiple repositories.

To move a repository somewhere else, use "hg clone".

Carl Meyer