qqueue storage location

Matt Mackall mpm at selenic.com
Tue Jun 1 14:16:22 CDT 2010


On Tue, 2010-06-01 at 12:13 -0700, Brendan Cully wrote:
> On Tuesday, 01 June 2010 at 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.
> 
> I agree very much with these points, and would also like to see the
> patch queues stored under .hg/mq/. If symlinks are out, can we
> rename the currently-active patch queue from .hg/mq/foo to .hg/patches
> (and maintain a book-keeping file)?

Alternately, we can name them:

patches (default)
patches-foo
...

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list