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

Re: git-svn and branches

From
Steven Walter <stevenrwalter@gmail.com>
Date
Sep 28, 2007, 17:19 UTC
Message-ID
<20070928171959.GA21816@dervierte>
In-Reply-To
<20070927072404.GB1782@hand.yhbt.net>
On Thu, Sep 27, 2007 at 12:24:04AM -0700, Eric Wong wrote:
Show 12 quoted lines
> I believe your case handles where a branch is created directly from a
> trunk copy with no file modifications in the branch, but not when a
> branch is created and files are modified in the trunk (or branch) within
> the same revision.  Is this what's happening?
> 
> Additionally, I think this breaks when an entire trunk or branch is
> moved around because the original directory has moved or gone away:
> 
>   /trunk => /project-a/trunk
> 
> Anyways, as Sam said, newer SVN (1.4.4+) has a working do_switch()
> function and that code path will never be hit at all.

I think you're right that my code would only handle a verbatim copy. I made a few changes and I think I have something that is more generally useful. Using a newer version of subversion isn't practical for me, as this is a work situation where I don't have control of the workstations.

One criticism of the patch: the trees_match function probably needs to be re-written. My SVN::Perl-foo is weak.

Patch to follow
-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
   -Robert Heinlein
Previous: Eric Wong
Message 4 of 4 in “git-svn and branches”
  1. Steven WalterSep 27, 2007
  2. Sam VilainSep 27, 2007
  3. Eric WongSep 27, 2007
  4. Steven WalterSep 28, 2007

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.