[darcs-devel] [darcs-users] [issue938] darcs rebase

Eric Kow eric.kow at gmail.com
Wed Jul 2 15:37:30 UTC 2008


Thanks, Petr.  You could perhaps send a patch to at least spark some
discussion [I would point this out in the patch bundle description]

I think if we were to create something as powerful as this, we should
aim for some generality (to avoid proliferation of commands) and have
some discussion on how it should work.  Maybe some git users could
chime in.

Also, I would be in favor of making this a hidden command, something
you'd  have to read the manual to find out about :-)

> I have added a "coerce" command, akin to pull, that took 2 remote repositories:
> say "base" and "remote". What it did was take the patches in "remote" but not
> in "base" and add them to current repo, regardless of context. It was only safe
> if "base" and current were in exactly the same context (meaning same pristine
> content, which could in theory be enforced to make the command fairly safe,
> just history-altering).

For the interested, below is the beginning of
http://bugs.darcs.net/issue938 where I wrote down possible use
scenarios for darcs rebase type command(s).

In the particular case of coerce, what I typically do is darcs get a
copy of remote,
unpull the patches, send them -o from the original remote, edit the
patch bundle, then apply to base.  Rather inconvenient.  I suspect
this is the case for all the scenarios below; they could all be done
with some combination of darcs send, unrecord and bundle editing.  We
just want to show that it's the kind of thing that is worth
automating.

--------8<------------------------
Things I would use a hypothetical darcs rebase for.  This would clearly be an
unsafe command in the sense of darcs-amend, but I think we can come up with
enough scenarios to demonstrate that such a command would be useful in practice
(and used often enough to not want to do by hand).

Note, that I do not actually know what git rebase does; I've just heard vague
rumours about it.  Ganesh has called it 'amend-record on steroids', I think.

Also, this need to be necessarily be one single command.

 * Something went horribly wrong (due to a bug an older version of darcs, for
example) and I need to revise my patch history, replacing one of the patches in
the middle with something else (e.g. http://bugs.darcs.net/issue857 )

 * I made an unwise decision in the past to add a 40G binary file to my
repository and then changed my mind removing it.  I really do not need this in
the history, so I would like the file to really just go away

 * There is a bunch of patches I made that I would like to consolidate [can
actually be met by darcs unrecord and darcs record]

 * Somebody submitted a tarball of a repository for forensics, and I want to
simplify it.

 * I have a horribly conflicted repository that darcs cannot handle, but I want
to edit away some unwise conflict fighting that I did

Please submit any other unique scenarios you can come up with, as well as
user-interface ideas.
--------8<------------------------


-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9


More information about the darcs-devel mailing list