mercurial at 11238: 10 new changesets (3 stable)
Cedric Duval
cedricduval at free.fr
Wed Jun 2 14:44:08 CDT 2010
Henrik Stuart wrote:
> On 01-06-2010 20:55, Cedric Duval wrote:
> >> http://selenic.com/repo/hg//rev/1e701ffd9df4
> >> changeset: 11229:1e701ffd9df4
> >> user: Henrik Stuart <hg at hstuart.dk>
> >> date: Sat May 29 20:32:39 2010 +0200
> >> summary: mq: support multiple patch queues using qqueue
> > This is a very nice feature to have, thanks!
> > I am however a bit uncomfortable with the way those new queues are
> > stored, making it possible to have any arbitrary name inside the
> > .hg/ directory.
> > Just a few tested examples below:
> > + hg init r
> > + cd r
> > + hg qqueue --create store
> > + hg qnew journal
> > abandon : abandoned transaction found - run hg recover !
> > + hg init r
> > + cd r
> > + hg qqueue --create branch
> > + hg qnew p
> > + hg branch b
> > abandon : Is a directory : /tmp/qq/r/.hg/branch
> > + hg init r
> > + cd r
> > + hg qqueue --create dirstate
> > + hg qnew p
> > abandon : Is a directory
> > Those examples are obviously contrived (especially the last one),
> > and one could find them disingenuous name choices from the user,
> > but when anything is allowed (and given that the .hg layout may
> > evolve, adding new files or directories - which are not always
> > created right away, but sometimes after some specific actions),
> > I fear that there is a real concern that name clashes _will_ occur,
> > probably in rare and particular cases, but this might be a cause
> > for some future trouble.
> > The ideal would be to give those queues a dedicated namespace,
> > for instance by putting them in .hg/mq/, where no collision could
> > occur, and in order to retain compatibility .hg/patches/ would
> > simply become a symbolic link pointing there. But symbolic links
> > are not really a possibility on most Windows releases as far as I
> > know, so something else probably has to be found...
> > So I'm afraid I'm not coming up with a good solution or patch, just
> > some thoughts, before it becomes carved in stone with next release.
> Quite devious naming you thought up there. :o)
> I have pushed a revised patch that limits the allowed names somewhat and
> guards against these cases.
> Thanks for the deviousness.
Hehe.. Seems fine now, even though my creativity will suffer a bit
from your change. =)
And doing away with hidden queue files seems a good move as well.
Thanks for taking care of this.
--
Cédric
More information about the Mercurial-devel
mailing list