Re: [PATCH] hg-to-git: improve popen calls
- From
Mark Drago <markdrago@gmail.com>
- Date
- Jan 15, 2008, 13:03 UTC
- Message-ID
- <af675f7f0801150503p26fba583tfb5827717b67705f@mail.gmail.com>
- In-Reply-To
- <7vr6gjfl4z.fsf@gitster.siamese.dyndns.org>
On Jan 15, 2008 5:17 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Mark Drago <markdrago@gmail.com> writes:
>
> > + log_data = os.popen('hg log -r %d --template "{tags}\n{date|date}\n{author}\n"' % cset).readlines()
>
> I've already seen Stelian's Ack, but just for my sanity, let me
> make sure one thing. The above {date|date} is correct, not a
> typo?Yeah. Everything after the pipe character is a filter and there is a template keyword and a filter that are both called 'date'.
mdrago@laptop:~/Code/trunk$ hg log -r 4 --template '{date}\n' 1197080765.018000 mdrago@laptop:~/Code/trunk$ hg log -r 4 --template '{date|date}\n' Fri Dec 07 21:26:05 2007 -0500
Mark.