Changeset View
Changeset View
Standalone View
Standalone View
mercurial/dirstate.py
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Line(s) | def setparents(self, p1, p2=None): | ||||
if source: | if source: | ||||
copies[f] = source | copies[f] = source | ||||
self._normallookup(f) | self._normallookup(f) | ||||
# Also fix up otherparent markers | # Also fix up otherparent markers | ||||
elif s.from_p2: | elif s.from_p2: | ||||
source = self._map.copymap.get(f) | source = self._map.copymap.get(f) | ||||
if source: | if source: | ||||
copies[f] = source | copies[f] = source | ||||
self._add(f) | self._check_new_tracked_filename(f) | ||||
self._updatedfiles.add(f) | |||||
self._map.reset_state( | |||||
f, | |||||
p1_tracked=False, | |||||
wc_tracked=True, | |||||
) | |||||
return copies | return copies | ||||
def setbranch(self, branch): | def setbranch(self, branch): | ||||
self.__class__._branch.set(self, encoding.fromlocal(branch)) | self.__class__._branch.set(self, encoding.fromlocal(branch)) | ||||
f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) | f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) | ||||
try: | try: | ||||
f.write(self._branch + b'\n') | f.write(self._branch + b'\n') | ||||
f.close() | f.close() | ||||
▲ Show 20 Lines • Show All 1196 Lines • Show Last 20 Lines |