comparison mercurial/cmdutil.py @ 24180:d8e0c591781c

spelling: fixes from proofreading of spell checker issues
author Mads Kiilerich <madski@unity3d.com>
date Sun, 18 Jan 2015 02:38:57 +0100
parents 67952dc7a88f
children e0c1328df872
comparison
equal deleted inserted replaced
24179:14d647d25c70 24180:d8e0c591781c
108 except IOError, inst: 108 except IOError, inst:
109 raise util.Abort(_("can't read commit message '%s': %s") % 109 raise util.Abort(_("can't read commit message '%s': %s") %
110 (logfile, inst.strerror)) 110 (logfile, inst.strerror))
111 return message 111 return message
112 112
113 def mergeeditform(ctxorbool, baseform): 113 def mergeeditform(ctxorbool, baseformname):
114 """build appropriate editform from ctxorbool and baseform 114 """return appropriate editform name (referencing a committemplate)
115 115
116 'ctxorbool' is one of a ctx to be committed, or a bool whether 116 'ctxorbool' is either a ctx to be committed, or a bool indicating whether
117 merging is committed. 117 merging is committed.
118 118
119 This returns editform 'baseform' with '.merge' if merging is 119 This returns baseformname with '.merge' appended if it is a merge,
120 committed, or one with '.normal' suffix otherwise. 120 otherwise '.normal' is appended.
121 """ 121 """
122 if isinstance(ctxorbool, bool): 122 if isinstance(ctxorbool, bool):
123 if ctxorbool: 123 if ctxorbool:
124 return baseform + ".merge" 124 return baseformname + ".merge"
125 elif 1 < len(ctxorbool.parents()): 125 elif 1 < len(ctxorbool.parents()):
126 return baseform + ".merge" 126 return baseformname + ".merge"
127 127
128 return baseform + ".normal" 128 return baseformname + ".normal"
129 129
130 def getcommiteditor(edit=False, finishdesc=None, extramsg=None, 130 def getcommiteditor(edit=False, finishdesc=None, extramsg=None,
131 editform='', **opts): 131 editform='', **opts):
132 """get appropriate commit message editor according to '--edit' option 132 """get appropriate commit message editor according to '--edit' option
133 133
2598 2598
2599 # determine the exact nature of the deleted changesets 2599 # determine the exact nature of the deleted changesets
2600 deladded = _deleted - smf 2600 deladded = _deleted - smf
2601 deleted = _deleted - deladded 2601 deleted = _deleted - deladded
2602 2602
2603 # We need to account for the state of file in the dirstate. 2603 # We need to account for the state of the file in the dirstate,
2604 # 2604 # even when we revert against something else than parent. This will
2605 # Even, when we revert against something else than parent. This will
2606 # slightly alter the behavior of revert (doing back up or not, delete 2605 # slightly alter the behavior of revert (doing back up or not, delete
2607 # or just forget etc). 2606 # or just forget etc).
2608 if parent == node: 2607 if parent == node:
2609 dsmodified = modified 2608 dsmodified = modified
2610 dsadded = added 2609 dsadded = added