Summary:
Reset didn't use scmutil to parse revision number given on the command line.
Inhibits plugs in the scmutil logic to enable direct access and therefore reset
was not benefiting from it. This caused the revive logic in reset to create
a new commit instead of reusing the old one.
Test Plan: Added test
Reviewers: durham, pyd
Reviewed By: pyd
Differential Revision: https://phabricator.fb.com/D2032910
Tasks: 6696106
Signature: t1:2032910:1430339529:47e2c7d7c2ea76e4ab1114e7215e8517ee9f4356
Summary:
Previously, if you did 'hg reset .' it would invalidate the entire dirstate,
making every entry 'lookup' so it had to read the entire working copy on the
next run. This fixes that.
Technically this is a bug in core mercurial since rebuilddirstate() should
invalidate anything if an empty list is passed.
Test Plan: Added a test
Reviewers: pyd, lcharignon, sid0, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2129095
Signature: t1:2129095:1433520638:e05ee86dedcc9f87d5c3fd65e3e2374ecbac5dfb
Summary:
Previously, reseting to bookmarks with '-' in the name did not work. We need to
use scmutil.revrange instead of repo.revs to make this happen correctly.
Test Plan: Added a test
Reviewers: ericsumner, rmcelroy, pyd, lcharignon, sid0
Reviewed By: sid0
Subscribers: dreiss
Differential Revision: https://phabricator.fb.com/D2021737
Signature: t1:2021737:1429906581:c8deaf61920fad5fd9c9faea16b867685d3be7ad
Summary:
When evolve is enabled, reset should use prune and touch instead of
strip and unbundle.
Test Plan: Added tests.
Reviewers: pyd, sid0
Differential Revision: https://phabricator.fb.com/D1641160
Summary:
This adds a 'hg reset' command that acts similar to 'git reset'. It moves your
active bookmark to the desired location, along with your working copy parent. If
no flags are specified, the working copy contents is left alone. If --clean is
specified, the working copy contents is overwritten.
By default we will attempt to recover the commit from the backup bundles if it
is not in the repository. A future commit will add support for using touch/prune
when evolve is enabled.
Test Plan: Added tests, and ran them
Reviewers: sid0, davidsp, pyd, mpm, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D1637658