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

Re: cvs revision number -> git commit name?

From
ACAaron Crane <git@aaroncrane.co.uk>
Date
Jan 26, 2010, 22:53 UTC
Message-ID
<bc341e101001261453u16124186i298a53ead0b4eee2@mail.gmail.com>
In-Reply-To
<hbf.20100126bda0@bombur.uio.no>
Hallvard B Furuseth <h.b.furuseth@usit.uio.no> wrote:
Show 6 quoted lines
> When moving from CVS to Git, what's a good way to help Git users
> find an old commit given the original CVS revision number?  Are
> there tools available to help?
>
> One could commit a table with a (file,revision)->commit mapping,
> I suppose something can generate it when importing from cvs?

That's what we decided to do on a recent CVS-to-Git conversion, though like you, we also considered munging the log messages instead. Our jury's still out on whether it was the right decision; we haven't had much cause to use the result yet.

One thing to be aware of (beyond the need to run grep to convert old CVS revision numbers to Git commit IDs) is that there's a good chance the mapping file will pollute the results of `git grep` for some tasks. (We've put the mapping file into our repo, where it's easy to find.) I'm considering gzipping the mapping file as a workaround; that would mean our users will need to use zgrep (or equivalent) to look up CVS revision numbers, which may or may not be a problem in your situation.

I have an initial patch to git-cvsimport that adds a switch to generate the mapping as it goes. I'm currently trying to find time to clean it up and submit it.

-- 
Aaron Crane ** http://aaroncrane.co.uk/
Previous: Hallvard B FurusethNext: Johan Herland
Message 2 of 7 in “cvs revision number -> git commit name?”
  1. Hallvard B FurusethJan 26, 2010
  2. Aaron CraneJan 26, 2010
  3. Johan HerlandJan 26, 2010
  4. Junio C HamanoJan 27, 2010
  5. Johan HerlandJan 27, 2010
  6. Hallvard B FurusethJan 27, 2010
  7. Johan HerlandJan 27, 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.