[darcs-users] Re: A couple of pre-newbie questions
ptp at lysator.liu.se
Sat Mar 5 23:20:29 UTC 2005
On Sat, Mar 05, 2005 at 10:15:53PM +0100, Albert Reiner wrote:
> > When a conflict happens, darcs will insert both versions
> > of conflicting lines in the file, with conflict markers
> > around them. To resolve the conflict, just edit the file
> But that, I suppose, does not happen with binary files, does it?
> Conflict markers are something like vvvvv and ^^^^ lines, I think; is
> there some way of customizing those?
Actually that description of mine was a pretty big
oversimplification -- even almost a lie. Darcs is not so god
at marking anything but the most simple conflicts. Some times
you won't even believe there is a conflict, although darcs
says "We have conflicts in the following files: ..."; you
just notice strange changes reported by whatsnew.
The two darcs commands 'resolve' and 'revert' can be helpful to
get a picture of what has happened in these cases. 'revert'
will remove everything that conflicts from the working tree,
and 'resolve' will insert it again (sometimes just some of it,
with... ehrm... markers -- sometimes).
I think this will be improved with David's new conflict
> [Carrying floppies:]
> - A context is basically a list of applied patches? Or is that an
> inventory? Is there a difference between those two?
It is a list with the names of all undepended patches.
The depended upon patches are implicitly defined by, well,
the dependencies, so they are excluded from the list.
An inventory lists all patches and defines the order in which
they must be applied. If the order is changed, the line
numbers and other stuff in the patch must change as well,
so a patch is only fully defined together with its place in
Patches are global, so if you can just find the right ones,
you can rebuild a repo from a context file. The inventories
of the patches will tell what other patches are needed, and
in what order to apply them. The theory of patches explains
how to operate on the patches to get them together and form
a new repo with a consistent inventory.
(But now we've left user land...)
Anyhow, if the context file is for a subrepo (a release of
some kind) 'darcs get' can use it to rebuild the repo from
the master repo, which contains all the necessary patches.
'darcs send' can also use a context file from a remote repo to
"fake" it when checking what patches to send.
> - Is it correct that that method would create additional records
> (i. e. I would have to record the current state of affairs before
Yes. I have only had to develop my darcs repos on another
computer twice, and both times I was frustrated that I
had to record the unrecorded state in a temp patch, and
pull/unpull/unrecord/I don't know what, to get it over,
finished and back. Most people recommend to use other tools
for file tree syncing in these cases. Maybe that is best
for floppies too.
Tommy Pettersson <ptp at lysator.liu.se>
More information about the darcs-users