Fossil SCM
Removing the 'd' link on the annotate page for lines introduced in a checkin with the parent don't having that file.
Commit
4036b5df51a4be9aae4f433a03c199b6570ce57a
Parent
d5129ae101354e7…
1 file changed
+15
-7
+15
-7
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -1784,17 +1784,25 @@ | ||
| 1784 | 1784 | const char *zUuidFile = db_column_text(&q, 2); |
| 1785 | 1785 | const char *zUuidParentFile = db_column_text(&q, 3); |
| 1786 | 1786 | const char *zDate = db_column_text(&q, 4); |
| 1787 | 1787 | const char *zUser = db_column_text(&q, 5); |
| 1788 | 1788 | if( webLabel ){ |
| 1789 | - zLabel = mprintf( | |
| 1790 | - "<a href='%s/info/%s' %s>%.10s</a> " | |
| 1791 | - "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> " | |
| 1792 | - "%s %9.9s", | |
| 1793 | - g.zTop, zUuid, zInfoTarget, zUuid, | |
| 1794 | - g.zTop, zUuidParentFile, zUuidFile, zDiffTarget, | |
| 1795 | - zDate, zUser); | |
| 1789 | + if (zUuidParentFile) { | |
| 1790 | + zLabel = mprintf( | |
| 1791 | + "<a href='%s/info/%s' %s>%.10s</a> " | |
| 1792 | + "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> " | |
| 1793 | + "%s %9.9s", | |
| 1794 | + g.zTop, zUuid, zInfoTarget, zUuid, | |
| 1795 | + g.zTop, zUuidParentFile, zUuidFile, zDiffTarget, | |
| 1796 | + zDate, zUser); | |
| 1797 | + }else{ | |
| 1798 | + zLabel = mprintf( | |
| 1799 | + "<a href='%s/info/%s' %s>%.10s</a> " | |
| 1800 | + "%s %9.9s", | |
| 1801 | + g.zTop, zUuid, zInfoTarget, zUuid, | |
| 1802 | + zDate, zUser); | |
| 1803 | + } | |
| 1796 | 1804 | }else{ |
| 1797 | 1805 | zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); |
| 1798 | 1806 | } |
| 1799 | 1807 | p->nVers++; |
| 1800 | 1808 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1801 | 1809 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1784,17 +1784,25 @@ | |
| 1784 | const char *zUuidFile = db_column_text(&q, 2); |
| 1785 | const char *zUuidParentFile = db_column_text(&q, 3); |
| 1786 | const char *zDate = db_column_text(&q, 4); |
| 1787 | const char *zUser = db_column_text(&q, 5); |
| 1788 | if( webLabel ){ |
| 1789 | zLabel = mprintf( |
| 1790 | "<a href='%s/info/%s' %s>%.10s</a> " |
| 1791 | "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> " |
| 1792 | "%s %9.9s", |
| 1793 | g.zTop, zUuid, zInfoTarget, zUuid, |
| 1794 | g.zTop, zUuidParentFile, zUuidFile, zDiffTarget, |
| 1795 | zDate, zUser); |
| 1796 | }else{ |
| 1797 | zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); |
| 1798 | } |
| 1799 | p->nVers++; |
| 1800 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1801 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -1784,17 +1784,25 @@ | |
| 1784 | const char *zUuidFile = db_column_text(&q, 2); |
| 1785 | const char *zUuidParentFile = db_column_text(&q, 3); |
| 1786 | const char *zDate = db_column_text(&q, 4); |
| 1787 | const char *zUser = db_column_text(&q, 5); |
| 1788 | if( webLabel ){ |
| 1789 | if (zUuidParentFile) { |
| 1790 | zLabel = mprintf( |
| 1791 | "<a href='%s/info/%s' %s>%.10s</a> " |
| 1792 | "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> " |
| 1793 | "%s %9.9s", |
| 1794 | g.zTop, zUuid, zInfoTarget, zUuid, |
| 1795 | g.zTop, zUuidParentFile, zUuidFile, zDiffTarget, |
| 1796 | zDate, zUser); |
| 1797 | }else{ |
| 1798 | zLabel = mprintf( |
| 1799 | "<a href='%s/info/%s' %s>%.10s</a> " |
| 1800 | "%s %9.9s", |
| 1801 | g.zTop, zUuid, zInfoTarget, zUuid, |
| 1802 | zDate, zUser); |
| 1803 | } |
| 1804 | }else{ |
| 1805 | zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser); |
| 1806 | } |
| 1807 | p->nVers++; |
| 1808 | p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) ); |
| 1809 |