[darcs-users] Re: Two-way syncing with tailor
Lele Gaifax
lele at nautilus.homeip.net
Thu Aug 25 08:17:02 UTC 2005
>>>>> "Nathan" == Nathan Gray <kolibrie at graystudios.org> writes:
Nathan> Say I have a darcs patch called 'my darcs patch', which
Nathan> updates README. I record it in darcs, then make a few
Nathan> more edits to README and record in patch 'my second
Nathan> patch'.
Nathan> I then use tailor to sync from darcs to CVS. All good so
Nathan> far. Both patches are applied and committed to CVS.
Nathan> When I use tailor to sync from CVS back to darcs,
Nathan> "duplicate" patches for 'my darcs patch' and 'my second
Nathan> patch' get created, except they are not the same as the
Nathan> original darcs patches. The new 'my darcs patch' is the
Nathan> inverse of 'my second patch'.
Nathan> I believe this is because the hybrid repository accepts
Nathan> each patch from darcs, then when the CVS revisions are
Nathan> fetched, the first revision sets the hybrid repository to
Nathan> the state it was in after only one patch, darcs sees
Nathan> changes, and tailor generates a new darcs patch.
I think tailor should now be able to handle this situation, evenif I
did not tried it yet: two things put it in better position,
a) the ability to keep the two working dirs separated
b) the ability to run arbitrary transform before committing on the
target
The idea is: one of that tranforms may be able to recognize the "my
darcs patch" coming back from CVS (in some fancy way, looking for a
special word in the log?) and skipping the re-commit on darcs target.
But as said, there just the infrastructure, still to be tried.
Nathan> Of course there is the other problem of people embedding
Nathan> CVS revision strings in their files, which also trigger
Nathan> new darcs patches. I think I can just remove those tags
Nathan> from the files, rather than trying to determine an elegant
Nathan> way to build appropriately named patches for those
Nathan> changes.
Here comes the utility of a) above: tailor may strip them off, before
committing on the target, acting only in the target side and thus
without interfering with upstream sources.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: lele at seldati.it | -- Fortunato Depero, 1929.
More information about the darcs-users
mailing list