[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Thoughts and open questions on patch/dump unification

From: Eric S. Raymond <esr_at_snark.thyrsus.com>
Date: 2004-09-16 17:15:48 CEST

These questions are independent of the action-diff format.

First premise: a dumpfile is an action diff from an empty tree.
In the more general case, an action diff is intended to be applied
to a nonempty tree. An action diff is a list of changesets
("revisions" in current dumpfile terminology).

Attempting to apply an action diff to a repository produces an "action
list" (a list of changesets to be applied to the repository) and an
"exception list" (a list of what changesets cannot be applied).

It is then a policy question whether the action list becomes a commit. If
your policy is very strict, you may permit this only when the
exception list is nonempty. Or, you might want to have a rolling-sync
policy -- apply actions until you hit the first in the exception list,
then stop, But some exceptions are probably harmless: deletion of an
already nonexistent file is the most obvious example.

I don't think the right policy can be decided without implementing
mechanism first and experimenting. The only thing I'm firly sure of
is that partial applications of changesets from the action diff would
be a bad idea. Whoever did the commit that produced that changeset
intended it to be a unit; application diffs should preserve that

Open question: when an action list is applied, should it be merged in
to the repository as a single commit, or as one commit for each
revision in the list? There are arguments both ways. The
commit-per-revision approach preserves the entire history of the
modifications, but possibly at the cost of a lot of clutter. If we go
with the single-commit approach, on the other hand, we'll need to
merge the log messages for each file.

Open question: should applying an action diff always produce a branch?
The biggest advantage of this choice is that repo sync would then
unify with ordinary merge. This would also pretty much settle the
previous question -- the revisions in the action diff would map
straight into commits on the branch it generates.

		Eric S. Raymond
The possession of arms by the people is the ultimate warrant
that government governs only with the consent of the governed.
        -- Jeff Snyder
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 16 17:16:10 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.