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

Re: [PATCH] archimport improvements

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 12, 2005, 20:21 UTC
Message-ID
<20051112202150.GA2037@Muzzle>
In-Reply-To
<46a038f90511120354n4584aedfhb1f2928ac41478ab@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> wrote:
Show 28 quoted lines
> Eric,
> 
> 
> On 11/12/05, Eric Wong <normalperson@yhbt.net> wrote:
> > I'm another Arch-user trying out git.  Unfortunately, I encountered
> > several problems with git-archimport that I needed fixed before my
> > development trees could be imported into git.
> 
> Welcome and good stuff! I'll give your patches a try when I sober up.
> In the meantime, some notes after having read the patches a bit...
> 
> > Bug Fixes:
> >
> > * Support for '--branch'-less Arch version names.
> >   Encoding '/' to '--' (as was previously done) is not 100% reversable
> >   because the "--branch" portion of an fully-qualified Arch version name
> >   is optional (though not many people or Arch-related tools know this).
> >
> > * I'm encoding the '/' in the fully-qualified name as ',' to not confuse
> >   other porcelains, but leaving '/' in branch names may be alright
> >   provided porcelains can support them.
> >
> > * Identify git branches as an Arch "archive,category<--branch>--version"
> >   Anything less than that is ambiguous as far as history and patch
> >   relationships go.
> 
> These bug/sanity fixes are _good_. As you mention, I wasn't aware that
> patchnames could show up not having a --branch part. Tricky...

Thanks. I got lazy one day and started ignoring --branch on some of my personal projects to save my fingers :)

Show 15 quoted lines
> > * Renamed directories containing renamed/moved files inside didn't get
> >   tracked properly.  The original code was inadequate for this, and
> >   making it support all rename cases that Arch supports is too much
> >   work.  Instead, I maintain full-blown Arch trees in the temp dir and
> >   replay patches + rsync based on that.  Performance is slightly slower
> >   than before, but accuracy is more important to me.
> >
> > * Permission (execute bit only because of git) tracking as a side effect
> >   of the above.
> 
> Hmmm. I understand what you are doing, but I'm not sure we'd want to
> replace the current code with this strategy.  Importing large trees
> with hundreds (thousands) of commits is so slow it is just a no go.
> Renames are described quite well in the 'commit log', and the current
> code does handle file renames...

Untouched files inside renamed directories aren't explicitly tracked. Renamed directories are especially a pain when a renamed one contains sub-directories that are also renamed.

> > * Tracking changes from branches that are only cherry-picked now works
> 
> Can you elaborate a bit more on this?
Basically, don't die when merge-base fails, look a few lines down.
Show 11 quoted lines
> > * Pika-escaped filenames unhandled.  This seems fixed in the latest
> >   git, but I fixed it more generally and removed the ShellQuote module
> >   dependency along the way.
> 
> Yes, this got fixed recently. Your change here goes together with the
> 'tla get' + rsync strategy which I'm not sure about.
> 
> > * Don't die() when a merge-base can't be found.  Arch supports
> >   merging between unrelated trees.
> 
> Fair enough. Does it result on a good graft in git?

Right now I end up with separate branches that are imported (according to git-branch) but the git-log and gitk don't seem to to show relationships between the unrelated trees. I think find_parents() may need to use an alternate strategy instead of warning and skipping if a merge-base can't be found.

Show 29 quoted lines
> > Usability enhancements:
> >
> > * Optionally detect merged branches and attempt to import their history,
> >   too.  Use the -D <depth> option for this.  Specifying a <depth>
> >   greater than 1 is usually not needed unless the tree you're tracking
> >   has had history pruned.
> >
> > * Optionally attempt to auto-register unknown Arch archives from
> >   mirrors.sourcecontrol.net to pull their history with the -a (boolean)
> >   switch.  Not sure how useful users will find this.
> 
> Those two are interesting!
> 
> > * Removed -A <archive> usage (unnecessary in all cases) and made all
> >   Arch calls and output parsing to be compatible with both tla (tested
> >   1.3.3) and baz (1.4.2).  Default is still tla, but the ARCH_CLIENT
> >   environment variable may be changed to baz.
> 
> That's excellent -- thanks!
> 
> > Current weaknesses:
> >
> > * (Present in the original code as well).
> >   The code still assumes that dates in commit logs can be trusted, which is
> >   fine in most cases, but a wayward branch can screw up git-archimport and
> >   cause parents to be missed.
> 
> Fair enough. You mention an alternative strategy (tla ancestry) --
> have you tried it at all?
No, not yet.
-- 
Eric Wong
Previous: Martin LanghoffNext: Martin Langhoff
Message 11 of 39 in “archimport improvements”
  1. archimport improvementsEric Wong, Nov 12, 2005
  2. 1/5 remove shellquote usage for tagsEric Wong, Nov 12, 2005
  3. 2/5 archimport: don't die on merge-base failureEric Wong, Nov 12, 2005
  4. 3/5 Disambiguate the term 'branch' in Arch vs gitEric Wong, Nov 12, 2005
  5. 4/5 Overhaul of changeset applicationEric Wong, Nov 12, 2005
  6. 5/5 -D <depth> option to recurse into merged branchesEric Wong, Nov 12, 2005
  7. Eric WongNov 14, 2005
  8. Martin LanghoffNov 12, 2005
  9. Eric WongNov 12, 2005
  10. Martin LanghoffNov 12, 2005
  11. Eric WongNov 12, 2005
  12. Martin LanghoffNov 14, 2005
  13. Eric WongNov 15, 2005
  14. 1/2 archimport: allow for old style branch and public tag namesEric Wong, Nov 15, 2005
  15. 2/2 archimport: sync_to_ps() messages for tracking tla methodsEric Wong, Nov 15, 2005
  16. Eric WongNov 15, 2005
  17. Martin LanghoffNov 17, 2005
  18. Eric WongNov 24, 2005
  19. 1/9 archimport: first, make sure it still compilesEric Wong, Nov 24, 2005
  20. 2/9 remove String::ShellQuote dependency.Eric Wong, Nov 24, 2005
  21. 3/9 fix -t tmpdir switchEric Wong, Nov 24, 2005
  22. 4/9 remove git wrapper dependencyEric Wong, Nov 24, 2005
  23. 5/9 add -D <depth> and -a switchEric Wong, Nov 24, 2005
  24. 6/9 safer log file parsingEric Wong, Nov 24, 2005
  25. 7/9 Add the accurate changeset applyerEric Wong, Nov 24, 2005
  26. 8/9 Fix a bug I introduced in the new log parserEric Wong, Nov 24, 2005
  27. 9/9 fix a in new changeset applyer additionEric Wong, Nov 24, 2005
  28. Martin LanghoffNov 27, 2005
  29. Eric WongNov 27, 2005
  30. Martin LanghoffDec 1, 2005
  31. Eric WongDec 3, 2005
  32. Martin LanghoffDec 5, 2005
  33. Andreas EricssonNov 24, 2005
  34. Junio C HamanoNov 24, 2005
  35. Eric WongNov 24, 2005
  36. Linus TorvaldsNov 24, 2005
  37. Martin LanghoffNov 26, 2005
  38. Eric WongNov 26, 2005
  39. Martin LanghoffNov 24, 2005

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.