Dustin J. Mitchell <dustin@zmanda.com> (dustin)


Patch Review
r877735, r876090, r876021, r871847, r866106, r866018, r865893, r865891, r865890, r865886, r865757, r865581 r878801, r876592, r872931, r871846, r870255, r866018, r865947, r865887

r865581 | dustin | 2007-06-22 20:07:07 +0000 (Fri, 22 Jun 2007)

* COMMITTERS: add me, as partial committer working on svnmerge


r865757 | dustin | 2007-07-08 01:19:36 +0000 (Sun, 08 Jul 2007)

Prevent spurious conflicts on the merge and blocked property
when the source branch contains merge property information for
other branches i.e. a transitive merge A -> B -> C is executed.
Previously, this caused a property conflict because the initial
value on the source branch did not match the initial value on
the target branch.

This patch also prevents extra merge property information from
uninitialized branches being merged into the target. If merging
to those other branches was never initialized on the target by
the user, then the user probably does not expect to see that
information. Note that if that information *was* initialized by
the user, then the user is attempting to do graph-based merging
i.e. A -> B -> C -> A which is currently unsupported.

* contrib/client-side/svnmerge_test.py 
  (testTransitiveMerge): test a transitive merge
* contrib/client-side/svnmerge.py:
  (action_merge): Before each merge, clear the integrated/blocked
    properties. Reset these properties to known values after the
    merge is complete.

Patch by:  Raman Gupta <rocketraman@fastmail.fm>
           Dustin J. Mitchell <dustin@zmanda.com>
Review by: Giovanni Bajo <rasky@develer.com>


r865886 | dustin | 2007-07-22 02:28:29 +0000 (Sun, 22 Jul 2007)

* contrib/client-side/svnmerge/svnmerge_test.py: fix testUninit,
  testBidirectionalMerges, and testBidirectionalMergesMultiBranches,
  which began failing in r22788, by forcing revisions at 'init' time
  and ignoring '--force' in the 'svn merge' commands generated by
  'svnmerge merge'.

Review by: Giovanni Bajo <rasky@develer.com>


r865887 | dustin | 2007-07-22 03:00:25 +0000 (Sun, 22 Jul 2007)

Uses new subprocess module for in launch(), when python version allows, for a 
big performance benefit on some operating systems.  Faster because doesn't 
try to close all (unused) file descriptors. 

* svnmerge/svnmerge.py
  (launch):  Use subprocess module when possible for better performance.
* svnmerge/svnmerge_test.py
  (multilaunch):  No longer passing empty cmd strings.
  (testBlockMergeAndRollback, testMergeAndRollbackEmptyRevisionRange,
  testMergeAndRollback, testMergeWithPotentialPropertyConflict): Change
  quoting of log comment arguments for windows command parser, so they
  are kept together.

Patch by: Luke Call <lsuvkne@onemodel.org>
Review by: Dustin J. Mitchell <dustin@zmanda.com>
           Giovanni Bajo <rasky@develer.com>
(Dustin clarified comments; Dustin and Giovanni made helpful suggestions.)


r865890 | dustin | 2007-07-22 03:39:03 +0000 (Sun, 22 Jul 2007)

* svnmerge/svnmerge.py, svnmerge/svnmerge_test.py
  Comment changes accidentally omitted from r25813


r865891 | dustin | 2007-07-22 04:09:08 +0000 (Sun, 22 Jul 2007)

* svnmerge.py
  (launch) force input to shlex.split to an ascii encoding, since
  it can't handle multibyte unicode (in Python 2.4.3).


r865893 | dustin | 2007-07-22 15:41:49 +0000 (Sun, 22 Jul 2007)

clearly differentiate urls, directories, and repo-relative paths

* svn/trunk/contrib/client-side/svnmerge/svnmerge.py
 fix comments, variable names for urls, directories, and
 "repostitory-relative paths" to be more explicit and call the
 repo-relative paths "path identifiers"

Reviewed by: Giovanni Bajo <rasky@develer.com>


r865947 | dustin | 2007-07-28 15:52:49 +0000 (Sat, 28 Jul 2007)

Finish work begun by r22788, to improve default revision range set by "svnmerge
init" if none provided by user, for scenario where merge source is a copy of
the merge target (i.e., merging from branch back to trunk) or vice-versa.

* contrib/client-side/svnmerge/svnmerge.py
  (get_copyfrom): Add copy_committed_in_rev to returned values; add comments.
  (action_init): Use copy_committed_in_rev from get_copyfrom call for 
    correct conditional default revision range; added logic to auto-calculate 
    revision range depending on merge source and target copy relationship; add
    comments.

* contrib/client-side/svnmerge/svnmerge_test.py:
  (testUninitForce): Change test so does not depend on specific initialized
    revision number, as that is not the point of the test and this is
    now handled in testInitScenarios.  This was broken by the other
    changes, thus fixed here.
  (testInitScenarios): Added function to test how action_init behaves in 
    different circumstances.
  (testCheckInitializeEverything): Removed (now redundant, and not testing for 
    the right behavior).
  (testBidirectionalMerges):  Changed to pass with newly correct init behavior.

Patch by:  Luke Call <lsuvkne@onemodel.org>
Review by: Dustin J. Mitchell <dustin@zmanda.com>
           Giovanni Bajo <rasky@develer.com>


r866018 | dustin | 2007-08-03 16:59:44 +0000 (Fri, 03 Aug 2007)

* svnmerge_test.py
  replace single quotes in self.launch() with double-quotes (Windows compatibility)
  replace multiline expected_output with a regex
  (TestCase_launch): use 'attrib' instead of 'dir' (which is not an executable)
