Mercurial > evolve
comparison hgext/evolve.py @ 743:af74a5cdf96b
conform to the Mercurial custom of lowercase messages
...and while at it, use the more usual long form of "can't"
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Fri, 26 Jul 2013 12:06:44 +0200 |
parents | 760d01a549a6 |
children | 99e51aff724b |
comparison
equal
deleted
inserted
replaced
742:760d01a549a6 | 743:af74a5cdf96b |
---|---|
560 @eh.wrapcommand("pull") | 560 @eh.wrapcommand("pull") |
561 def wrapmayobsoletewc(origfn, ui, repo, *args, **opts): | 561 def wrapmayobsoletewc(origfn, ui, repo, *args, **opts): |
562 """Warn that the working directory parent is an obsolete changeset""" | 562 """Warn that the working directory parent is an obsolete changeset""" |
563 res = origfn(ui, repo, *args, **opts) | 563 res = origfn(ui, repo, *args, **opts) |
564 if repo['.'].obsolete(): | 564 if repo['.'].obsolete(): |
565 ui.warn(_('Working directory parent is obsolete\n')) | 565 ui.warn(_('working directory parent is obsolete!\n')) |
566 return res | 566 return res |
567 | 567 |
568 # XXX this could wrap transaction code | 568 # XXX this could wrap transaction code |
569 # XXX (but this is a bit a layer violation) | 569 # XXX (but this is a bit a layer violation) |
570 @eh.wrapcommand("commit") | 570 @eh.wrapcommand("commit") |
1234 raise util.Abort('merge in progress') | 1234 raise util.Abort('merge in progress') |
1235 | 1235 |
1236 children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()] | 1236 children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()] |
1237 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) | 1237 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) |
1238 if not children: | 1238 if not children: |
1239 ui.warn(_('No non-obsolete children\n')) | 1239 ui.warn(_('no non-obsolete children\n')) |
1240 return 1 | 1240 return 1 |
1241 if len(children) == 1: | 1241 if len(children) == 1: |
1242 c = children[0] | 1242 c = children[0] |
1243 hg.update(repo, c.rev()) | 1243 hg.update(repo, c.rev()) |
1244 displayer.show(c) | 1244 displayer.show(c) |
1245 return 0 | 1245 return 0 |
1246 else: | 1246 else: |
1247 for c in children: | 1247 for c in children: |
1248 displayer.show(c) | 1248 displayer.show(c) |
1249 ui.warn(_('Multiple non-obsolete children, explicitly update to one\n')) | 1249 ui.warn(_('multiple non-obsolete children, explicitly update to one\n')) |
1250 return 1 | 1250 return 1 |
1251 | 1251 |
1252 def _reachablefrombookmark(repo, revs, mark): | 1252 def _reachablefrombookmark(repo, revs, mark): |
1253 """filter revisions and bookmarks reachable from the given bookmark | 1253 """filter revisions and bookmarks reachable from the given bookmark |
1254 yoinked from mq.py | 1254 yoinked from mq.py |
1714 obsoleted.extend(revs) | 1714 obsoleted.extend(revs) |
1715 # convert obsolete target into revs to avoid alias joke | 1715 # convert obsolete target into revs to avoid alias joke |
1716 obsoleted[:] = [str(i) for i in repo.revs('%lr', obsoleted)] | 1716 obsoleted[:] = [str(i) for i in repo.revs('%lr', obsoleted)] |
1717 if obsoleted and len(revs) > 1: | 1717 if obsoleted and len(revs) > 1: |
1718 | 1718 |
1719 raise error.Abort(_('Can not graft multiple revision while ' | 1719 raise error.Abort(_('cannot graft multiple revisions while ' |
1720 'obsoleting (for now).')) | 1720 'obsoleting (for now).')) |
1721 | 1721 |
1722 return commitwrapper(orig, ui, repo,*revs, **kwargs) | 1722 return commitwrapper(orig, ui, repo,*revs, **kwargs) |
1723 finally: | 1723 finally: |
1724 lock.release() | 1724 lock.release() |