Re: Mercurial and subdirectories

<Soapbox> You are exploring the unexpected behavior of a command while running as root? </soapbox>

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael FaradayYou assume people are rational and influenced by evidence. You must not work with the public much. -- Trilby----How to Ask Questions the Smart Way

Re: Mercurial and subdirectories

dammannj wrote:

What I did not expect is that, even though the "parent"repository contains the "child", the "child" does not have to be ".hgignore"d...Is anyone actually using this?

I don't think that you should use the parent/child analogy, as it just confusesthe issue; while it may hold for the directory structure, once you haveinitialized the new repository then—for all intents and purposes—they arecompletely separate.

This comes in particularly handy when you 'hg qinit' inside an existingrepository…

Re: Mercurial and subdirectories

@ewaller: just typed those commands from memory and put a # in front of them to distinguish commands from output. Did not think about # as root designator in PS1...

@jasonwryanHere is the difference to hg qinit (or hg init --mq): this new repository "lives" inside the .hg directory, which is "ignored" by hg as it holds all revision information.

To rephrase my question: Is it expected that a repository in a subdirectory of a repository will be "ignored"? Or as you put it: Is it by design that they are - for all intents and purposes - separate repositories?I ask as I don't remember comming across this info when reading the mercurial docs and tutorials.

Re: Mercurial and subdirectories

Exactly my thoughts! Just wondered whether this was made explicit anywhere.

As I understand it, when you are in some directory, and type 'hg <something>'; hg will loke at the parent directories till it finds a .hg directory which holds repo info.In contrast to for example subversion, where each directory holds it's own part of the repo as far as I understood.

Now as I see it, tracking changes stops when a subdirectory is hit which contains a '.hg' directory.