[darcs-users] Re: Two-way syncing with tailor

Nathan Gray kolibrie at graystudios.org
Tue Aug 23 17:50:13 UTC 2005


On Tue, Aug 23, 2005 at 03:13:16PM +0200, Lele Gaifax wrote:
> >>>>> "Nathan" == Nathan Gray <kolibrie at graystudios.org> writes:
> 
>     Nathan> I see that on the list of goals for VersionOne is:
> 
>     Nathan>   Make it easier to set up a double way bridge
> 
>     Nathan> I have a bridge between CVS and darcs that I use daily.
>     Nathan> Difficulties that I have are:
> 
>     Nathan> * New files pulled from CVS have their sticky tag set, so
>     Nathan> cannot be updated (workaround is to run `cvs -A update`
>     Nathan> manually on each affected subdirectory immediately after
>     Nathan> pulling from CVS)
> 
> I introduced a new option to disable this behaviour, on by default;
> you can now put something like
> 
> [cvs:myrepos]
> repository = :pserver:....
> tag-entries = False
> 
> Let me know if this alleviates the trouble.

I'll try it out.

>     Nathan> * When multiple patches from darcs are committed to CVS,
>     Nathan> if any files are affected by more than one patch, darcs
>     Nathan> gets unnecessary (and incorrectly named) new patches when
>     Nathan> pulling back from CVS (workaround is to only record one
>     Nathan> patch at a time, and sync after each record)
> 
> Uhm, I'm not sure I understood the problem: I probably should try it
> here, but what's the meaning of "gets unnecessary" and in particular
> "incorrectly named" patches from the darcs front?

Say I have a darcs patch called 'my darcs patch', which updates README.
I record it in darcs, then make a few more edits to README and record
in patch 'my second patch'.

I then use tailor to sync from darcs to CVS.  All good so far.  Both
patches are applied and committed to CVS.

When I use tailor to sync from CVS back to darcs, "duplicate" patches
for 'my darcs patch' and 'my second patch' get created, except they are
not the same as the original darcs patches.  The new 'my darcs patch' is
the inverse of 'my second patch'.

I believe this is because the hybrid repository accepts each patch from
darcs, then when the CVS revisions are fetched, the first revision sets
the hybrid repository to the state it was in after only one patch, darcs
sees changes, and tailor generates a new darcs patch.

Of course there is the other problem of people embedding CVS revision
strings in their files, which also trigger new darcs patches.  I think
I can just remove those tags from the files, rather than trying to
determine an elegant way to build appropriately named patches for those
changes.

>     Nathan> It also appears that the config file changes in syntax.
>     Nathan> Have you looked at YAML (http://www.yaml.org/) as a
>     Nathan> possible syntax?  I just like YAML.
> 
> Uhm, not bad, but beyond tailor needs, it seems. Note that tailor
> config sections related to repositories may be shared by multiple
> projects, so it's not right considering them "nested"... Anyway,
> I'd like to hear more on this if it's an issue for you.

Not really an issue.  I think for me it is more of a style preference.

# ConfigParser syntax
[DEFAULT]
verbose = Yes

[project1]
source = svn:projec1repo
target = darcs:project1repo
refill-changelogs = Yes
state-file = project1.state
before-commit = (maybe_skip, refill, p1_remap_authors)
after-commit = checkpoint

[svn:project1repo]
repository = svn://some.server/svn
module = project1
use-propset = Yes

[darcs:project1repo]
repository = ~/darcs/project1

# YAML syntax
verbose: Yes
---
project: project1
source: svn:project1repo
target: darcs:project1repo
refill-changelogs: y
state-file: project1.state
before-commit: [maybe_skip, refill, p1_remap_authors]
after-commit: [checkpoint]
---
alias: svn:project1repo
repository: svn://some.server/svn
module: project1
use-propset: y
---
alias: darcs:project1repo
repository: ~/darcs/project1

-kolibrie




More information about the darcs-users mailing list