Change return format of find_svn_ancestors() to include
copyfrom_path+copyfrom_rev info. We need this in iter_svn_log_entries()
for correctly "svn log"'ing over only valid ancestry. Previously, we
were basically assuming that copyfrom_rev was always revision-1, and
trying to "svn log" on that revision-range can yield errors.
* svn2svn/run/svn2svn.py (find_svn_ancestors): Change return format
so that each entry in the array is a path+revision+copyfrom_path+copyfrom_rev
tuplet.
* svn2svn/run/svn2svn.py (do_svn_add): Minor changes to support new
find_svn_ancestors() return format.
* svn2svn/run/svn2svn.py (do_svn_add_dir): Fix local-not-remote
handling, to correctly handling directories.
Tony Duckles [Thu, 15 Mar 2012 01:13:32 +0000 (20:13 -0500)]
Correctly crawl source_url's ancestry back to origin, if any
* svn2svn/svnclient.py (iter_svn_log_entries): Support new optional
'ancestors' param. Use that to correctly grab revision-chunks,
following the ancestry history.
* svn2svn/run/svn2svn.py (join_path, in_ancestors): New functions.
* svn2svn/run/svn2svn.py (real_main): Use find_svn_ancestors() to get ancestry
of source_url and pass that to downstream functions.
Tony Duckles [Tue, 6 Mar 2012 04:01:28 +0000 (22:01 -0600)]
Refactor find_svn_ancestors() to make more generic
* svn2svn/run/svn2svn.py (find_svn_ancestors): Make 'stop_base_path'
optional so this function can be used generally to get the full
ancestry history.
* svn2svn/svnclient.py (get_first_svn_log_entry, get_last_svn_log_entry):
Add optional 'stop_on_copy' param and pass through to get_one_svn_log_entry().
Tony Duckles [Sat, 18 Feb 2012 22:35:04 +0000 (16:35 -0600)]
Fix process_svn_log_entry() to not include action="M" paths in skip_paths, so that do_svn_add() will try to check+create correct ancestry.
Update process_svn_log_entry() to calculate 'kind' if kind='none'.
Tony Duckles [Wed, 15 Feb 2012 20:48:14 +0000 (14:48 -0600)]
Fix a place in find_svn_ancestors() which should've been using is_child_path().
Display progress messages during build_rev_map(), for target repo's with lots of target_url commits to check.
Tony Duckles [Thu, 9 Feb 2012 03:25:24 +0000 (21:25 -0600)]
Update process_svn_log_entry() to calculate d['kind'] if missing.
Back-out changes from parse_svn_log_xml() to auto-calculate d['kind'] if not returned by "svn log --xml", since not all callers need d['kind']; just calculate on-demand where needed.
Tony Duckles [Thu, 9 Feb 2012 03:11:43 +0000 (21:11 -0600)]
Use is_child_path() for correct path-is-child-of-parent-path checking.
Add all changed_path's to commit_paths; don't use add_path() anymore.
Don't use add_path() for managing commit_paths
Tony Duckles [Sat, 4 Feb 2012 04:34:47 +0000 (22:34 -0600)]
Change iter_svn_log_entries() back to getting smaller chunks, for better performance on huge repositories.
Clarify safe iter_svn_log_entries() use-cases.
Use iter_svn_log_entries() where possible.
Tony Duckles [Tue, 24 Jan 2012 05:31:02 +0000 (23:31 -0600)]
* Use ui.status for all status messages (verbose and debug)
* Show "Committed revision" after commits to target repo
* Fixes to in_svn()
* Show "svn status" results before cleanup when we catch an external-command exception
Tony Duckles [Sat, 21 Jan 2012 03:45:09 +0000 (21:45 -0600)]
* Refactor find_svn_ancestors() to never require passed-in copyfrom_path/rev.
* Rename replay_svn_copyfrom() -> do_svn_add() and rewrite to walk the add'd tree breadth-first to correctly handle any child contents with different ancestry than the parent.
* Update main() to rename source_rev -> source_start_rev for clarity.
Tony Duckles [Sun, 25 Dec 2011 03:35:50 +0000 (21:35 -0600)]
Process action="M" inline too now: we process paths in sorted order (depth-first), so need to run "svn merge" commands for parent folders ahead of "svn add/copy" commands for child files. Only action="D" are deferred now.
Tony Duckles [Sat, 24 Dec 2011 18:31:40 +0000 (12:31 -0600)]
* Fix changed_path sorting in parse_svn_log_xml()
* Update process_svn_log_entry() to display 'action' rather than 'd['action']', since for action="R" we change action="A"
Tony Duckles [Fri, 23 Dec 2011 23:21:34 +0000 (17:21 -0600)]
* Remove unused source_offset param in process_svn_log_entry
* For "svn copy", use explicit target_url references rather than local wc references, to avoid problems for rename-cases during replays where the "remove" is committed ahead of the "add".
* Force -r value to be passed if using continue-mode, for short-term
Tony Duckles [Fri, 23 Dec 2011 00:13:48 +0000 (18:13 -0600)]
* Only pass "-v" to svn log when needed
* Fix replaced ("R") action handling
* Run "svn up" after each pull_svn_rev() to ensure working-copy is all at the same final HEAD revision.