Browse Source

unscrew --delete by merging it into the config file. merge --expunge as

well for symmetry.
wip/ssl-fprint
Oswald Buddenhagen 21 years ago
parent
commit
af8c4396fe
  1. 4
      src/compat/config.c
  2. 7
      src/compat/isync.1
  3. 2
      src/compat/isync.h
  4. 12
      src/compat/main.c

4
src/compat/config.c

@ -307,9 +307,9 @@ write_channel_parm( FILE *fp, config_t *cfg )
fprintf( fp, "MaxSize %d\n", cfg->max_size ); fprintf( fp, "MaxSize %d\n", cfg->max_size );
if (cfg->max_messages) if (cfg->max_messages)
fprintf( fp, "MaxMessages %d\n", cfg->max_messages ); fprintf( fp, "MaxMessages %d\n", cfg->max_messages );
if (!cfg->delete) if (!cfg->delete && !delete)
fputs( "Sync New ReNew Flags\n", fp ); fputs( "Sync New ReNew Flags\n", fp );
if (cfg->expunge) if (cfg->expunge || expunge)
fputs( "Expunge Both\n", fp ); fputs( "Expunge Both\n", fp );
fputc( '\n', fp ); fputc( '\n', fp );
} }

7
src/compat/isync.1

@ -18,7 +18,7 @@
\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\" \"
.. ..
.TH isync 1 "2004 Mar 27" .TH isync 1 "2004 Mar 29"
.. ..
.SH NAME .SH NAME
isync - synchronize IMAP4 and Maildir mailboxes isync - synchronize IMAP4 and Maildir mailboxes
@ -123,8 +123,9 @@ Enable printing of \fIdebug\fR messages.
\fB-w\fR, \fB--write\fR \fB-w\fR, \fB--write\fR
Don't run \fBmbsync\fR, but instead write a permanent config file for it. Don't run \fBmbsync\fR, but instead write a permanent config file for it.
The UID mappings of all configured mailboxes will be migrated. The UID mappings of all configured mailboxes will be migrated.
Note that some command line options that would affect an actual sync operation Note that most command line options that would affect an actual sync operation
will be incorporated into the new config file as well. will be incorporated into the new config file as well; exceptions are
--fast and --create[-remote|-local].
The name of the new config file is determined by replacing the last occurrence The name of the new config file is determined by replacing the last occurrence
of "isync" with "mbsync", or appending ".mbsync" if "isync" was not found. of "isync" with "mbsync", or appending ".mbsync" if "isync" was not found.
.TP .TP

2
src/compat/isync.h

@ -78,7 +78,7 @@ extern const char *Home;
extern config_t global, *boxes; extern config_t global, *boxes;
extern const char *maildir, *xmaildir, *folder, *inbox; extern const char *maildir, *xmaildir, *folder, *inbox;
extern int o2o, altmap; extern int o2o, altmap, delete, expunge;
/* config.c */ /* config.c */
void load_config( const char *, config_t *** ); void load_config( const char *, config_t *** );

12
src/compat/main.c

@ -138,8 +138,6 @@ add_arg( char ***args, const char *arg )
(*args)[nu + 1] = 0; (*args)[nu + 1] = 0;
} }
#define OP_EXPUNGE (1<<0)
#define OP_DELETE (1<<1)
#define OP_FAST (1<<2) #define OP_FAST (1<<2)
#define OP_CREATE_REMOTE (1<<3) #define OP_CREATE_REMOTE (1<<3)
#define OP_CREATE_LOCAL (1<<4) #define OP_CREATE_LOCAL (1<<4)
@ -147,7 +145,7 @@ add_arg( char ***args, const char *arg )
int Quiet, Verbose, Debug; int Quiet, Verbose, Debug;
config_t global, *boxes; config_t global, *boxes;
const char *maildir, *xmaildir, *folder, *inbox; const char *maildir, *xmaildir, *folder, *inbox;
int o2o, altmap; int o2o, altmap, delete, expunge;
const char *Home; const char *Home;
@ -216,10 +214,10 @@ main( int argc, char **argv )
config = optarg; config = optarg;
break; break;
case 'd': case 'd':
ops |= OP_DELETE; delete = 1;
break; break;
case 'e': case 'e':
ops |= OP_EXPUNGE; expunge = 1;
break; break;
case 'f': case 'f':
ops |= OP_FAST; ops |= OP_FAST;
@ -395,14 +393,10 @@ main( int argc, char **argv )
add_arg( &args, path2 ); add_arg( &args, path2 );
if (ops & OP_FAST) if (ops & OP_FAST)
add_arg( &args, "-Ln" ); add_arg( &args, "-Ln" );
else if (!(ops & OP_DELETE))
add_arg( &args, "-nNf" );
if (ops & OP_CREATE_REMOTE) if (ops & OP_CREATE_REMOTE)
add_arg( &args, "-Cm" ); add_arg( &args, "-Cm" );
if (ops & OP_CREATE_LOCAL) if (ops & OP_CREATE_LOCAL)
add_arg( &args, "-Cs" ); add_arg( &args, "-Cs" );
if (ops & OP_EXPUNGE)
add_arg( &args, "-X" );
if (list) if (list)
add_arg( &args, "-l" ); add_arg( &args, "-l" );
if (o2o) { if (o2o) {

Loading…
Cancel
Save