[prev in list] [next in list] [prev in thread] [next in thread] 

List:       darcs-users
Subject:    Re: [darcs-users] Re: Onto which other patches does a patch depend?
From:       Jamie Webb <j () jmawebb ! cjb ! net>
Date:       2005-01-06 13:08:38
Message-ID: 20050106130838.GA11490 () digitalice ! co ! uk
[Download RAW message or body]

On Thu, Jan 06, 2005 at 03:23:43AM +0100, Tommy Pettersson wrote:
> On Thu, Jan 06, 2005 at 01:15:36AM +0000, Mark Stosberg wrote:
> > On 2005-01-06, Jamie Webb <j@jmawebb.cjb.net> wrote:
> > > The problem I have with rollback is that you can't rollback a
> > > depended-upon patch, even if the dependency has been rolled back.
> [...]
> > I agree this sounds like a bug
> [...] 
> > ...and that it might be a pain to fix. :)
> 
> There is a workaround: Create a temp repo with 'darcs get
> --to-patch roll_me_back' and rollback the patch there, which
> will obviously succeed.  Then pull the rollback patch back.
> If there were any real dependency problems, the pull will
> cause some conflicts.  Just resolve the conflicts and be happy.

Ick! This triggers a more severe bug. Darcs applies the inverse
patches in the wrong order (B^-1 then C^-1), causing those parts of B
which are modified by C to be mysteriously resurrected.

#!/bin/sh
mkdir r1
cd r1
darcs init
echo a > foo
darcs record -lam A
echo b > foo
darcs record --ignore-times -lam B
echo c > foo
darcs record --ignore-times -lam C
echo -n y | darcs rollback -p C
cd ..
darcs get --to-patch B r1 r2
cd r2
echo -n y | darcs rollback -p B
echo y | darcs revert -a
darcs pull -a ../r1
cat foo
# foo contains 'b' rather than 'a' 

-- Jamie Webb


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic