changeset 6243:437eef39458d

fix incorrect date when committing a tag regression introduced by 989467e8e3a9
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 13 Mar 2008 15:40:41 +0100
parents a375ffc2aa1b
children b36774d0fce1
files mercurial/commands.py mercurial/localrepo.py
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Mar 12 15:44:08 2008 -0700
+++ b/mercurial/commands.py	Thu Mar 13 15:40:41 2008 +0100
@@ -2618,7 +2618,11 @@
     if not message:
         message = _('Added tag %s for changeset %s') % (name, short(r))
 
-    repo.tag(name, r, message, opts['local'], opts['user'], opts['date'])
+    date = opts.get('date')
+    if date:
+        date = util.parsedate(date)
+
+    repo.tag(name, r, message, opts['local'], opts['user'], date)
 
 def tags(ui, repo):
     """list repository tags
--- a/mercurial/localrepo.py	Wed Mar 12 15:44:08 2008 -0700
+++ b/mercurial/localrepo.py	Thu Mar 13 15:40:41 2008 +0100
@@ -202,13 +202,11 @@
 
         date: date tuple to use if committing'''
 
-        date = util.parsedate(date)
         for x in self.status()[:5]:
             if '.hgtags' in x:
                 raise util.Abort(_('working copy of .hgtags is changed '
                                    '(please commit .hgtags manually)'))
 
-
         self._tag(name, node, message, local, user, date)
 
     def tags(self):