Ticket Change Details
Not logged in

Changes to ticket 2aaa8042ca

By dmitry on 2009-11-06 12:27:01. See also: artifact content, and ticket history

    1. Appended to comment:

      dmitry added on 2009-11-06 12:27:01:
      Sorry, forgot to add ?--once? to some commands description. Here's the updated version:

      --- src/sync.c
      +++ src/sync.c
      @@ -67,14 +67,17 @@
       /*
       ** This routine processes the command-line argument for push, pull,
       ** and sync.  If a command-line argument is given, that is the URL
       ** of a server to sync against.  If no argument is given, use the
       ** most recently synced URL.  Remember the current URL for next time.
      +**
      +** If --once option is specified, do not remember URL.
       */
       void process_sync_args(void){
         const char *zUrl = 0;
         int urlOptional = find_option("autourl",0,0)!=0;
      +  int syncOnce = find_option("once",0,0)!=0;
         url_proxy_options();
         db_find_and_open_repository(1);
         if( g.argc==2 ){
           zUrl = db_get("last-sync-url", 0);
         }else if( g.argc==3 ){
      @@ -83,11 +86,13 @@
         if( zUrl==0 ){
           if( urlOptional ) exit(0);
           usage("URL");
         }
         url_parse(zUrl);
      -  db_set("last-sync-url", g.urlIsFile ? g.urlCanonical : zUrl, 0);
      +  if ( syncOnce==0 ) {
      +    db_set("last-sync-url", g.urlIsFile ? g.urlCanonical : zUrl, 0);
      +  }
         user_select();
         if( g.argc==2 ){
           if( g.urlPort!=g.urlDfltPort ){
             printf("Server:    %s://%s:%d%s\n",
                     g.urlProtocol, g.urlName, g.urlPort, g.urlPath);
      @@ -99,16 +104,18 @@
       }
       
       /*
       ** COMMAND: pull
       **
      -** Usage: %fossil pull ?URL? ?-R|--respository REPOSITORY?
      +** Usage: %fossil pull ?URL? ?-R|--respository REPOSITORY? ?--once?
       **
       ** Pull changes from a remote repository into the local repository.
       **
       ** If the URL is not specified, then the URL from the most recent
       ** clone, push, pull, remote-url, or sync command is used.
      +**
      +** If --once option is specified, do not remember URL.
       **
       ** See also: clone, push, sync, remote-url
       */
       void pull_cmd(void){
         process_sync_args();
      @@ -116,16 +123,18 @@
       }
       
       /*
       ** COMMAND: push
       **
      -** Usage: %fossil push ?URL? ?-R|--repository REPOSITORY?
      +** Usage: %fossil push ?URL? ?-R|--repository REPOSITORY? ?--once?
       **
       ** Push changes in the local repository over into a remote repository.
       **
       ** If the URL is not specified, then the URL from the most recent
       ** clone, push, pull, remote-url, or sync command is used.
      +**
      +** If --once option is specified, do not remember URL.
       **
       ** See also: clone, pull, sync, remote-url
       */
       void push_cmd(void){
         process_sync_args();
      @@ -134,11 +143,11 @@
       
       
       /*
       ** COMMAND: sync
       **
      -** Usage: %fossil sync ?URL? ?-R|--repository REPOSITORY?
      +** Usage: %fossil sync ?URL? ?-R|--repository REPOSITORY? ?--once?
       **
       ** Synchronize the local repository with a remote repository.  This is
       ** the equivalent of running both "push" and "pull" at the same time.
       **
       ** If a user-id and password are required, specify them as follows:
      @@ -145,10 +154,12 @@
       **
       **     http://userid:password@www.domain.com:1234/path
       **
       ** If the URL is not specified, then the URL from the most recent successful
       ** clone, push, pull, remote-url, or sync command is used.
      +**
      +** If --once option is specified, do not remember URL.
       **
       ** See also:  clone, push, pull, remote-url
       */
       void sync_cmd(void){
         process_sync_args();
      
      
    2. Change resolution to "Open"