Commit Graph

9 Commits

Author SHA1 Message Date
Laurent Charignon
66eee49d7c reset: use scmutil.revsingle instead of reading rev number as is
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
2015-06-17 14:38:03 -07:00
Durham Goode
86f7770eb5 reset: fix test globbing 2015-06-17 13:10:22 -07:00
Durham Goode
483fff949e Fix reset invalidating the entire dirstate
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
2015-06-04 15:27:46 -07:00
Durham Goode
3bc673a16b reset: fix resetting to bookmarks with odd names
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
2015-04-24 13:10:58 -07:00
Eric Sumner
34002e0224 hgext: fix many tests, run-tests, writecg2 for hg3.3
Summary: Still need to fix pushrebase

Test Plan: ##run-tests.py##

Reviewers: sid0, daviser, davidsp, mitrandir, akushner, rmcelroy, pyd, mpm, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1813630

Signature: t1:1813630:1422573745:c5ea2a8acdfda0e555d1ae56a16f4fb5e5618174
2015-01-29 15:06:06 -08:00
Durham Goode
7f2f4a68d6 Fix phase after reset
Unbundling during a reset left the commit as public. This fixes the unbundled
commits to be draft.
2014-11-20 13:54:13 -08:00
Durham Goode
b9e4876c60 Add evolve support to reset command
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
2014-10-27 10:11:48 -07:00
Ryan McElroy
f081a79415 Make empty reset command unadd files
Test Plan: updated test

Reviewers: durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1645931
2014-10-28 22:44:17 -07:00
Durham Goode
47b86129f0 Add reset command
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
2014-10-23 18:56:24 -07:00