##// END OF EJS Templates
give more info to hgmerge script.
Vadim Gelfer -
r1883:b98160cf default
parent child Browse files
Show More
@@ -4,11 +4,15 b''
4 4 #
5 5 # This tries to find a way to do three-way merge on the current system.
6 6 # The result ought to end up in $1.
7 #
8 # Environment variables set by Mercurial:
9 # HG_ROOT repo root
10 # HG_FILE name of file within repo
11 # HG_MY_NODE revision being merged
12 # HG_OTHER_NODE revision being merged
7 13
8 14 set -e # bail out quickly on failure
9 15
10 echo $1 $2 $3
11
12 16 LOCAL="$1"
13 17 BASE="$2"
14 18 OTHER="$3"
@@ -1636,10 +1636,12 b' class localrepository(object):'
1636 1636 # merge the tricky bits
1637 1637 files = merge.keys()
1638 1638 files.sort()
1639 xp1 = hex(p1)
1640 xp2 = hex(p2)
1639 1641 for f in files:
1640 1642 self.ui.status(_("merging %s\n") % f)
1641 1643 my, other, flag = merge[f]
1642 ret = self.merge3(f, my, other)
1644 ret = self.merge3(f, my, other, xp1, xp2)
1643 1645 if ret:
1644 1646 err = True
1645 1647 util.set_exec(self.wjoin(f), flag)
@@ -1677,7 +1679,7 b' class localrepository(object):'
1677 1679 self.dirstate.setparents(p1, p2)
1678 1680 return err
1679 1681
1680 def merge3(self, fn, my, other):
1682 def merge3(self, fn, my, other, p1, p2):
1681 1683 """perform a 3-way merge in the working directory"""
1682 1684
1683 1685 def temp(prefix, node):
@@ -1700,7 +1702,14 b' class localrepository(object):'
1700 1702
1701 1703 cmd = (os.environ.get("HGMERGE") or self.ui.config("ui", "merge")
1702 1704 or "hgmerge")
1703 r = os.system('%s "%s" "%s" "%s"' % (cmd, a, b, c))
1705 r = util.system('%s "%s" "%s" "%s"' % (cmd, a, b, c),
1706 environ={'HG_ROOT': self.root,
1707 'HG_FILE': fn,
1708 'HG_MY_NODE': p1,
1709 'HG_OTHER_NODE': p2,
1710 'HG_FILE_MY_NODE': hex(my),
1711 'HG_FILE_OTHER_NODE': hex(other),
1712 'HG_FILE_BASE_NODE': hex(base)})
1704 1713 if r:
1705 1714 self.ui.warn(_("merging %s failed!\n") % fn)
1706 1715
General Comments 0
You need to be logged in to leave comments. Login now