Luke Call <lsuvkne@onemodel.org>


Patch
r866018, r865947, r865946, r865945, r865888, r865887

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.)


r865888 | dustin | 2007-07-22 03:04:38 +0000 (Sun, 22 Jul 2007)

No logic change; a cleanup to use xml instead of regular expression
parsing.

* contrib/client-side/svnmerge/svnmerge.py
  (SvnLogParser):  New class.
  (get_copyfrom):  Use xml instead of regular expression to
  parse information from logs.

Patch by: Giovanni Bajo <rasky@develer.com> and Luke Call <lsuvkne@onemodel.org>
Review by: Giovanni Bajo <rasky@develer.com>


r865945 | dustin | 2007-07-28 15:45:03 +0000 (Sat, 28 Jul 2007)

Clarify uses of xml.dom.

* contrib/client-side/svnmerge/svnmerge.py
  (getAttributeOrNone): New function.
  (SvnLogParser): provide more informative error message if expected name is
    not found.
  (SvnLogRevision): call getAttributeOrNone instead of
    xml.dom.Element.getAttribute directly, to integrate more cleanly with
    get_copyfrom() by returning None instead of an empty string.

Patch by: Luke Call <lacall186@onemodel.org>
Review by: Giovanni Bajo <rasky@develer.com>


r865946 | dustin | 2007-07-28 15:48:25 +0000 (Sat, 28 Jul 2007)

Clarify action_init by changing nomenclature from "branch" to "target".

* contrib/client?side/svnmerge/svnmerge.py
  (action_init): changing nomenclature from "branch" to "target",
    since the merge target could be either a trunk or a branch.  This
    helps prepare for a subsequent patch that corrects & adds logic to
    this function and uses the term "target" consistently.

Patch by:  Luke Call <lacall186@onemodel.org>
Review 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>