From 916172ab494c57658317f590ed2292f9d613e09a Mon Sep 17 00:00:00 2001
From: Lennart Poettering
Version +0.2 released; Fixes include: documentation update, --diff output improved, --merge output fixed.
+Version 0.1 released.
@@ -189,6 +193,11 @@ autoconf for source code configuration.Some support for for big endian architectures is included, however, it is incomplete. You're welcome to send me patches.
+If the syrep build system detects Oliver Kurth's xmltoman the man page is +rebuilt. Otherwise the pre-compiled versions shipped with +syrep are used.
+As this package is made with the GNU autotools you should run diff --git a/man/Makefile.am b/man/Makefile.am index ed081db..ca66677 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -34,7 +34,7 @@ xmllint: syrep.1.xml if USE_XMLTOMAN -XMLTOMAN = ~/xmltoman.d/xmltoman +XMLTOMAN = xmltoman #~/xmltoman.d/xmltoman CLEANFILES += $(man_MANS) syrep.1: syrep.1.xml Makefile diff --git a/src/diff.c b/src/diff.c index 5bcbde5..9a87d81 100644 --- a/src/diff.c +++ b/src/diff.c @@ -301,19 +301,25 @@ static int list_cb(DB *ddb, struct syrep_name *name, struct diff_entry *de, void switch (de->action) { case DIFF_COPY: { char d[33]; - char src, dst; + char dst; + int mf; + + if ((mf = get_current_nrecno_by_md(de->repository == cb_info->c1 ? cb_info->c2 : cb_info->c1, + de->repository == cb_info->c1 ? &md1 : &md2, NULL)) < 0) + return -1; if (de->repository == cb_info->c1) { - src = 'A'; dst = 'B'; + dst = 'B'; fhex_md5(md1.digest, d); } else { - src = 'B'; dst = 'A'; + dst = 'A'; fhex_md5(md2.digest, d); } d[32] = 0; + + printf("COPY <%s|%s> TO %c%s\n", d, name->path, dst, mf ? " (LINK POSSIBLE)" : ""); - printf("COPY <%s|%s> FROM %c TO %c\n", d, name->path, src, dst); break; } @@ -333,7 +339,6 @@ static int list_cb(DB *ddb, struct syrep_name *name, struct diff_entry *de, void printf("DELETE <%s|%s> FROM %c\n", d, name->path, rep); break; - } case DIFF_CONFLICT: { diff --git a/src/dump.c b/src/dump.c index c2e555b..289478b 100644 --- a/src/dump.c +++ b/src/dump.c @@ -1,7 +1,5 @@ /* $Id$ */ -/* $Id$ */ - /*** This file is part of syrep. diff --git a/src/merge.c b/src/merge.c index 01e1981..5741d83 100644 --- a/src/merge.c +++ b/src/merge.c @@ -211,7 +211,9 @@ static int copy_phase(DB *ddb, struct syrep_name *name, struct diff_entry *de, v if (f) { char path2[PATH_MAX+1]; snprintf(path2, sizeof(path2), "%s/%s", cb_info->root, name2.path); - fprintf(stderr, "COPY: Linking existing file <%s> to <%s>.\n", name2.path, name->path); + + if (args.verbose_flag) + fprintf(stderr, "COPY: Linking existing file <%s> to <%s>.\n", name2.path, name->path); if (makeprefixpath(path, 0777) < 0) return -1; @@ -229,9 +231,8 @@ static int copy_phase(DB *ddb, struct syrep_name *name, struct diff_entry *de, v if (!access(path2, R_OK)) { if (copy_or_link_file(path2, path, de->action == DIFF_REPLACE) < 0) return -1; - } - - fprintf(stderr, "COPY: Local file <%s> vanished. Snapshot not up to date.\n", name2.path); + } else + fprintf(stderr, "COPY: Local file <%s> vanished. Snapshot not up to date.\n", name2.path); } } else { @@ -242,7 +243,8 @@ static int copy_phase(DB *ddb, struct syrep_name *name, struct diff_entry *de, v return -1; if (k) { - fprintf(stderr, "COPY: Copying file <%s> from patch.\n", name->path); + if (args.verbose_flag) + fprintf(stderr, "COPY: Copying file <%s> from patch.\n", name->path); if (makeprefixpath(path, 0777) < 0) return -1; @@ -250,7 +252,8 @@ static int copy_phase(DB *ddb, struct syrep_name *name, struct diff_entry *de, v if (copy_or_link_file(a, path, de->action == DIFF_REPLACE) < 0) return -1; } else - fprintf(stderr, "COPY: File <%s> is missing.\n", name->path); + if (args.verbose_flag) + fprintf(stderr, "COPY: File <%s> is missing.\n", name->path); } return 0; -- cgit