##// END OF EJS Templates
mq: record more data in patchheader class (no behavior changes)...
Steve Borho -
r13229:f3058dd0 default
parent child Browse files
Show More
@@ -86,6 +86,8 b' class patchheader(object):'
86 parent = None
86 parent = None
87 format = None
87 format = None
88 subject = None
88 subject = None
89 branch = None
90 nodeid = None
89 diffstart = 0
91 diffstart = 0
90
92
91 for line in file(pf):
93 for line in file(pf):
@@ -106,6 +108,10 b' class patchheader(object):'
106 date = line[7:]
108 date = line[7:]
107 elif line.startswith("# Parent "):
109 elif line.startswith("# Parent "):
108 parent = line[9:]
110 parent = line[9:]
111 elif line.startswith("# Branch "):
112 branch = line[9:]
113 elif line.startswith("# Node ID "):
114 nodeid = line[10:]
109 elif not line.startswith("# ") and line:
115 elif not line.startswith("# ") and line:
110 message.append(line)
116 message.append(line)
111 format = None
117 format = None
@@ -134,6 +140,9 b' class patchheader(object):'
134
140
135 eatdiff(message)
141 eatdiff(message)
136 eatdiff(comments)
142 eatdiff(comments)
143 # Remember the exact starting line of the patch diffs before consuming
144 # empty lines, for external use by TortoiseHg and others
145 self.diffstartline = len(comments)
137 eatempty(message)
146 eatempty(message)
138 eatempty(comments)
147 eatempty(comments)
139
148
@@ -147,6 +156,9 b' class patchheader(object):'
147 self.user = user
156 self.user = user
148 self.date = date
157 self.date = date
149 self.parent = parent
158 self.parent = parent
159 # nodeid and branch are for external use by TortoiseHg and others
160 self.nodeid = nodeid
161 self.branch = branch
150 self.haspatch = diffstart > 1
162 self.haspatch = diffstart > 1
151 self.plainmode = plainmode
163 self.plainmode = plainmode
152
164
General Comments 0
You need to be logged in to leave comments. Login now