git/list[1] front-page[2] threads[3] people[4] search[5] about
 

GSOC remote-svn: branch detection

From
Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Date
Aug 3, 2012, 09:43 UTC
Message-ID
<12682331.q6WHVv9EKU@flomedio>
Hi!

I'm playing around in vcs-svn/ to start a framework for detecting and processing branches in svndumps. So I wanted to let you know about my ideas.

Two approaches:
1. Import linearly and split later:
One idea is to import from svn linearly, i.e. one revision on top of it's 
predecessor, like now, and detect and split branches afterwards. The svn 
metadata is stored in git notes, so the required information would be 
available.
+ allows recovery, because the linear history is always here.
+ it's easier to peek around in the git history than in the svn dump during 
import to do the branch detection.
- requires creation of new commits in the branch detection stage.
- this results in double commits and awkward history, linear vs. branched.
2. Split during import:
Detect branches as they are created while reading the svn dump and identify to 
which branch a following node belongs.
First step is to restructure svndump.c to be able to buffer one complete 
revision for inspection before starting to write a commit to fast import.
Probably it's possible to feed the blobs to fast import directly and only 
buffer node data and defer commit creation, but not the data.
Currently, at the beginning of a new revision on the svn side, a new commit is 
created on top of a constant ref. When we support branches, we don't know the 
ref, i.e. the branch(es), the revision changes, before reading all the 'Node-
*' lines.
+ feels more 'right'
- requires revision buffering

Generally: Detect branches as they are created by 'Node-copyfrom*' to some commonly used branch directories, like branches/. More complex branch detection can be implemented later, of course. Store detected branches permanently (necessary for incremental fetches), and assign every file modification to one of those branches, if possible. Else assign them to, hm .. If a revision modifies more than one branch, create multiple commits.

Thanks for your comments and ideas! 

-- Florian

Next: Jonathan Nieder
Message 1 of 5 in “GSOC remote-svn: branch detection”
  1. Florian AchleitnerAug 3, 2012
  2. Jonathan NiederAug 3, 2012
  3. Dmitry IvankovAug 4, 2012
  4. Ramkumar RamachandraAug 4, 2012
  5. Florian AchleitnerAug 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.