##// END OF EJS Templates
trydiff: simplify checking for additions...
Martin von Zweigbergk -
r23663:a9853fc1 default
parent child Browse files
Show More
@@ -1796,6 +1796,12 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1796 1796 revs = None
1797 1797
1798 1798 modifiedset, addedset, removedset = set(modified), set(added), set(removed)
1799 # Fix up modified and added, since merged-in additions appear as
1800 # modifications during merges
1801 for f in modifiedset.copy():
1802 if f not in ctx1:
1803 addedset.add(f)
1804 modifiedset.remove(f)
1799 1805 for f in sorted(modified + added + removed):
1800 1806 to = None
1801 1807 tn = None
@@ -1807,7 +1813,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1807 1813 tn = getfilectx(f, ctx2).data()
1808 1814 a, b = f, f
1809 1815 if opts.git or losedatafn:
1810 if f in addedset or (f in modifiedset and to is None):
1816 if f in addedset:
1811 1817 mode = gitmode[ctx2.flags(f)]
1812 1818 if f in copy or f in copyto:
1813 1819 if opts.git:
@@ -1843,7 +1849,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1843 1849 if not opts.git and not tn:
1844 1850 # regular diffs cannot represent new empty file
1845 1851 losedatafn(f)
1846 elif f in removedset or (f in modifiedset and tn is None):
1852 elif f in removedset:
1847 1853 if opts.git:
1848 1854 # have we already reported a copy above?
1849 1855 if ((f in copy and copy[f] in addedset
@@ -238,12 +238,6 b' ensure that we have a merge with unresol'
238 238 diff --git a/b/b b/b.rename/b
239 239 rename from b/b
240 240 rename to b.rename/b
241 diff --git a/b/b b/b/b
242 deleted file mode 100644
243 --- a/b/b
244 +++ /dev/null
245 @@ -1,1 +0,0 @@
246 -b
247 241 diff --git a/c b/c.copy
248 242 copy from c
249 243 copy to c.copy
General Comments 0
You need to be logged in to leave comments. Login now