##// END OF EJS Templates
merges: fixed excessive data saved in merge metadata that could not fit inside the DB table....
milka -
r4628:a7083868 stable
parent child Browse files
Show More
@@ -765,7 +765,14 b' class MercurialRepository(BaseRepository'
765
765
766 try:
766 try:
767 if target_ref.type == 'branch' and len(self._heads(target_ref.name)) != 1:
767 if target_ref.type == 'branch' and len(self._heads(target_ref.name)) != 1:
768 heads = '\n,'.join(self._heads(target_ref.name))
768 heads_all = self._heads(target_ref.name)
769 max_heads = 10
770 if len(heads_all) > max_heads:
771 heads = '\n,'.join(
772 heads_all[:max_heads] +
773 ['and {} more.'.format(len(heads_all)-max_heads)])
774 else:
775 heads = '\n,'.join(heads_all)
769 metadata = {
776 metadata = {
770 'target_ref': target_ref,
777 'target_ref': target_ref,
771 'source_ref': source_ref,
778 'source_ref': source_ref,
@@ -854,7 +861,16 b' class MercurialRepository(BaseRepository'
854 except RepositoryError as e:
861 except RepositoryError as e:
855 log.exception('Failure when doing local merge on hg shadow repo')
862 log.exception('Failure when doing local merge on hg shadow repo')
856 if isinstance(e, UnresolvedFilesInRepo):
863 if isinstance(e, UnresolvedFilesInRepo):
857 metadata['unresolved_files'] = '\n* conflict: ' + ('\n * conflict: '.join(e.args[0]))
864 all_conflicts = list(e.args[0])
865 max_conflicts = 20
866 if len(all_conflicts) > max_conflicts:
867 conflicts = all_conflicts[:max_conflicts] \
868 + ['and {} more.'.format(len(all_conflicts)-max_conflicts)]
869 else:
870 conflicts = all_conflicts
871 metadata['unresolved_files'] = \
872 '\n* conflict: ' + \
873 ('\n * conflict: '.join(conflicts))
858
874
859 merge_possible = False
875 merge_possible = False
860 merge_failure_reason = MergeFailureReason.MERGE_FAILED
876 merge_failure_reason = MergeFailureReason.MERGE_FAILED
General Comments 0
You need to be logged in to leave comments. Login now