##// END OF EJS Templates
pr-shadow: Use reference object to store the last merge reference of a PR. #1055
Martin Bornhold -
r1049:977e010e default
parent child Browse files
Show More
@@ -3033,6 +3033,7 b' class _PullRequestBase(BaseModel):'
3033 3033 nullable=False)
3034 3034
3035 3035 target_ref = Column('other_ref', Unicode(255), nullable=False)
3036 _shadow_merge_ref = Column('shadow_merge_ref', Unicode(255), nullable=True)
3036 3037
3037 3038 # TODO: dan: rename column to last_merge_source_rev
3038 3039 _last_merge_source_rev = Column(
@@ -3041,7 +3042,6 b' class _PullRequestBase(BaseModel):'
3041 3042 _last_merge_target_rev = Column(
3042 3043 'last_merge_other_rev', String(40), nullable=True)
3043 3044 _last_merge_status = Column('merge_status', Integer(), nullable=True)
3044 last_merge_rev = Column('last_merge_rev', String(40), nullable=True)
3045 3045 merge_rev = Column('merge_rev', String(40), nullable=True)
3046 3046
3047 3047 @hybrid_property
@@ -3076,6 +3076,14 b' class _PullRequestBase(BaseModel):'
3076 3076 def target_ref_parts(self):
3077 3077 return self.unicode_to_reference(self.target_ref)
3078 3078
3079 @property
3080 def shadow_merge_ref(self):
3081 return self.unicode_to_reference(self._shadow_merge_ref)
3082
3083 @shadow_merge_ref.setter
3084 def shadow_merge_ref(self, ref):
3085 self._shadow_merge_ref = self.reference_to_unicode(ref)
3086
3079 3087 def unicode_to_reference(self, raw):
3080 3088 """
3081 3089 Convert a unicode (or string) to a reference object.
General Comments 0
You need to be logged in to leave comments. Login now