This is an archive of the discontinued Mercurial Phabricator instance.

cmdutil: fix amend when passing a date
ClosedPublic

Authored by lothiraldan on Sep 12 2017, 1:24 PM.

Details

Summary

Following https://phab.mercurial-scm.org/D636, passing the same date that the
changeset to amend would results in no new commits but the output changed
from:

$ hg amend -d '0 0'
nothing changed
[1]

to:

$ hg amend -d '0 0'

Restore the old behavior by parsing the date passed as parameter so the
condition "date == old.date()" correctly works in cases both dates are
identical.

Add a test for covering this regression.

This bug was found thanks to Evolve test suite.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lothiraldan created this revision.Sep 12 2017, 1:24 PM
singhsrb accepted this revision.Sep 12 2017, 1:56 PM
singhsrb added a subscriber: singhsrb.

@lothiraldan: Thanks for taking care of this and adding the corresponding tests.

This revision was automatically updated to reflect the committed changes.