Re: [PATCH] git-svn: Added 'find-rev' command

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-svn: Added 'find-rev' command

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:07

Eric Wong [off-list ref] writes:
Adam Roben [off-list ref] wrote:
quoted
This patch adds a new 'find-rev' command to git-svn that lets you easily
translate between SVN revision numbers and git tree-ish.
Looks useful.

Acked-by: Eric Wong <redacted>
But looks quite wasteful.  Why not run "rev-list -v" or
something instead of running cat-file on revision one-by-one?

Re: [PATCH] git-svn: Added 'find-rev' command

From: Eric Wong <hidden>
Date: 2016-06-15 22:43:07

Junio C Hamano [off-list ref] wrote:
Eric Wong [off-list ref] writes:
quoted
Adam Roben [off-list ref] wrote:
quoted
This patch adds a new 'find-rev' command to git-svn that lets you easily
translate between SVN revision numbers and git tree-ish.
Looks useful.

Acked-by: Eric Wong <redacted>
But looks quite wasteful.  Why not run "rev-list -v" or
something instead of running cat-file on revision one-by-one?
Didn't know about "rev-list -v", but I just checked and it still has the
limited-size buffer that --pretty=raw has.

"git-svn log" only runs cat-file if it can't find a git-svn-id: line at
the bottom.  (I used log --abbrev-commit --pretty=raw).

Sorry about the premature Ack, I hadn't had my coffee yet at that point
(and now I'm half awake :x)

Adam:

However, since we're not fetching ranges...

You can do $gs->rev_db_get($rev_nr) to easily find a commit given a
revision.  Bonus points if this works independently of the current HEAD
so you can look up revision numbers on different branches.  (git-svn log
should be made to support this, too)


-- 
Eric Wong

Re: [PATCH] git-svn: Added 'find-rev' command

From: Adam Roben <hidden>
Date: 2016-06-15 22:43:07

On Apr 28, 2007, at 3:50 AM, Eric Wong wrote:
Adam:

However, since we're not fetching ranges...

You can do $gs->rev_db_get($rev_nr) to easily find a commit given a
revision.  Bonus points if this works independently of the current  
HEAD
so you can look up revision numbers on different branches.  (git- 
svn log
should be made to support this, too)
    OK, I'll do that and send out a new patch.

-Adam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help