Sorry for the delay. Was out of town in meetings all week.. On Sun, Jan 8, 2012 at 5:49 PM, Dustin J. Mitchell <[email protected]> wrote: > As for is_wc -- its use is not entirely cosmetic:
Agreed. I have updated is_wc() to also look in parent directories for metadata. > I'll be happy to merge the first and last portions as suggested, if > you can roll them up into a patch and include a log message in > accordance with > http://subversion.apache.org/docs/community-guide/conventions.html#log-messages > > If you revise the is_wc change, I'll be happy to look at the revised patch. Thanks! Here's an updated patch, and log message (also attached): ########### Index: svnmerge.py =================================================================== --- svnmerge.py (revision 1228757) +++ svnmerge.py (working copy) @@ -343,8 +343,13 @@ # directories. Though it displays a debug message for external # directories, after a blank line. So, practically, the first line # matters: if it's non-empty there is a modification. - out = launchsvn("status -q %s" % dir) + out = launchsvn("status -q --ignore-externals %s" % dir) + # In 1.7, -q does show externals, so we need to strip them. + out = [x for x in out if not re.match(r'^X',x)] if out and out[0].strip(): + if opts["verbose"]>=1: + for ln in out: + report(ln.strip()) error('"%s" has local modifications; it must be clean' % dir) class PathIdentifier: @@ -946,8 +951,17 @@ def is_wc(dir): """Check if a directory is a working copy.""" - return os.path.isdir(os.path.join(dir, ".svn")) or \ - os.path.isdir(os.path.join(dir, "_svn")) + report("Working copy check: %s" % dir) + dir=os.path.abspath(dir) + while not os.path.isdir(os.path.join(dir, ".svn")) or \ + os.path.isdir(os.path.join(dir, "_svn")): + lastdir=dir + dir=os.path.dirname(dir) + if dir==lastdir: + return False + else: + report("Working copy base dir: %s" % dir) + return True _cache_svninfo = {} def get_svninfo(target): @@ -1552,14 +1566,12 @@ if opts["commit-file"]: f = open(opts["commit-file"], "w") if record_only: - print >>f, 'Recorded merge of revisions %s via %s from ' % \ - (revs, NAME) + print >>f, 'Recorded merge of revisions %s via %s from %s' % \ + (revs, NAME, opts["source-pathid"]) else: - print >>f, 'Merged revisions %s via %s from ' % \ - (revs, NAME) - print >>f, '%s' % opts["source-url"] + print >>f, 'Merged revisions %s via %s from %s' % \ + (revs, NAME, opts["source-pathid"]) if opts["commit-verbose"]: - print >>f print >>f, construct_merged_log_message(opts["source-url"], revs), f.close() ########### log-message: ########### Improved svnmerge.py compatibility with subversion 1.7. * contrib/client-side/svnmerge/svnmerge.py (check_dir_clean): Prevent externals from causing check_dir_clean to fail with subversion 1.7. Added verbose output of offending local mods. (is_wc): Now checks current and parent directories for .svn or _svn metadata directory. Added additional verbose report output. (action_merge): Commit messages are more compact and use relative paths, if available, instead of the full URL. Patch by: William Baum <[email protected]> ########### Let me know if any additional changes are necessary. Thanks, --Bill
Improved svnmerge.py compatibility with subversion 1.7. * contrib/client-side/svnmerge/svnmerge.py (check_dir_clean): Prevent externals from causing check_dir_clean to fail with subversion 1.7. Added verbose output of offending local mods. (is_wc): Now checks current and parent directories for .svn or _svn metadata directory. Added additional verbose report output. (action_merge): Commit messages are more compact and use relative paths, if available, instead of the full URL. Patch by: William Baum <[email protected]>
svnmerge.py-120115-wmbaum.patch
Description: Binary data
_______________________________________________ Svnmerge mailing list [email protected] http://www.orcaware.com/mailman/listinfo/svnmerge
