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

Re: cvsimport still not working with cvsnt

From
GRGuy Rouillier <guyr@burntmail.com>
Date
Dec 22, 2010, 05:43 UTC
Message-ID
<4D119015.6020207@burntmail.com>
In-Reply-To
<4D112586.2060904@Freescale.com>
On 12/21/2010 5:09 PM, Emil Medve wrote:
Show 56 quoted lines
> Hello Guy,
>
>
> On 12/20/10 15:36, Jonathan Nieder wrote:
>> (+cc: Emil, some cvsimport people)
>>
>> Guy Rouillier wrote:
>
> Sometimes, on some particularly nasty CVS repos, I noticed better
> results when using http://cvs2svn.tigris.org
>
>>> I'm going to try sending this blind, as the mailing list has sent me
>>> the promised authorization key after 24 hrs.
>>
>> No problem.  Actually a subscription is not required --- the
>> convention on this list is to always reply-to-all.
>>
>>> I finally found the problems, both of which were reported in 2008
>>> here:
>>>
>>> http://kerneltrap.org/mailarchive/git/2008/3/13/1157364
>>
>> Seems to have received no replies[1].
>
> I don't remember why, but that patch didn't get enough interest
>
>>> I do see one possible issue with the supplied modifications.  At
>>> work, we upgraded from CVS to CVSNT.  So, my home directory has both
>>> .cvspass (from the original CVS) and .cvs/cvspass (after the
>>> conversion to CVSNT.)  Sloppy housekeeping on my part, I admit, but
>>> probably not uncommon.  The supplied patch would pick up the
>>> original CVS file and would fail.  (BTW, this is true only of the
>>> git-cvsimport.perl script itself; cvsps must shell out to the
>>> installed CVS client (in my case, cvsnt), because when I invoked
>>> that manually, it worked.)
>>>
>>> So, I would advise checking to see if both files exist, and if so
>>> exit with an error.  Unless cvsimport wants to get real fancy and
>>> shell out to the installed cvs client to try to figure out what is
>>> installed, there is no way to tell which cvspass file is actively
>>> being used.  I don't recommend trying to figure this out, as the
>>> user's intent is unclear.
>>
>> Thanks, sounds sane to me.  Care to write a patch?
>
> If you care enough about this scenario, how about search for the
> relevant<CVSROOT, password>  in both files. If you find just one pair or
> if you find a pair in both files and they are "equal" then just use it.
> If you find two pairs, one in each file, use the one from the file with
> a newer modified time-stamp. In a migration scenario such as this, you'd
> imaging the "old" file will get stale after a while. Not perfect, but
> some informational messages in case of a duplicate would help the user
> clarify their intentions
>
> Additionally/Alternatively just add a command line parameter to allow
> the user to explicitly specify a cvspass file

Emil and Jonathan, thanks for the feedback. Perl is not my strong point, but I'll take a crack at it over the upcoming holidays. I'm inclined not to get too fancy and try to second-guess the user's environment. Perhaps he has both cvs and cvsnt installed for some reason (testing one, using the other for regular work); perhaps a tool installed one or the other and he doesn't even know he has them both. Etc.

So, at most I can see, as Emil suggested, seeing if the entry exists in both files and is the same in both. If so, or if the entry is only in one of them, then just use the entry. However, if the entry is in both files and is different, I'd prefer to just exit with an error and have the user clarify his environment.

-- 
Guy Rouillier
Previous: Emil MedveNext: Guy Rouillier
Message 4 of 32 in “cvsimport still not working with cvsnt”
  1. Guy RouillierDec 20, 2010
  2. Jonathan NiederDec 20, 2010
  3. Emil MedveDec 21, 2010
  4. Guy RouillierDec 22, 2010
  5. Guy RouillierJan 10, 2011
  6. Martin LanghoffJan 10, 2011
  7. Guy RouillierJan 14, 2011
  8. Jonathan NiederJan 14, 2011
  9. Junio C HamanoJan 14, 2011
  10. Guy RouillierJan 30, 2011
  11. Martin LanghoffJan 30, 2011
  12. Junio C HamanoFeb 10, 2011
  13. Guy RouillierFeb 18, 2011
  14. Junio C HamanoFeb 18, 2011
  15. Guy RouillierFeb 19, 2011
  16. Junio C HamanoFeb 20, 2011
  17. Guy RouillierFeb 21, 2011
  18. Junio C HamanoFeb 21, 2011
  19. Junio C HamanoFeb 22, 2011
  20. Martin LanghoffFeb 22, 2011
  21. Guy RouillierFeb 23, 2011
  22. Junio C HamanoFeb 23, 2011
  23. Guy RouillierFeb 23, 2011
  24. Junio C HamanoFeb 23, 2011
  25. Guy RouillierFeb 27, 2011
  26. Junio C HamanoFeb 27, 2011
  27. Guy RouillierApr 29, 2011
  28. Jonathan NiederApr 29, 2011
  29. Guy RouillierMay 1, 2011
  30. Junio C HamanoMay 1, 2011
  31. Junio C HamanoFeb 23, 2011
  32. Guy RouillierFeb 24, 2011

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.