comparison mercurial/commands.py @ 6139:989467e8e3a9

Fix bad behaviour when specifying an invalid date (issue700) commit (aborts _after_ typing in a commit message) backout (aborted after the initial revert) tag (edited .hgtags and couldn't commit) import (patch applied, then commit fails) qnew (aborts on bad dates, but writes any valid date into the # Date header) qrefresh (like qnew) sign (like tag) fetch (merge, merge, merge, merge, abort)
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 17 Feb 2008 21:34:28 +0100
parents 7b937b26adf7
children e3dd35d3603b
comparison
equal deleted inserted replaced
6138:09847b90beae 6139:989467e8e3a9
193 if not rev: 193 if not rev:
194 rev = node 194 rev = node
195 195
196 if not rev: 196 if not rev:
197 raise util.Abort(_("please specify a revision to backout")) 197 raise util.Abort(_("please specify a revision to backout"))
198
199 date = opts.get('date')
200 if date:
201 opts['date'] = util.parsedate(date)
198 202
199 cmdutil.bail_if_changed(repo) 203 cmdutil.bail_if_changed(repo)
200 node = repo.lookup(rev) 204 node = repo.lookup(rev)
201 205
202 op1, op2 = repo.dirstate.parents() 206 op1, op2 = repo.dirstate.parents()
1437 problems or other deficiencies in the text patch format. 1441 problems or other deficiencies in the text patch format.
1438 1442
1439 To read a patch from standard input, use patch name "-". 1443 To read a patch from standard input, use patch name "-".
1440 """ 1444 """
1441 patches = (patch1,) + patches 1445 patches = (patch1,) + patches
1446
1447 date = opts.get('date')
1448 if date:
1449 opts['date'] = util.parsedate(date)
1442 1450
1443 if opts.get('exact') or not opts['force']: 1451 if opts.get('exact') or not opts['force']:
1444 cmdutil.bail_if_changed(repo) 1452 cmdutil.bail_if_changed(repo)
1445 1453
1446 d = opts["base"] 1454 d = opts["base"]