libvcs.sync.base¶
Foundation for the sync classes. Add your own VCS — or extend libvcs — by
subclassing BaseSync.
Foundational tools to set up a VCS manager in libvcs.sync.
-
class libvcs.sync.base.SyncError¶class libvcs.sync.base.SyncError¶
Bases:
objectAn error encountered during a sync step.
Examples
>>> error = SyncError(step="fetch", message="remote not found") >>> error.step 'fetch' >>> error.message 'remote not found' >>> error.exception is None True
-
class libvcs.sync.base.SyncResult¶class libvcs.sync.base.SyncResult¶
Bases:
objectResult of a repository synchronization.
Examples
>>> result = SyncResult() >>> result.ok True >>> bool(result) True
>>> result = SyncResult() >>> result.add_error(step="fetch", message="remote not found") >>> result.ok False >>> bool(result) False >>> result.errors[0].step 'fetch'
-
class libvcs.sync.base.VCSLocation¶class libvcs.sync.base.VCSLocation¶
Bases:
NamedTupleGeneric VCS Location (URL and optional revision).