Mercurial > evolve
comparison hgext/evolve.py @ 1688:031682c1faa2
metaedit: check for public changeset before instability
Public changeset will stay public even if the selection is adjusted, this is a
more definitive condition that is worth warning about first.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 02 May 2016 18:24:36 +0200 |
parents | 73e0018c423f |
children | 60752ed8d2d4 |
comparison
equal
deleted
inserted
replaced
1687:73e0018c423f | 1688:031682c1faa2 |
---|---|
3219 'not currently supported')) | 3219 'not currently supported')) |
3220 | 3220 |
3221 if opts['fold']: | 3221 if opts['fold']: |
3222 root, head = _foldcheck(repo, revs) | 3222 root, head = _foldcheck(repo, revs) |
3223 else: | 3223 else: |
3224 if repo.revs("%ld and public()", revs): | |
3225 raise error.Abort(_('cannot edit commit information for public ' | |
3226 'revisions')) | |
3224 newunstable = _disallowednewunstable(repo, revs) | 3227 newunstable = _disallowednewunstable(repo, revs) |
3225 if newunstable: | 3228 if newunstable: |
3226 raise error.Abort( | 3229 raise error.Abort( |
3227 _('cannot edit commit information in the middle of a stack'), | 3230 _('cannot edit commit information in the middle of a stack'), |
3228 hint=_('%s will be affected') % repo[newunstable.first()]) | 3231 hint=_('%s will be affected') % repo[newunstable.first()]) |
3229 if repo.revs("%ld and public()", revs): | |
3230 raise error.Abort(_('cannot edit commit information for public ' | |
3231 'revisions')) | |
3232 root = head = repo[revs.first()] | 3232 root = head = repo[revs.first()] |
3233 | 3233 |
3234 wctx = repo[None] | 3234 wctx = repo[None] |
3235 p1 = wctx.p1() | 3235 p1 = wctx.p1() |
3236 tr = repo.transaction('metaedit') | 3236 tr = repo.transaction('metaedit') |