@@ -27,6 +27,24 @@ _Notes on the upcoming release will go here._
2727Python 3.10 reached end-of-life in October 2026. libvcs now requires Python
28283.11 or newer.
2929
30+ #### Sync aborts on dirty checkouts by default (#563 )
31+
32+ {meth}` ~libvcs.sync.git.GitSync.update_repo ` ,
33+ {meth}` ~libvcs.sync.hg.HgSync.update_repo ` , and
34+ {meth}` ~libvcs.sync.svn.SvnSync.update_repo ` now default to
35+ ` SyncPolicy(drift="follow", dirty="abort") ` and record a ` "dirty" ` error instead
36+ of updating over uncommitted changes. Pass ` SyncPolicy(dirty="preserve") ` to
37+ retain recoverable changes or ` SyncPolicy(dirty="discard") ` to remove ordinary
38+ local modifications explicitly.
39+
40+ ``` python
41+ # Before
42+ result = repo.update_repo()
43+
44+ # After
45+ result = repo.update_repo(policy = SyncPolicy(dirty = " preserve" ))
46+ ```
47+
3048#### Sync constructors take typed backend options (#562 )
3149
3250Backend-specific sync constructor arguments move into frozen
@@ -55,6 +73,88 @@ repo = GitSync(
5573
5674### What's new
5775
76+ #### Subversion retains complete working copies for recovery (#563 )
77+
78+ Explicit preservation in {meth}` ~libvcs.sync.svn.SvnSync.update_repo ` uses
79+ native update or switch and retains a complete working copy, including
80+ schedules, binary properties, unknown files, and ignored files.
81+ Missing paths stay absent only when their complete native and physical scope
82+ is unchanged. Conflicts and failed inspection retain their recovery token.
83+ {meth}` ~libvcs.sync.svn.SvnSync.recover_changes ` creates independent copies
84+ offline; {meth}` ~libvcs.sync.svn.SvnSync.list_recoveries ` reports interrupted
85+ operations, and {meth}` ~libvcs.sync.svn.SvnSync.release_changes ` releases
86+ verified copies. Recovery and release work after the original checkout is
87+ deleted or replaced.
88+
89+ SVN targets accept ` rev ` ; the configured repository URL controls switching.
90+ Branch, tag, commit, and remote selectors are rejected. Preservation requires
91+ POSIX and SVN working-copy format 31. It rejects externals, nested repositories,
92+ and linked administrative storage. Callers must stop external editors and native
93+ writers.
94+
95+ #### Mercurial remotes keep fetch and push separate (#563 )
96+
97+ ` create_project(vcs="hg", remotes=...) ` forwards configured Mercurial paths
98+ through the same factory used by configuration consumers.
99+
100+ {class}` ~libvcs.sync.hg.HgRemote ` and ` HgSync(remotes=...) ` expose native
101+ ` [paths] ` aliases with separate fetch and push URLs. ` SyncTarget(remote=...) `
102+ chooses where to pull without changing unrelated push destinations. Configured
103+ aliases update atomically during following syncs; keep, warn, and dirty-abort
104+ preflight leave native configuration unchanged. Comments and includes survive
105+ updates, and equivalent relative or environment-expanded paths do not rewrite
106+ the file. See {doc}` sync/hg ` .
107+
108+ #### Shared checkout targets and recovery outcomes (#563 )
109+
110+ {class}` ~libvcs.sync.base.SyncTarget ` selects one branch, tag, commit, or
111+ revision. {class}` ~libvcs.sync.base.SyncPolicy ` keeps configured-target drift
112+ separate from local-change handling and defaults to ` dirty="abort" ` .
113+ {class}` ~libvcs.sync.base.SyncResult ` reports update and preservation outcomes,
114+ conflicts, and retained recovery tokens independently.
115+
116+ #### Mercurial retains shelves for independent recovery (#563 )
117+
118+ Explicit ` SyncPolicy(dirty="preserve") ` in
119+ {meth}` ~libvcs.sync.hg.HgSync.update_repo ` retains native shelves in private
120+ storage, including added, removed, modified, and unknown files. Missing files
121+ retain their unscheduled state; upstream changes to a missing path report a
122+ conflict. Native unshelve conflicts keep their recovery token and caller-owned
123+ backups. {meth}` ~libvcs.sync.hg.HgSync.recover_changes ` restores the original
124+ branch, bookmark, and native status in a separate checkout using retained local
125+ history, without remote access. {meth}` ~libvcs.sync.hg.HgSync.list_recoveries `
126+ exposes interrupted saves and damaged records;
127+ {meth}` ~libvcs.sync.hg.HgSync.release_changes ` removes only verified owned
128+ shelf artifacts.
129+
130+ #### Mercurial clone applies transport and revision selection (#563 )
131+
132+ {class}` ~libvcs.sync.hg.HgSync ` strips the ` hg+ ` adapter prefix before invoking
133+ Mercurial and applies the constructor's ` rev ` when checking out a new clone.
134+ An explicit ` update_repo(target=...) ` overrides that revision. A new checkout
135+ starts at its configured target before keep or warn policy applies.
136+
137+ #### Git retains dirty changes for independent recovery (#563 )
138+
139+ Explicit ` SyncPolicy(dirty="preserve") ` in
140+ {meth}` ~libvcs.sync.git.GitSync.update_repo ` retains staged, unstaged, and
141+ untracked changes in an owned stash and applies them with the index after a
142+ fast-forward update. Conflicts and failed updates retain a recovery token.
143+ {meth}` ~libvcs.sync.git.GitSync.list_recoveries ` finds interrupted saves;
144+ {meth}` ~libvcs.sync.git.GitSync.recover_changes ` creates a separate
145+ original-base checkout from local Git objects;
146+ {meth}` ~libvcs.sync.git.GitSync.release_changes ` removes owned material.
147+ Recovery requires those local objects and never fetches from the remote.
148+ Malformed recovery records remain visible as errors carrying their token.
149+ Ignored target collisions, divergent commits, active native operations,
150+ dirty submodule scopes, and nested repositories fail before capture.
151+ Clean recursive submodule updates reject ignored-file collisions in initialized
152+ children before any checkout advances. Target resolution refreshes every
153+ configured remote; clone and fetch honor command-scoped TLS configuration.
154+
155+ New Git checkouts follow the configured target before keep or warn policy
156+ applies. Those policies continue to leave existing checkouts unchanged.
157+
58158#### Git command configuration precedes subcommands (#562 )
59159
60160{meth}` ~libvcs.cmd.git.Git.run ` places global flags before the subcommand and
0 commit comments