equal
deleted
inserted
replaced
12 import match as matchmod |
12 import match as matchmod |
13 import context, repair, graphmod, revset, phases, obsolete, pathutil |
13 import context, repair, graphmod, revset, phases, obsolete, pathutil |
14 import changelog |
14 import changelog |
15 import bookmarks |
15 import bookmarks |
16 import encoding |
16 import encoding |
|
17 import crecord as crecordmod |
17 import lock as lockmod |
18 import lock as lockmod |
18 |
19 |
19 def parsealiases(cmd): |
20 def parsealiases(cmd): |
20 return cmd.lstrip("^").split("|") |
21 return cmd.lstrip("^").split("|") |
21 |
22 |
84 ui.status(_('no changes to record\n')) |
85 ui.status(_('no changes to record\n')) |
85 return 0 |
86 return 0 |
86 |
87 |
87 newandmodifiedfiles = set() |
88 newandmodifiedfiles = set() |
88 for h in chunks: |
89 for h in chunks: |
|
90 iscrecordhunk = isinstance(h, crecordmod.uihunk) |
89 ishunk = isinstance(h, patch.recordhunk) |
91 ishunk = isinstance(h, patch.recordhunk) |
90 isnew = h.filename() in status.added |
92 isnew = h.filename() in status.added |
91 if ishunk and isnew and not h in originalchunks: |
93 if (ishunk or iscrecordhunk) and isnew and not h in originalchunks: |
92 newandmodifiedfiles.add(h.filename()) |
94 newandmodifiedfiles.add(h.filename()) |
93 |
95 |
94 modified = set(status.modified) |
96 modified = set(status.modified) |
95 |
97 |
96 # 2. backup changed files, so we can restore them in the end |
98 # 2. backup changed files, so we can restore them in the end |