equal
deleted
inserted
replaced
1150 for l in chunk(zlib.compress(tn)): |
1150 for l in chunk(zlib.compress(tn)): |
1151 ret.append(fmtline(l)) |
1151 ret.append(fmtline(l)) |
1152 ret.append('\n') |
1152 ret.append('\n') |
1153 return ''.join(ret) |
1153 return ''.join(ret) |
1154 |
1154 |
1155 def diff(repo, node1=None, node2=None, files=None, match=util.always, |
1155 def diff(repo, node1=None, node2=None, match=None, |
1156 fp=None, changes=None, opts=None): |
1156 fp=None, changes=None, opts=None): |
1157 '''print diff of changes to files between two nodes, or node and |
1157 '''print diff of changes to files between two nodes, or node and |
1158 working directory. |
1158 working directory. |
1159 |
1159 |
1160 if node1 is None, use first dirstate parent instead. |
1160 if node1 is None, use first dirstate parent instead. |
1161 if node2 is None, compare node1 with working directory.''' |
1161 if node2 is None, compare node1 with working directory.''' |
|
1162 |
|
1163 if not match: |
|
1164 match = cmdutil.matchall(repo) |
1162 |
1165 |
1163 if opts is None: |
1166 if opts is None: |
1164 opts = mdiff.defaultopts |
1167 opts = mdiff.defaultopts |
1165 if fp is None: |
1168 if fp is None: |
1166 fp = repo.ui |
1169 fp = repo.ui |
1181 # force manifest reading |
1184 # force manifest reading |
1182 man1 = ctx1.manifest() |
1185 man1 = ctx1.manifest() |
1183 date1 = util.datestr(ctx1.date()) |
1186 date1 = util.datestr(ctx1.date()) |
1184 |
1187 |
1185 if not changes: |
1188 if not changes: |
1186 changes = repo.status(node1, node2, files, match=match)[:5] |
1189 changes = repo.status(node1, node2, files=match.files(), match=match)[:5] |
1187 modified, added, removed, deleted, unknown = changes |
1190 modified, added, removed, deleted, unknown = changes |
1188 |
1191 |
1189 if not modified and not added and not removed: |
1192 if not modified and not added and not removed: |
1190 return |
1193 return |
1191 |
1194 |