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

Re: [PATCH 6/7] Add SVN revision parser and exporter

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 30, 2010, 15:58 UTC
Message-ID
<AANLkTimPkAWa8YEro50gWgeaPSmgPCRXppHZNZuCb_hj@mail.gmail.com>
In-Reply-To
<20100529140645.GA8338@progeny.tock>
Hi Jonathan,
Jonathan Nieder wrote:
> Wait, where are SVN revisions being parsed?  It seems that the repo
> module maintains the exporter's state and provides a facility to
> to call the fast_export module to write it out.
Right. Sorry about the bad commit message.
Show 22 quoted lines
>  repo_add(path, mode, blob_mark) is used to add a new file to
>  the current commit.
>
>  repo_modify is used to add a replacement for an existing file;
>  it is implemented exactly the same way, but a check could be
>  added later to distinguish the two cases.
>
>  repo_copy copies a blob from a previous revision to the current
>  commit.
>
>  repo_replace modifies the content of a file from the current
>  commit, if and only if it already exists.
>
>  repo_delete removes a file or directory from the current commit.
>
>  repo_commit calls out to fast_export to write the current commit
>  to the fast-import stream in stdout.
>
>  repo_diff is used by the fast_export module to write the changes
>  for a commit.
>
>  repo_reset erases the exporter's state, so valgrind can be happy.

Thanks for the nice descriptions. Will be useful while preparing Documentation/technical.

> Mode must be 100644, 100755, 120000, or 160000.
Okay, do we put in an assert() for sanity?
> Style: we don’t tend to use typedef to hide underlying struct definitions
> (see Documentation/CodingStyle from linux-2.6.git, chapter 5, for some
> explanation about why).
Fixed.
> Maybe some local variables would make this more readable:
Fixed.
> Is this for adding new entries to an existing directory?  It is
> getting late, so I did not look it over carefully.
For David.
> If a file "foo" exists and I ask for "foo/bar", this will return
> the entry for foo.  Is that appropriate?
For David.
> When would it be NULL?  Is an empty path allowed?
For David.
> Can this overflow the path stack?

Actually, this has already been changed- see the latest commits to see how path is allocated.

> Might be easier to read the other way around:
Fixed.
> I did not carefully trace the cases where repo_clone_dir may reuse a
> dir.  I would be happier if someone else does.
For David.
-- Ram
Previous: Jonathan NiederNext: Ramkumar Ramachandra
Message 26 of 29 in “Import David's SVN exporter”
  1. 0/7 Import David's SVN exporterRamkumar Ramachandra, May 23, 2010
  2. 1/7 Add skeleton remote helper for SVNRamkumar Ramachandra, May 23, 2010
  3. 2/7 Add cpp macro implementation of treapsRamkumar Ramachandra, May 23, 2010
  4. Jonathan NiederMay 29, 2010
  5. Ramkumar RamachandraMay 30, 2010
  6. Jonathan NiederMay 30, 2010
  7. Ramkumar RamachandraMay 30, 2010
  8. 3/7 Add buffer pool libraryRamkumar Ramachandra, May 23, 2010
  9. Peter BaumannMay 24, 2010
  10. Ramkumar RamachandraMay 24, 2010
  11. David Michael BarrMay 24, 2010
  12. Jonathan NiederMay 29, 2010
  13. David Michael BarrMay 29, 2010
  14. 4/7 Add a memory pool libraryRamkumar Ramachandra, May 23, 2010
  15. Jonathan NiederMay 29, 2010
  16. Ramkumar RamachandraMay 30, 2010
  17. Jonathan NiederMay 30, 2010
  18. Ramkumar RamachandraMay 30, 2010
  19. 5/7 Add API for string-specific memory poolRamkumar Ramachandra, May 23, 2010
  20. Jonathan NiederMay 29, 2010
  21. Ramkumar RamachandraMay 30, 2010
  22. Jonathan NiederMay 30, 2010
  23. Ramkumar RamachandraMay 30, 2010
  24. 6/7 Add SVN revision parser and exporterRamkumar Ramachandra, May 23, 2010
  25. Jonathan NiederMay 29, 2010
  26. Ramkumar RamachandraMay 30, 2010
  27. 7/7 Add handler for SVN dumpRamkumar Ramachandra, May 23, 2010
  28. Jonathan NiederMay 30, 2010
  29. Ramkumar RamachandraMay 30, 2010

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.