equal
deleted
inserted
replaced
361 self._dirty = True |
361 self._dirty = True |
362 |
362 |
363 def unresolved(self): |
363 def unresolved(self): |
364 """Obtain the paths of unresolved files.""" |
364 """Obtain the paths of unresolved files.""" |
365 |
365 |
366 for f, entry in pycompat.iteritems(self._state): |
366 for f, entry in self._state.items(): |
367 if entry[0] in ( |
367 if entry[0] in ( |
368 MERGE_RECORD_UNRESOLVED, |
368 MERGE_RECORD_UNRESOLVED, |
369 MERGE_RECORD_UNRESOLVED_PATH, |
369 MERGE_RECORD_UNRESOLVED_PATH, |
370 ): |
370 ): |
371 yield f |
371 yield f |
488 ACTION_FORGET: [], |
488 ACTION_FORGET: [], |
489 ACTION_ADD: [], |
489 ACTION_ADD: [], |
490 ACTION_ADD_MODIFIED: [], |
490 ACTION_ADD_MODIFIED: [], |
491 ACTION_GET: [], |
491 ACTION_GET: [], |
492 } |
492 } |
493 for f, (r, action) in pycompat.iteritems(self._results): |
493 for f, (r, action) in self._results.items(): |
494 if action is not None: |
494 if action is not None: |
495 actions[action].append((f, None, b"merge result")) |
495 actions[action].append((f, None, b"merge result")) |
496 return actions |
496 return actions |
497 |
497 |
498 |
498 |
688 # Write out state items. In all cases, the value of the state map entry |
688 # Write out state items. In all cases, the value of the state map entry |
689 # is written as the contents of the record. The record type depends on |
689 # is written as the contents of the record. The record type depends on |
690 # the type of state that is stored, and capital-letter records are used |
690 # the type of state that is stored, and capital-letter records are used |
691 # to prevent older versions of Mercurial that do not support the feature |
691 # to prevent older versions of Mercurial that do not support the feature |
692 # from loading them. |
692 # from loading them. |
693 for filename, v in pycompat.iteritems(self._state): |
693 for filename, v in self._state.items(): |
694 if v[0] in ( |
694 if v[0] in ( |
695 MERGE_RECORD_UNRESOLVED_PATH, |
695 MERGE_RECORD_UNRESOLVED_PATH, |
696 MERGE_RECORD_RESOLVED_PATH, |
696 MERGE_RECORD_RESOLVED_PATH, |
697 ): |
697 ): |
698 # Path conflicts. These are stored in 'P' records. The current |
698 # Path conflicts. These are stored in 'P' records. The current |
712 (RECORD_CHANGEDELETE_CONFLICT, b'\0'.join([filename] + v)) |
712 (RECORD_CHANGEDELETE_CONFLICT, b'\0'.join([filename] + v)) |
713 ) |
713 ) |
714 else: |
714 else: |
715 # Normal files. These are stored in 'F' records. |
715 # Normal files. These are stored in 'F' records. |
716 records.append((RECORD_MERGED, b'\0'.join([filename] + v))) |
716 records.append((RECORD_MERGED, b'\0'.join([filename] + v))) |
717 for filename, extras in sorted(pycompat.iteritems(self._stateextras)): |
717 for filename, extras in sorted(self._stateextras.items()): |
718 rawextras = b'\0'.join( |
718 rawextras = b'\0'.join( |
719 b'%s\0%s' % (k, v) for k, v in pycompat.iteritems(extras) |
719 b'%s\0%s' % (k, v) for k, v in extras.items() |
720 ) |
720 ) |
721 records.append( |
721 records.append( |
722 (RECORD_FILE_VALUES, b'%s\0%s' % (filename, rawextras)) |
722 (RECORD_FILE_VALUES, b'%s\0%s' % (filename, rawextras)) |
723 ) |
723 ) |
724 if self._labels is not None: |
724 if self._labels is not None: |