0

I'm looking to use a repository from "out of tree", that is, the .hg directory is not located in a parent directory of the working directory. As an example, consider that my repository root (.hg) is at ~/src/dotfiles. I wish to diff ~, as though the working copy was checked out at ~, but the .hg folder is actually at ~/src/dotfiles/.hg. The -R option doesn't allow this,

$ hg -R ~/src/dotfiles diff ~ abort: /Users/anacrolix not under root '/Users/anacrolix/src/dotfiles' 

I'd prefer not to have .hg in ~, or use a symlink.

2 Answers 2

1

The .hg directory is always a sub-folder of the repository root and there is no way to change that.

Depending on the usage scenario behind your question you might want to look at some of the available repository hooks. You could use for instance the changegroup and / or commit hooks in order to run a script which updates another repository when new changes are added to your repository, e.g. for deployment purposes

Sign up to request clarification or add additional context in comments.

2 Comments

Could you quote or reference a definitive source for your first paragraph?
Simply look at mercurial sources, e.g. localrepo.py, from the definition of class localrepository : selenic.com/repo/hg/file/efa094701a05/mercurial/…
0

See Mercurial Documentation for a reference of the first paragraph!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.