[issue2006] share: difficult to modify sharedpath

Greg Ward bugs at mercurial.selenic.com
Fri Jan 29 19:23:24 UTC 2010


New submission from Greg Ward <greg-hg at gerg.ca>:

There are a couple of cases in which a user might wish to edit .hg/sharedpath:

1) the main repository has moved and we don't want to re-share (e.g. working
directory has uncommitted changes)

2) absolute path does not work (e.g. you're accessing the repo via NFS under
/net/host/...) and we just want to use a relative path

Currently, the only option is to manually edit .hg/sharedpath.  That would
not be so bad, except that hg cannot tolerate a trailing newline in that
file.  Modern editors (I just tried jed and XEmacs) actually make it quite
difficult to create a file with no trailing newline.  Once you figure out
how to get rid of the trailing newline, editing .hg/sharedpath works.  But
it's a pain.

So request #1: rstrip() the string read from .hg/sharedpath.

Alternately, how about a command to rewrite .hg/sharedpath, meaning the user
does not have to muck about in .hg?

----------
messages: 11541
nosy: gward
priority: feature
status: unread
title: share: difficult to modify sharedpath

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2006>
____________________________________________________


More information about the Mercurial-devel mailing list