Fri Jun 23 22:01:52 CEST 2006  Adeodato Simó <[EMAIL PROTECTED]>
  * bzr target: fix conversion of date to local timestamp
  
  Calculate local timestamp from supplied date correctly, taking into
  account that mktime() cares about the local timezone. Also, provide a
  correct timezone to bzr if the commit happened in DST while tailor runs
  during standard time, or viceversa.

Fri Jun 23 22:02:48 CEST 2006  Adeodato Simó <[EMAIL PROTECTED]>
  * bzr target: use date.tzinfo if present
  
  Allow further control over the timezone of each commit by using
  date.tzinfo if present to calculate the timezone, instead of assuming
  the local timezone. date.tzinfo can be provided eg. in a before-commit
  function.
New patches:

[bzr target: fix conversion of date to local timestamp
Adeodato Simó <[EMAIL PROTECTED]>**20060623200152
 
 Calculate local timestamp from supplied date correctly, taking into
 account that mktime() cares about the local timezone. Also, provide a
 correct timezone to bzr if the commit happened in DST while tailor runs
 during standard time, or viceversa.
] {
hunk ./vcpx/bzr.py 183
-        from time import mktime
+        from time import mktime, gmtime
hunk ./vcpx/bzr.py 199
-        timestamp = int(mktime(date.timetuple()))
+
+        t_l = int(mktime(date.timetuple()))
+        t_u = int(mktime(date.utctimetuple()))
+
+        timezone  = t_u - mktime(gmtime(t_l))
+        timestamp = t_l + timezone
hunk ./vcpx/bzr.py 224
-                                  timestamp=timestamp)
+                                  timestamp=timestamp, timezone=timezone)
}

[bzr target: use date.tzinfo if present
Adeodato Simó <[EMAIL PROTECTED]>**20060623200248
 
 Allow further control over the timezone of each commit by using
 date.tzinfo if present to calculate the timezone, instead of assuming
 the local timezone. date.tzinfo can be provided eg. in a before-commit
 function.
] {
hunk ./vcpx/bzr.py 203
-        timezone  = t_u - mktime(gmtime(t_l))
-        timestamp = t_l + timezone
+        if not date.tzinfo:
+            timezone  = t_u - mktime(gmtime(t_l))
+            timestamp = t_l + timezone
+        else:
+            # XXX I would expect date.utcoffset().seconds to just work, as
+            # in, return a signed number of seconds <= 12*3600. However, the
+            # utcoffset() method of some tzinfo objects as defined by pytz seem
+            # to return eg. timedelta(-1, 68400) instead of timedelta(0, -18000),
+            # thus making the abs() and .days play necessary.  --dato
+            timezone = abs(date.utcoffset()).seconds
+            if date.utcoffset().days == -1:
+                timezone *= -1
+            timestamp = 2*t_u - mktime(gmtime(t_u))
}

Context:

[[hg] call add with no arguments on init
Brendan Cully <[EMAIL PROTECTED]>**20060621204559] 
[[hg] canonify repository root directory
Brendan Cully <[EMAIL PROTECTED]>**20060621191453
 
 The dirstate walker uses simple string comparison between repo.root
 and os.getcwd(), which may fail unexpectedly if repo.root is not
 the same as realpath(repo.root)
] 
[[hg] chdir to self.basedir before executing commands
Brendan Cully <[EMAIL PROTECTED]>**20060621184724
 
 Some hg tree walk operations expect to be started from the repository
 root (the command-line tool always does this). Without this patch
 the dirstate walk may occasionally inappropriately mangle paths,
 depending on where tailor is run from.
] 
[[hg] Remove files under subdirectories
Brendan Cully <[EMAIL PROTECTED]>**20060620210828
 
 removePathnames was just ignoring directories instead of
 removing the files under them. Tailor should walk mercurial's
 dirstate and remove all files under a removed directory.
] 
[[hg] Use high level commit command
Brendan Cully <[EMAIL PROTECTED]>**20060620203136
 
 commands.commit takes care of expanding directories to their component
 files so we don't have to (we weren't doing it correctly either). If
 mercurial ever decides to track directories, this will already be
 correct.
] 
[[hg] wrapper for commands.*
Brendan Cully <[EMAIL PROTECTED]>**20060620190739
 
 _hgCommand makes it easier to call commands.* functions, and
 ensures they will always have their options dictionary set
 correctly.
] 
[[hg] always use repository-specific UI when repository is available
Brendan Cully <[EMAIL PROTECTED]>**20060620190521] 
[Possible fix for #56: detect branch name at bootstrap
[EMAIL PROTECTED] 
[Use normalized path for comparing with paths from bzrlib
[EMAIL PROTECTED]
 This is the patch attached to ticket #59, thank you luks.
] 
[M-x whitespace-cleanup
[EMAIL PROTECTED] 
[Remove useless imports noticed by pyflakes
[EMAIL PROTECTED] 
[Catch ConfigParser exceptions
[EMAIL PROTECTED] 
[Use the new SF.NET nomenclature to reach the CVS repositories
[EMAIL PROTECTED] 
[Make changeset-threshold a cvs parameter
Yann Dirson <[EMAIL PROTECTED]>**20060606072820] 
[Compare the revision with branch only when following a branch
[EMAIL PROTECTED] 
[Revisited generation of commit entries
[EMAIL PROTECTED]
 Consider added names first, and add the old name in the abstract method.
 This should fix #39 where parent dirs are committed after child, either
 in very large svn commit or coming from CVS.
] 
[Add fake events at the end of the loop
[EMAIL PROTECTED] 
[TAG Version 0.9.23
[EMAIL PROTECTED] 
Patch bundle hash:
e3e08c48fd04d4191f955f6b6cd0beec0de82459
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to