comparison mercurial/hg.py @ 991:b634b15c020b

merge: remove remaining mark bits
author mpm@selenic.com
date Sun, 21 Aug 2005 22:03:36 -0700
parents 5007e0bdeed2
children f859e9cba1b9
comparison
equal deleted inserted replaced
990:5007e0bdeed2 991:b634b15c020b
1615 (short(man), short(m1n), short(m2n))) 1615 (short(man), short(m1n), short(m2n)))
1616 1616
1617 merge = {} 1617 merge = {}
1618 get = {} 1618 get = {}
1619 remove = [] 1619 remove = []
1620 mark = {}
1621 1620
1622 # construct a working dir manifest 1621 # construct a working dir manifest
1623 mw = m1.copy() 1622 mw = m1.copy()
1624 mfw = mf1.copy() 1623 mfw = mf1.copy()
1625 umap = dict.fromkeys(u) 1624 umap = dict.fromkeys(u)
1648 # is the wfile new since m1, and match m2? 1647 # is the wfile new since m1, and match m2?
1649 if f not in m1: 1648 if f not in m1:
1650 t1 = self.wfile(f).read() 1649 t1 = self.wfile(f).read()
1651 t2 = self.file(f).revision(m2[f]) 1650 t2 = self.file(f).revision(m2[f])
1652 if cmp(t1, t2) == 0: 1651 if cmp(t1, t2) == 0:
1653 mark[f] = 1
1654 n = m2[f] 1652 n = m2[f]
1655 del t1, t2 1653 del t1, t2
1656 1654
1657 # are files different? 1655 # are files different?
1658 if n != m2[f]: 1656 if n != m2[f]:
1671 # or are we going back in time? 1669 # or are we going back in time?
1672 elif force or m2[f] != a or (p2 == pa and mw[f] == m1[f]): 1670 elif force or m2[f] != a or (p2 == pa and mw[f] == m1[f]):
1673 self.ui.debug(" remote %s is newer, get\n" % f) 1671 self.ui.debug(" remote %s is newer, get\n" % f)
1674 get[f] = m2[f] 1672 get[f] = m2[f]
1675 s = 1 1673 s = 1
1676 else:
1677 mark[f] = 1
1678 elif f in umap: 1674 elif f in umap:
1679 # this unknown file is the same as the checkout 1675 # this unknown file is the same as the checkout
1680 get[f] = m2[f] 1676 get[f] = m2[f]
1681 1677
1682 if not s and mfw[f] != mf2[f]: 1678 if not s and mfw[f] != mf2[f]:
1687 a, b, c = mfa.get(f, 0), mfw[f], mf2[f] 1683 a, b, c = mfa.get(f, 0), mfw[f], mf2[f]
1688 mode = ((a^b) | (a^c)) ^ a 1684 mode = ((a^b) | (a^c)) ^ a
1689 if mode != b: 1685 if mode != b:
1690 self.ui.debug(" updating permissions for %s\n" % f) 1686 self.ui.debug(" updating permissions for %s\n" % f)
1691 util.set_exec(self.wjoin(f), mode) 1687 util.set_exec(self.wjoin(f), mode)
1692 mark[f] = 1
1693 del m2[f] 1688 del m2[f]
1694 elif f in ma: 1689 elif f in ma:
1695 if n != ma[f]: 1690 if n != ma[f]:
1696 r = "d" 1691 r = "d"
1697 if not force and (linear_path or allow): 1692 if not force and (linear_path or allow):