public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Fixing cvs2svn branchpoints
Date: Thu, 07 Nov 2019 16:52:00 -0000	[thread overview]
Message-ID: <20191107165228.GB72444@thyrsus.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1911041724230.12670@digraph.polyomino.org.uk>

Joseph Myers <joseph@codesourcery.com>:
> Which mid-branch deletes?  For the ones by accident (e.g. the deletions of 
> trunk), where the branch was recreated by copying from the pre-deletion 
> version of the same branch, nuking the deletes is clearly right.  For the 
> ones where a branch was deleted then recreated as a copy not from the 
> deleted version - essentially, rebasing done in SVN - maybe we need 
> community discussion of the right approach.  (There are two plausible 
> approaches there - either just discard all the deleted versions that 
> aren't part of the SVN history of the most recent creation of the branch, 
> which makes the list of commits in the branch's history in git look 
> similar to what it looks like in SVN, or treat deletion + recreation in 
> that case as some kind of merge.)

To get content right, reposurgeon has to run through all nodes looking for
branches with more than one creation.  For each such clique, it has to change
all instances but the last so that the branch has a unique nonce name,
then run forward and patch all copy references to the each branch to use
the nonce name.

Only the last branch in each clique will be visible (and not renamed)
in the git conversion.  But the earlier branches can't simply be
nuked, as they might be (and typically are) referenced by branch
copies done before the final branch in the clique was created.

This might sound like it will get the special case of a trunk
delete/recreate wrong.  But when git imports a stream it does its own 
branch recoloring based on tip resets and parent-child-relationships; 
we can expect trunk to be (effectively) re-colored back to the root commit.

(This whole mess around branch re-creation is something other
conversion tools don't even try to get right.)

The other case - where you delete a target branch and copy a different
source branch over it - is simpler.  Because branch names in the
git conversion are controlled by the SVN repository pathname (root becomes
master, branches/foo becomes branch foo, etc), this looks exactly like
an ordinary modification of the target branch.

Presently, the fact of the copy is not recorded in the DAG. I could express 
it as a git merge link; that wouldn't be difficult.

> > Also please open reposurgeon issues about the svnmerge properties
> 
> As I understand it, support for that has now been implemented.

It has, yes.

> > and the missing documentation.
> 
> https://gitlab.com/esr/reposurgeon/issues/151 filed - it's a lot more than 
> just reparent for which documentation appears to have disappeared.

A large chunk of the section on surgical comands vanished, probably
due to a finger error wgile I was editing the translation.  I have
restored it.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


      reply	other threads:[~2019-11-07 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 16:26 Joseph Myers
2019-11-01  0:44 ` Joseph Myers
2019-11-01  4:45   ` Eric S. Raymond
2019-11-01 16:14     ` Joseph Myers
2019-11-02  0:45       ` Joseph Myers
2019-11-02 16:30         ` Eric S. Raymond
2019-11-04 17:31           ` Joseph Myers
2019-11-07 16:52             ` Eric S. Raymond [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191107165228.GB72444@thyrsus.com \
    --to=esr@thyrsus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).