Generating a list of files

Haase, Peter Peter.Haase at draeger.com
Thu Dec 1 12:14:28 UTC 2011


Matt Mackall wrote:
> On Wed, 2011-11-30 at 18:28 +0100, Haase, Peter wrote:
> > Hi,
> > 
> > Some time ago I generated a list of all files within a repository 
> > including the date and changeset for each file that introduced the 
> > latest version of the file (see list below). Unfortunately 
> I have no 
> > clue by which hg command I generated this list! Google and 
> the hg help 
> > hasn't yield an outcome. Can someone give me a hint how to generate 
> > such list?
> > 
> > Thanks for help,
> > Peter
> > 
> > artwork/devices/10036.jpg                              Thu 
> Sep 02 17:24:07 2010 +0200    f34d27134f75
> > artwork/devices/8108.png                               Thu 
> Sep 02 17:24:07 2010 +0200    f34d27134f75
> > artwork/devices/8270.png                               Thu 
> Sep 02 17:24:07 2010 +0200    f34d27134f75
> 
> How about something like:
> 
> $ for f in `hg manifest`; do hg log -l 1 $f --template 
> "$f\t{date|date}\t{node|short}\n"; done | head
> .hgignore	Fri Jun 10 20:38:02 2011 +0200	0980239cb20c
> .hgsigs	Tue Nov 01 15:37:00 2011 -0500	a708b65baeb9
> .hgtags	Tue Nov 01 15:36:56 2011 -0500	c23737b76030
> CONTRIBUTORS	Wed Nov 07 21:10:30 2007 -0600	c29efd272395
> COPYING	Thu Jun 02 11:17:02 2011 -0500	8c8b55733cbd
> Makefile	Fri Oct 28 12:59:50 2011 +0200	3ca419fb435e
> README	Wed Oct 27 12:05:37 2010 +0200	a9f91c844a3b
> contrib/bash_completion	Tue May 17 00:46:52 2011 +0200	
> 51f444e85734
> contrib/buildrpm	Fri Nov 06 10:06:08 2009 +0100	5070e4d57276
> contrib/casesmash.py	Fri Jun 24 13:35:03 2011 -0500	f5765353d430
> 

That's great - thanks Matt! For my use case it make sense to replace 'hg log -l1' by 'hg parents' because I want to see the revision in which the files of the current (might not be the tip) working directory were last changed. In combination with the manifest command I get the desired list!  
 
---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthält vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfänger dieser E-mail sein, senden Sie bitte diese an den Absender zurück und löschen Sie die E-mail aus Ihrem System.


More information about the Mercurial mailing list