* svnmerge.py
  (construct_merged_log_message) normalize line endings in log message
Patch by: Luke Call <lsuvkne@onemodel.org>
Patch by: Dustin Mitchell <dustin@zmanda.com>
Patch by: Michael Willmott <mwillmott@leadgenpro.co.uk>
Review by: Hernan Martinez Foffani <hernan.martinez@ecc.es>
Review by: Dustin Mitchell <dustin@zmanda.com>


r866106 | giovannibajo | 2007-08-10 18:34:45 +0000 (Fri, 10 Aug 2007)

analyze_source_revs() gets the latest revision of the *branch*
repository, then proceeds to use that value against the *source*
repository; it should get the latest revision of the *source*.

This of course is not a bug in the common scenario of merges
within the same repository, but it is blocking our way to
inter-repository merges.

* svnmerge.py
  (analyze_source_revs): Get latest rev of source_url.
  
Patch by: Dustin J. Mitchell <dustin@zmanda.com>  
Review by: Giovanni Bajo <rasky@develer.com>


r870255 | rocketraman | 2008-04-02 13:48:18 +0000 (Wed, 02 Apr 2008)

svnmerge.py: Fix a problem with r29666 for older versions of
python that do not have the encoding attribute on the sys.stdout
object.

* contrib/client-side/svnmerge/svnmerge.py
  (recode_stdout_to_file): Treat as a no-op when sys.stdout does not
    have the encoding attribute.

Found by: Justin Akehurst <justin.akehurst@isilon.com>
Patch by: Justin Akehurst <justin.akehurst@isilon.com>
          me
Review by: Dustin J. Mitchell <dustin@zmanda.com>


r871846 | dustin | 2008-06-18 02:08:45 +0000 (Wed, 18 Jun 2008)

* svnmerge.py
  (main): fix selection of merge source as a repository relative pathid

Patch by: Shaddy Baddah <shaddy_baddah@hotmail.com>
Review by: Dustin Mitchell <dustin@zmanda.com>


r871847 | dustin | 2008-06-18 15:05:23 +0000 (Wed, 18 Jun 2008)

* svnmerge.py
  (main): allow the use of the avail command against a URL instead of
  the current rigid requirement that a subversion working copy be
  referenced.
* svnmerge_test.py
  (testAvailURL): test avail with a URL

Patch by: Shaddy Baddah <shaddy_baddah@hotmail.com>
          Dustin J. Mitchell <dustin@zmanda.com>


r872931 | dustin | 2008-09-02 17:07:08 +0000 (Tue, 02 Sep 2008)

Fix svnmerge to run when input is not from a tty.

* contrib/client-side/svnmerge/svnmerge.py
  (console_width): Condition on isatty().

Patch by: Simon Brunning <simon@brunningonline.net>
Reviewed by: Dustin J. Mitchell <dustin@zmanda.com>
             Giovanni Bajo <rasky@develer.com>


r876021 | dustin | 2009-02-18 02:03:28 +0000 (Wed, 18 Feb 2009)

Support multiple pathids with command-line options

* contrib/client-side/svnmerge/svnmerge:
  (get_repo_root): give a proper error message getting repo root for an
    invalid URL 
  (PathIdentifier): new class
  (RevisionLog.__init__): extract repo_relative_path from pathid
  (dict_from_revlist_prop): recognize string forms of pathids
  (format_merge_props): use '%s' to force pathids to strings
  (is_url): add an optional validity check for URLs
  (is_pathid, pathid_hint, target_to_pathid): new functions
  (get_copyfrom): extract repo_relative_path from pathid, use '%s'
    to force pathids to strings
  (check_old_prop_version): removed
  (action_init): use pathids
  (action_integrated, action_rollback): remove call to
    check_old_prop_version
  (common_opts, command_table): new options
  (main): use pathids, set up hints

* contrib/client-side/svnmerge/svnmerge_test.py:
  (TestCase_PathIdentifier): new test class
  (TestCase_SvnMerge.svnmerge2): clear new caches between runs
  (testUninitForce, testBidirectionalMergesMultiBranch): allow properties
    to come back in arbitrary order
  (test_dict_from_revlist_prop, test_pathid_fns, test_pathid_hint_url,
    test_is_pathid): new tests
  (test_invalid_url): new unit test

* contrib/client-side/svnmerge/svnmerge.README:
  describe new functionality


r876090 | dustin | 2009-02-19 18:15:39 +0000 (Thu, 19 Feb 2009)

 * svnmerge.py: re-add _cache_svninfo, which was accidentally removed


r876592 | dustin | 2009-03-12 20:51:56 +0000 (Thu, 12 Mar 2009)

* contrib/client-side/svnmerge/svnmerge.py
  move import of popen2 to the version of launch() used when subprocess
  is not available, since popen2 is deprecated in Python-2.6

Suggested by: giovannibajo
Patch by: Jon Schewe <jpschewe@mtu.net>
Review by: me


r877735 | dustin | 2009-05-09 19:06:18 +0000 (Sat, 09 May 2009)

* svnmerge.py (PathIdentifier.__repr__): use a list comprehension
  for Python-2.3 compatibility



r878801 | dustin | 2009-08-13 15:12:55 +0000 (Thu, 13 Aug 2009)

* contrib/client-side/svnmerge/svnmerge.py
  (PathIdentifier.from_pathid): ignore corrupted or invalid entries
   if --ignore-invalid-entries was set 
  (dict_from_revlist_prop): only set the external form and revs if
   pathid is valid
  (global_opts): add --ignore-invalid-entries to global options

Patch by: Benjamin Reed <rangerrick@gmail.com>
Review by: me