Mercurial > hg
comparison mercurial/patch.py @ 24023:163e25931f65
trydiff: remove dead branch in diffline()
Since diffline() is never called when 'revs' is empty, it doesn't need
to handle that case.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 16 Jan 2015 15:22:29 -0800 |
parents | da63f557d0dc |
children | a5c7e86a81c1 |
comparison
equal
deleted
inserted
replaced
24022:da63f557d0dc | 24023:163e25931f65 |
---|---|
1753 aprefix = 'a/' | 1753 aprefix = 'a/' |
1754 bprefix = 'b/' | 1754 bprefix = 'b/' |
1755 | 1755 |
1756 def diffline(f, revs): | 1756 def diffline(f, revs): |
1757 if not repo.ui.quiet: | 1757 if not repo.ui.quiet: |
1758 if revs: | 1758 revinfo = ' '.join(["-r %s" % rev for rev in revs]) |
1759 revinfo = ' '.join(["-r %s" % rev for rev in revs]) | 1759 line = 'diff %s %s\n' % (revinfo, f) |
1760 line = 'diff %s %s\n' % (revinfo, f) | |
1761 else: | |
1762 line = 'diff %s\n' % f | |
1763 else: | 1760 else: |
1764 line = '' | 1761 line = '' |
1765 return line | 1762 return line |
1766 | 1763 |
1767 date1 = util.datestr(ctx1.date()) | 1764 date1 = util.datestr(ctx1.date()) |