comparison mercurial/commands.py @ 5482:e5eedd74e70f

Use both the from and to name in mdiff.unidiff. This fixes a compatibility issue with git diffs. * * *
author Dustin Sallings <dustin@spy.net>
date Thu, 01 Nov 2007 12:17:59 -0700
parents 8feb33c2d153
children dcbda0c4c3eb
comparison
equal deleted inserted replaced
5481:003d1f174fe1 5482:e5eedd74e70f
871 ui.status(_("Checking patch...\n")) 871 ui.status(_("Checking patch...\n"))
872 patchproblems = 0 872 patchproblems = 0
873 a = "1\n2\n3\n4\n" 873 a = "1\n2\n3\n4\n"
874 b = "1\n2\n3\ninsert\n4\n" 874 b = "1\n2\n3\ninsert\n4\n"
875 fa = writetemp(a) 875 fa = writetemp(a)
876 d = mdiff.unidiff(a, None, b, None, os.path.basename(fa)) 876 d = mdiff.unidiff(a, None, b, None, os.path.basename(fa),
877 os.path.basename(fa))
877 fd = writetemp(d) 878 fd = writetemp(d)
878 879
879 files = {} 880 files = {}
880 try: 881 try:
881 patch.patch(fd, ui, cwd=os.path.dirname(fa), files=files) 882 patch.patch(fd, ui, cwd=os.path.dirname(fa), files=files)