comparison hgext/histedit.py @ 26171:49c1424424de

histedit: fix English (en-US)
author timeless@mozdev.org
date Fri, 28 Aug 2015 13:52:49 -0400
parents 5706d130ec16
children b764f3c61bc7
comparison
equal deleted inserted replaced
26170:61124bf8485f 26171:49c1424424de
142 as running ``hg histedit 836302820282``. If you need plan to push to a 142 as running ``hg histedit 836302820282``. If you need plan to push to a
143 repository that Mercurial does not detect to be related to the source 143 repository that Mercurial does not detect to be related to the source
144 repo, you can add a ``--force`` option. 144 repo, you can add a ``--force`` option.
145 145
146 Histedit rule lines are truncated to 80 characters by default. You 146 Histedit rule lines are truncated to 80 characters by default. You
147 can customise this behavior by setting a different length in your 147 can customize this behavior by setting a different length in your
148 configuration file:: 148 configuration file::
149 149
150 [histedit] 150 [histedit]
151 linelen = 120 # truncate rule lines at 120 characters 151 linelen = 120 # truncate rule lines at 120 characters
152 """ 152 """
404 404
405 def applychanges(ui, repo, ctx, opts): 405 def applychanges(ui, repo, ctx, opts):
406 """Merge changeset from ctx (only) in the current working directory""" 406 """Merge changeset from ctx (only) in the current working directory"""
407 wcpar = repo.dirstate.parents()[0] 407 wcpar = repo.dirstate.parents()[0]
408 if ctx.p1().node() == wcpar: 408 if ctx.p1().node() == wcpar:
409 # edition ar "in place" we do not need to make any merge, 409 # edits are "in place" we do not need to make any merge,
410 # just applies changes on parent for edition 410 # just applies changes on parent for edition
411 cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True) 411 cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True)
412 stats = None 412 stats = None
413 else: 413 else:
414 try: 414 try:
615 return cmdutil.getcommiteditor(edit=True, editform='histedit.mess') 615 return cmdutil.getcommiteditor(edit=True, editform='histedit.mess')
616 616
617 def findoutgoing(ui, repo, remote=None, force=False, opts={}): 617 def findoutgoing(ui, repo, remote=None, force=False, opts={}):
618 """utility function to find the first outgoing changeset 618 """utility function to find the first outgoing changeset
619 619
620 Used by initialisation code""" 620 Used by initialization code"""
621 dest = ui.expandpath(remote or 'default-push', remote or 'default') 621 dest = ui.expandpath(remote or 'default-push', remote or 'default')
622 dest, revs = hg.parseurl(dest, None)[:2] 622 dest, revs = hg.parseurl(dest, None)[:2]
623 ui.status(_('comparing with %s\n') % util.hidepassword(dest)) 623 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
624 624
625 revs, checkout = hg.addbranchrevs(repo, repo, revs, None) 625 revs, checkout = hg.addbranchrevs(repo, repo, revs, None)
1130 lock = repo.lock() 1130 lock = repo.lock()
1131 # do not let filtering get in the way of the cleanse 1131 # do not let filtering get in the way of the cleanse
1132 # we should probably get ride of obsolescence marker created during the 1132 # we should probably get ride of obsolescence marker created during the
1133 # histedit, but we currently do not have such information. 1133 # histedit, but we currently do not have such information.
1134 repo = repo.unfiltered() 1134 repo = repo.unfiltered()
1135 # Find all node that need to be stripped 1135 # Find all nodes that need to be stripped
1136 # (we hg %lr instead of %ln to silently ignore unknown item 1136 # (we use %lr instead of %ln to silently ignore unknown items)
1137 nm = repo.changelog.nodemap 1137 nm = repo.changelog.nodemap
1138 nodes = sorted(n for n in nodes if n in nm) 1138 nodes = sorted(n for n in nodes if n in nm)
1139 roots = [c.node() for c in repo.set("roots(%ln)", nodes)] 1139 roots = [c.node() for c in repo.set("roots(%ln)", nodes)]
1140 for c in roots: 1140 for c in roots:
1141 # We should process node in reverse order to strip tip most first. 1141 # We should process node in reverse order to strip tip most first.