***SPAM*** how do I do this in Mercurial ?

Zorba cr at altmore.co.uk
Tue Jan 5 05:42:47 CST 2010


Hi Mads,

Cheers again!

For #2, after exploring "hg log" I've found something that will satisfy me 
for now:

> hg log -f -p <path>

where -p includes the "patches" i.e. the diffs between changesets
:-)

"Mads Kiilerich" <mads at kiilerich.com> wrote in message 
news:4B428DE0.5080801 at kiilerich.com...
> Zorba wrote, On 01/03/2010 11:53 PM:
>> thanks a mill mads, this is helping loads!
>>
>> I don't know which changeset a particular file first appeared - how does 
>> one
>> search for all occurences of a file (or a pattern for that matter) across
>> the whole repository
>>
>
> I guess that depends on your definition of a "file" is. Is it defined by 
> name or by content with changing names? Hg log with or without --follow 
> will give you either.
>
> If you have some other definition or want patterns then the most efficient 
> solution might be some inefficient scripting, such as:
>
> for i in $(seq 9999); do echo $i; hg manifest -r $i | grep bisect.py; done
>
> or a bit smarter and faster - but will probably take you longer time the 
> first couple of times:
>
> hg bisect -r
> hg up
> hg bisect -c 'hg manifest|grep bisect.py'
> hg up -r 0
> hg bisect -c 'hg manifest|grep bisect.py'
>
>> Also, regarding 2) below (for a given file, get a history of all its 
>> changes
>> and renames throughout all revisions), is it possible to get the 
>> progressive
>> diffs ?
>>
>
> It might be possible with some custom templates, but for some quick 
> investigation I would use shell scripting.
>
> If you want to browse the history then use tortoisehg with "hgtk log FILE"
>
> /Mads
>
> ps: It would be convenient if bisect -c and REV could be combined in a 
> meaningful way, such that REV indicated on which revision the command 
> should be run:
> hg bisect -r
> hg bisect -c 'hg manifest|grep bisect.py' tip
> hg bisect -c 'hg manifest|grep bisect.py' null
> - but that is currently now how it is ...
> 





More information about the Mercurial mailing list