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

Re: [PATCH] git-svn: Print revision while searching for earliest use of path

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 5, 2009, 06:42 UTC
Message-ID
<20090205064240.GA22926@dcvr.yhbt.net>
In-Reply-To
<1233810570-30765-1-git-send-email-deskinm@umich.edu>
Deskin Miller <deskinm@umich.edu> wrote:
Show 18 quoted lines
> When initializing a git-svn repository from a Subversion repository, it
> is common to be interested in a path which did not exist in the initial
> commit to Subversion.  In a large repository like e.g. Apache, this may
> take some time while the user receives no additional feedback.  Print
> the highest revision number scanned thus far to let the user know
> something is still happening.
> 
> Signed-off-by: Deskin Miller <deskinm@umich.edu>
> ---
> This came about on account of patmaddox asking on #git why git-svn
> seemed to be hung on clone.  Despite the admonition that this might take
> a long time, I also like to have some indication that progress is being
> made.  My first version of this printed using '\rChecked through
> r$revision' but the subsequent output line when the path is found ends
> up clobbered on the same line, and I'm not skilled enough at the
> terminal or Perl to address this cleanly.  If the current version is
> felt to be too verbose since it is printing a new line, I'd be up for
> squelching the output to e.g. every 1000 revisions or so.

This is definitely useful on slow/large repositories. The current output with newlines is fine by me.

Show 13 quoted lines
> Anecdotally, it looks like Subversion looks for the path in blocks of
> 100 revisions, so we get the nice whole revision number for free.  I
> couldn't find any documentation on the proper format of the error
> message, so I just came up with the regular expressions to parse the
> revision myself; if they need to be more explicit to avoid really
> egregious path names, I can make an effort.
> 
> I tested on both http:// and file:// transport, to come up with the
> different error strings; since the error number for file is the same as
> svn:// I'm hoping that the error string is the same too.  If someone can
> bounce this off a svn:// repo I'd appreciate it, otherwise I'll dig out
> the documentation and set up a network-served svn repository myself
> (which is really my job as the patch author anyway).

Couldn't we avoid the trouble of parsing the inconsistent error messages by printing this status message after the get_log() calls in gs_fetch_loop_common() ?

-- 
Eric Wong
Previous: Deskin MillerNext: Deskin Miller
Message 2 of 5 in “git-svn: Print revision while searching for earliest use of path”
  1. git-svn: Print revision while searching for earliest use of pathDeskin Miller, Feb 5, 2009
  2. Eric WongFeb 5, 2009
  3. Deskin MillerFeb 5, 2009
  4. git-svn: Print revision while searching for earliest use of pathDeskin Miller, Feb 9, 2009
  5. Eric WongFeb 9, 2009

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.