>>>>> "Brendan" == Brendan Cully <[EMAIL PROTECTED]> writes:
Brendan> * the xml output (darcs 1.0.4) produces dates of the Sun
Brendan> Oct 20 20:10:05 EDT 2002 variety rather than
Brendan> 20021020201005 as the changelog parser expects
Uh?
$ darcs --version
1.0.4 (stable branch)
$ darcs cha --xml --last=1 --verbose
<changelog>
<patch author='Brendan Cully <[EMAIL PROTECTED]>' date='20051116052626'
local_date='Wed Nov 16 06:26:26 CET 2005' inverted='False'
hash='20051116052626-0ae3a-850fe3bd8a422ae4410d898d5ad2c2498207bd03.gz'>
<name>Don't apply duplicate tags to mercurial targets</name>
<comment>
I just noticed that a CVS source will replay all of the tags that apply
to HEAD on every run. This teaches mercurial to filter out equivalent tags
(by checking whether they already exist in the commit history up to the last
non-tag commit).</comment>
</patch>
</changelog>
Tailor reads the "date" attribute, not "local_date", and that should
be UTC
Brendan> * empty
Brendan> changelogs crash python (the test if last: never fails
Brendan> because last is a generator, but last.next() will raise
Brendan> StopIteration)
Brendan> These first two I have patches for.
Ok, waiting for them, but you have to convince me about the former.
Brendan> But more seriously: *
Brendan> darcs pull --dry-run produces times in the local TZ (UTC
Brendan> if that's what's set, of course) but the hash of the
Brendan> patch uses the time in the original commiter's TZ. So
Brendan> unless TZ happens to be the same, the hash tailor
Brendan> calculates doesn't match.
Uhm, this is problematic, if it's true. Are you sure of that? A little
experiment seems saying you are wrong, and that instead darcs uses UTC
internally:
$ export TZ=UTC-11
$ mkdir p
$ cd p
$ darcs init
$ touch a.txt
$ darcs add a.txt
$ darcs record
addfile ./a.txt
Shall I record this patch? (1/?) [ynWsfqadjkc], or ? for help: y
What is the patch name? Test
Do you want to add a long comment? [yn] n
Finished recording patch 'Test'
$ cd _darcs/
$ cd patches/
$ ls -l
totale 2
-rw-rw-r-- 1 lele lele 88 17 nov 12:33
20051117013307-97f81-d5a4172230fbc48d8371b48854e36133a5cf8d86.gz
-rw-rw-r-- 1 lele lele 4 17 nov 12:33 pending
$ darcs changes
Thu Nov 17 12:33:07 UTC 2005 [EMAIL PROTECTED]
* Test
$ darcs changes --xml --verb
<changelog>
<patch author='[EMAIL PROTECTED]' date='20051117013307' local_date='Thu Nov 17
12:33:07 UTC 2005' inverted='False'
hash='20051117013307-97f81-d5a4172230fbc48d8371b48854e36133a5cf8d86.gz'>
<name>Test</name>
</patch>
</changelog>
$ echo $TZ
UTC-11
$ unset TZ
$ date
gio nov 17 02:34:07 CET 2005
$ darcs cha --xml --verb
<changelog>
<patch author='[EMAIL PROTECTED]' date='20051117013307' local_date='Thu Nov 17
02:33:07 CET 2005' inverted='False'
hash='20051117013307-97f81-d5a4172230fbc48d8371b48854e36133a5cf8d86.gz'>
<name>Test</name>
</patch>
</changelog>
Re-reading date(1) documentation, it seems tailor should use "UTC0"
for the timezone, not "UTC"... So, if not proved wrong, even
TZ=UTC0 darcs pull
should emit the right info to compute the hash.
Brendan> Commenting out the bit that creates changeset.darcs_hash
Brendan> (so tailor falls back to fetching patches by
Brendan> author/date/name) seems to resolve the problem for me,
Brendan> but I'm not sure that's the way to go...
No, that's subtly wrong: it works (and worked like that, in cvsync),
but may fails suddenly, because darcs fails at fetching the right
patch not using the hash.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: [EMAIL PROTECTED] | -- Fortunato Depero, 1929.
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor