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
Feb 21, 2011, 04:30 UTC
Message-ID
<4D61EA4B.3020708@burntmail.com>
In-Reply-To
<7vy65bkw72.fsf@alter.siamese.dyndns.org>
On 2/20/2011 2:21 AM, Junio C Hamano wrote:
Show 14 quoted lines
> Guy Rouillier <guyr@burntmail.com> writes:
> 
>> The two clients use a different delimiter to separate the CVS
>> repository name from the user password.  The original CVS
>> client separates the two entries with a space character, while
>> CVSNT separates them with an equal (=) character.  Hence,
>> the regular expression used to split these two tokens is
>> altered to accept either delimiter.
> 
> That sounds like a wrong approach.  If there are two clients, one reads
> from one location with one syntax, and the other one reads from another
> different location with a different syntax, shouldn't the code using the
> original syntax when reading the original file, and the other syntax when
> reading the file for the other client?
...
> In practice, I would imagine that the cvsroot part wouldn't contain an
> equal sign, so this looser regexp would not hurt in the real life, but it
> does feel yucky.

Well, this is the important point. I did think of these aspects when writing the code. Sure, writing more precise code is possible, but the results are the same in either case. If you look back at the version I wrote in response to Emil's post, I did have two entirely separate sections for CVS and CVSNT, and I used only one delimiter in each. Martin then suggested I combine the two sections into one, so while following that suggestion I had to alter the regular expression.

Show 5 quoted lines
> Here is a totally untested patch.  I think the original code used
> $pass="A" as a fall-back when it didn't find any password entry, and I
> tried to retain that instead of dying.  Also this does not error out if
> you merely have two cvspass files, as long as you do not have the wanted
> entry for both of them.

I'll take a look at the patch later this week when I have some time. I purposely took out the code the set the password to "A" if the CVS repository is not located in the password file. I was surprised to see that in the original code. I can't think of any situation where silently making up a password is a good idea.

Finally, after our last round of discussions, I thought we all agreed not to try to do any matching on the contents of the two password files. I originally implemented a comparison of the contents of the two files, but you pointed out there are many possible permutations involving entries found in both files. So I went back to my earlier approach of just erroring out if both files are found.

-- 
Guy Rouillier
Previous: Junio C HamanoNext: Junio C Hamano
Message 17 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.