##// END OF EJS Templates
store: use boolean property for upgrade's matchrevlog
marmoute -
r51396:aede5746 default
parent child Browse files
Show More
@@ -105,18 +105,18 b' UPGRADE_ALL_REVLOGS = frozenset('
105 )
105 )
106
106
107
107
108 def matchrevlog(revlogfilter, rl_type):
108 def matchrevlog(revlogfilter, entry):
109 """check if a revlog is selected for cloning.
109 """check if a revlog is selected for cloning.
110
110
111 In other words, are there any updates which need to be done on revlog
111 In other words, are there any updates which need to be done on revlog
112 or it can be blindly copied.
112 or it can be blindly copied.
113
113
114 The store entry is checked against the passed filter"""
114 The store entry is checked against the passed filter"""
115 if rl_type & store.FILEFLAGS_CHANGELOG:
115 if entry.is_changelog:
116 return UPGRADE_CHANGELOG in revlogfilter
116 return UPGRADE_CHANGELOG in revlogfilter
117 elif rl_type & store.FILEFLAGS_MANIFESTLOG:
117 elif entry.is_manifestlog:
118 return UPGRADE_MANIFEST in revlogfilter
118 return UPGRADE_MANIFEST in revlogfilter
119 assert rl_type & store.FILEFLAGS_FILELOG
119 assert entry.is_filelog
120 return UPGRADE_FILELOGS in revlogfilter
120 return UPGRADE_FILELOGS in revlogfilter
121
121
122
122
@@ -133,7 +133,7 b' def _perform_clone('
133 """returns the new revlog object created"""
133 """returns the new revlog object created"""
134 newrl = None
134 newrl = None
135 revlog_path = entry.main_file_path()
135 revlog_path = entry.main_file_path()
136 if matchrevlog(upgrade_op.revlogs_to_process, entry.revlog_type):
136 if matchrevlog(upgrade_op.revlogs_to_process, entry):
137 ui.note(
137 ui.note(
138 _(b'cloning %d revisions from %s\n')
138 _(b'cloning %d revisions from %s\n')
139 % (len(old_revlog), revlog_path)
139 % (len(old_revlog), revlog_path)
General Comments 0
You need to be logged in to leave comments. Login now