##// END OF EJS Templates
dirstate-item: drop the `from_p2` property...
marmoute -
r48962:d71feb05 default
parent child Browse files
Show More
@@ -322,16 +322,6 b' class DirstateItem(object):'
322 return self._wc_tracked and self._p1_tracked and self._p2_info
322 return self._wc_tracked and self._p1_tracked and self._p2_info
323
323
324 @property
324 @property
325 def from_p2(self):
326 """True if the file have been fetched from p2 during the current merge
327
328 This is only True is the file is currently tracked.
329
330 Should only be set if a merge is in progress in the dirstate
331 """
332 return self._wc_tracked and (not self._p1_tracked) and self._p2_info
333
334 @property
335 def removed(self):
325 def removed(self):
336 """True if the file has been removed"""
326 """True if the file has been removed"""
337 return not self._wc_tracked and (self._p1_tracked or self._p2_info)
327 return not self._wc_tracked and (self._p1_tracked or self._p2_info)
@@ -178,11 +178,6 b' impl DirstateEntry {'
178 self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent()
178 self.flags.contains(Flags::WDIR_TRACKED) && !self.in_either_parent()
179 }
179 }
180
180
181 pub fn from_p2(&self) -> bool {
182 self.flags.contains(Flags::WDIR_TRACKED | Flags::P2_INFO)
183 && !self.flags.contains(Flags::P1_TRACKED)
184 }
185
186 pub fn maybe_clean(&self) -> bool {
181 pub fn maybe_clean(&self) -> bool {
187 if !self.flags.contains(Flags::WDIR_TRACKED) {
182 if !self.flags.contains(Flags::WDIR_TRACKED) {
188 false
183 false
@@ -93,11 +93,6 b' py_class!(pub class DirstateItem |py| {'
93 }
93 }
94
94
95 @property
95 @property
96 def from_p2(&self) -> PyResult<bool> {
97 Ok(self.entry(py).get().from_p2())
98 }
99
100 @property
101 def maybe_clean(&self) -> PyResult<bool> {
96 def maybe_clean(&self) -> PyResult<bool> {
102 Ok(self.entry(py).get().maybe_clean())
97 Ok(self.entry(py).get().maybe_clean())
103 }
98 }
General Comments 0
You need to be logged in to leave comments. Login now