comando mercurial para obtener el número total de líneas de código

I'm looking for a mercurial command to get the total number of lines of code in a repository. I'm sure there's a way to do this without extensions.

Muchas Gracias

preguntado el 31 de julio de 12 a las 14:07

You're sure as in you've used it before and forgotten or sure as in you expect it to be there? -

No. I haven't used mercurial before. -

I don't think there is a way without extensions. -

Mercurial doesn't manipulate the code. It manages file versioning. -

Well, not by manipulating it. To do that it would need to understand what language your code is written in. It would also need to understand that to give you a worthwhile LoC count. -

2 Respuestas

Esto debería hacerlo:

hg cat glob:** | wc --lines

it will include any binary files, but you shouldn't store those anyway. :)

cat will take a -r parameter if you want to count some revision other than the one currently checked out.

Respondido 01 ago 12, 05:08

It's worth noting this would just count lines in files, not necessarily a worthwhile lines de código contar. - adam houldsworth

el paquete batir extension gives you a list of the Lines of Code changed by each author. I suspect this is what you were thinking of, as there's no functionality to do it without extensions.

Respondido 31 Jul 12, 18:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.