~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/apps/svnsync-vbox/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: main.c $ */
 
1
/* $Id: main.c 33540 2010-10-28 09:27:05Z vboxsync $ */
2
2
/** @file
3
3
 * svnsync tool. Modified by Oracle.
4
4
 */
599
599
/*** Initialization Editor ***/
600
600
 
601
601
/* This editor has the job of creating the initial state for a destination
602
 
 * respository that starts witout history before a certain starting revision.
 
602
 * repository that starts without history before a certain starting revision.
603
603
 * Going the export/import way would lose the versioned properties. Unversioned
604
 
 * properies are dropped, because they don't belong to the initial snapshot.
 
604
 * properties are dropped, because they don't belong to the initial snapshot.
605
605
 *
606
606
 * It needs to create an entire tree in a single commit.
607
607
 */
1194
1194
 
1195
1195
 
1196
1196
 
1197
 
/*** Syncronization Editor ***/
 
1197
/*** Synchronization Editor ***/
1198
1198
 
1199
1199
/* This editor has a couple of jobs.
1200
1200
 *
1971
1971
    }
1972
1972
    else
1973
1973
    {
 
1974
      if (!file_added_this_changeset)
 
1975
      {
 
1976
        svn_node_kind_t nodekind;
 
1977
        /* Verify that the previous source was exported to the destination
 
1978
         * repository. */
 
1979
        SVN_ERR(svn_ra_check_path(eb->to_session_prop,
 
1980
                                  STRIP_LEADING_SLASH(path),
 
1981
                                  SVN_IGNORED_REVNUM, &nodekind, pool));
 
1982
        if (nodekind == svn_node_none || nodekind != svn_node_file)
 
1983
          fb->prev_process = FALSE;
 
1984
      }
 
1985
 
1974
1986
      if (fb->prev_process)
1975
1987
      {
1976
1988
        /* File disappears due to changes to the process settings. */
2196
2208
  }
2197
2209
#endif /* VBOX */
2198
2210
 
2199
 
  /* If we haven't opened the root yet, that means we're transfering
 
2211
  /* If we haven't opened the root yet, that means we're transferring
2200
2212
     an empty revision, probably because we aren't allowed to see the
2201
2213
     contents for some reason.  In any event, we need to open the root
2202
2214
     and close it again, before we can close out the edit, or the
2291
2303
 
2292
2304
/*** `svnsync sync' ***/
2293
2305
 
2294
 
/* Baton for syncronizing the destination repository while locked. */
 
2306
/* Baton for synchronizing the destination repository while locked. */
2295
2307
typedef struct {
2296
2308
  apr_hash_t *config;
2297
2309
  svn_ra_callbacks2_t *callbacks;
2330
2342
 
2331
2343
 
2332
2344
/* Set *FROM_SESSION to an RA session associated with the source
2333
 
 * repository of the syncronization, as determined by reading
 
2345
 * repository of the synchronization, as determined by reading
2334
2346
 * svn:sync- properties from the destination repository (associated
2335
2347
 * with TO_SESSION).  Set LAST_MERGED_REV to the value of the property
2336
 
 * which records the most recently syncronized revision.
 
2348
 * which records the most recently synchronized revision.
2337
2349
*** VBOX
2338
 
 * Set START_REV_STR to the propery which records the starting revision.
 
2350
 * Set START_REV_STR to the properly which records the starting revision.
2339
2351
*** VBOX
2340
2352
 *
2341
2353
 * CALLBACKS is a vtable of RA callbacks to provide when creating
2412
2424
}
2413
2425
 
2414
2426
 
2415
 
/* Syncronize the repository associated with RA session TO_SESSION,
 
2427
/* Synchronize the repository associated with RA session TO_SESSION,
2416
2428
 * using information found in baton B, while the repository is
2417
2429
 * locked.  Implements `with_locked_func_t' interface.
2418
2430
 */
2473
2485
     So, any time that currently-copying is not set, then
2474
2486
     last-merged-rev should be the HEAD revision of the destination
2475
2487
     repository.  That is, if we didn't fall over in the middle of a
2476
 
     previous syncronization, then our destination repository should
2477
 
     have exactly as many revisions in it as we've syncronized.
 
2488
     previous synchronization, then our destination repository should
 
2489
     have exactly as many revisions in it as we've synchronized.
2478
2490
 
2479
2491
     Alternately, if currently-copying *is* set, it must
2480
2492
     be either last-merged-rev or last-merged-rev + 1, and the HEAD