##// END OF EJS Templates
revert: support reverting to hidden cset if directaccess config is set...
Pulkit Goyal -
r35537:31fe397f default
parent child Browse files
Show More
@@ -4588,7 +4588,10 b' def revert(ui, repo, *pats, **opts):'
4588 raise error.Abort(_('uncommitted merge with no revision specified'),
4588 raise error.Abort(_('uncommitted merge with no revision specified'),
4589 hint=_("use 'hg update' or see 'hg help revert'"))
4589 hint=_("use 'hg update' or see 'hg help revert'"))
4590
4590
4591 ctx = scmutil.revsingle(repo, opts.get('rev'))
4591 rev = opts.get('rev')
4592 if rev:
4593 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn')
4594 ctx = scmutil.revsingle(repo, rev)
4592
4595
4593 if (not (pats or opts.get('include') or opts.get('exclude') or
4596 if (not (pats or opts.get('include') or opts.get('exclude') or
4594 opts.get('all') or opts.get('interactive'))):
4597 opts.get('all') or opts.get('interactive'))):
@@ -152,6 +152,19 b' Testing with hash'
152 $ hg up 3
152 $ hg up 3
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154
154
155 `hg revert`
156
157 $ hg revert -r 28ad74 --all
158 reverting c
159
160 $ hg diff
161 diff -r 2443a0e66469 c
162 --- a/c Thu Jan 01 00:00:00 1970 +0000
163 +++ b/c Thu Jan 01 00:00:00 1970 +0000
164 @@ -1,2 +1,1 @@
165 foo
166 -bar
167
155 Commands with undefined cmdtype should not work right now
168 Commands with undefined cmdtype should not work right now
156
169
157 $ hg phase -r 28ad74
170 $ hg phase -r 28ad74
General Comments 0
You need to be logged in to leave comments. Login now