git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Adam Roben <aroben@apple.com>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH] git-svn: Add 'find-rev' command
Date: Sun, 29 Apr 2007 15:25:44 -0700	[thread overview]
Message-ID: <20070429222544.GB1800@untitled> (raw)
In-Reply-To: <31790C65-1FE6-4BD4-B8D3-B285F0F0422A@apple.com>

Adam Roben <aroben@apple.com> wrote:
> On Apr 29, 2007, at 11:35 AM, Eric Wong wrote:
> 
> >Also, if you have time, can you get this (and 'log') to understand
> >revision numbers even if they're not from the working HEAD?  Thanks.
> 
>    Won't the following code accomplish that for find-rev? Perhaps I  
> misunderstand you.

working_head_info() only calls rev-list for a given head.

You should probably iterate through (like fetch_all does)
each remote and do rev_db_get via the Git::SVN object.

> >>+sub cmd_find_rev {
> >>+	my $revision_or_hash = shift;
> >>+	my $result;
> >>+	if ($revision_or_hash =~ /^r\d+$/) {
> >>+		my $head = shift;
> >>+		$head ||= 'HEAD';
> >>+		my @refs;
> >>+		my (undef, undef, undef, $gs) = working_head_info($head, 
> >>\@refs);

-- 
Eric Wong

      reply	other threads:[~2007-04-29 22:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-29  8:35 [PATCH] git-svn: Add 'find-rev' command Adam Roben
2007-04-29 18:35 ` Eric Wong
2007-04-29 20:31   ` Adam Roben
2007-04-29 22:25     ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070429222544.GB1800@untitled \
    --to=normalperson@yhbt.net \
    --cc=aroben@apple.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).