[patch] mq: .hg/patches/status -> .hg/mqstatus

Hermann Lauer Hermann.Lauer at iwr.uni-heidelberg.de
Wed Aug 25 03:23:20 CDT 2010


On Tue, Aug 24, 2010 at 10:03:05PM +0200, Mads Kiilerich wrote:
>  Hermann Lauer wrote, On 08/24/2010 04:39 PM:
> >On Tue, Aug 24, 2010 at 02:29:24PM +0200, Mads Kiilerich wrote:
> >>But couldn't you just create the status file as a symlink?
> >Tried before patching mercurial 1.5x and that did not work
> >(because of the auditing stuff, if I remember correctly).
> >
> >Other comments ?
> 
> [mk at D610 hg]$ ln -sf /tmp/mqstatus .hg/patches/status
> [mk at D610 hg]$ ll /tmp/mqstatus
> ls: cannot access /tmp/mqstatus: No such file or directory
> [mk at D610 hg]$ hg qpush
> applying config-edit
> now at: config-edit
> [mk at D610 hg]$ ll /tmp/mqstatus
> -rw-rw-r--. 1 mk mk 53 Aug 24 21:54 /tmp/mqstatus

Sorry, remembered that wrong. Real reason is that linking of
the status file still is one file for all linked in patches:

~/mer> ln -s /tmp/patches .hg
~/mer> ln -s ../mqstatus .hg/patches/status
~/mer> l .hg/patches
lrwxrwxrwx 1 hlauer IWR 12 2010-08-25 10:02 .hg/patches -> /tmp/patches/
~/mer> hg qpush
applying mqstatus.patch
now at: mqstatus.patch
~/mer> l /tmp/mqstatus 
-rw-r--r-- 1 hlauer IWR 171 2010-08-25 10:09 /tmp/mqstatus
~/mer> l .hg/mqstatus
ls: cannot access .hg/mqstatus: No such file or directory

So the hashes of the outer repo is now in /tmp/mqstatus and not inside
.hg which would be the right scope for this information. So now the sharing
of the patches directory is hosed up:

~/mer> cd ..
~> cp -a mer mer1
~> cd mer1
~/mer1> hg qpop
popping mqstatus.patch
now at: fix2.5.patch
~/mer1> cd ../mer
~/mer> hg qap
staticversion.patch
fix2.5.patch
~/mer> hg qpo
abort: popping would remove a revision not managed by this patch queue
~/mer> hg qpu
abort: working directory revision is not qtip

With the poposed patch applied mq in the two outer repos is independend 
and works as expected.

More comments ?
Thanks,
  Hermann

-- 
Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres 
Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg
IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224
Email: Hermann.Lauer at iwr.uni-heidelberg.de


More information about the Mercurial-devel mailing list