share: add --relative flag to store a relative path to the source
Storing a relative path the source repository is useful when exporting repositories over the network or when they're located on external drives where the mountpoint isn't always fixed. Currently, Mercurial interprets paths in `.hg/shared` relative to $PWD. I suspect this is very much unintentional, and you have to manually edit `.hg/shared` in order to trigger this behaviour. However, on the off chance that someone might rely on it, I added a new capability called 'relshared'. In addition, this makes earlier versions of Mercurial fail with a graceful error. I should note that I haven't tested this patch on Windows.
Showing
- hgext/share.py 7 additions, 3 deletionshgext/share.py
- mercurial/help/internals/requirements.txt 11 additions, 0 deletionsmercurial/help/internals/requirements.txt
- mercurial/hg.py 12 additions, 2 deletionsmercurial/hg.py
- mercurial/localrepo.py 6 additions, 3 deletionsmercurial/localrepo.py
- tests/test-share.t 35 additions, 0 deletionstests/test-share.t
Loading
Please register or sign in to comment