Raman Gupta <rocketraman@fastmail.fm> (rocketraman)


Found Patch Review
r862651 r870255, r870254, r869928, r869889, r869740, r869739, r868349, r867903, r866111, r866103, r865800, r865758, r865757, r861162, r860139, r860138, r859727, r858761, r858759, r858747, r858725, r858688, r858674, r858672, r858649 r867904, r865889

r870255 | rocketraman | 2008-04-02 08:48:18 -0500 (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>


r870254 | rocketraman | 2008-04-02 08:39:25 -0500 (Wed, 02 Apr 2008)

svnmerge.py: Fix a problem occasionally causing conflicts in the integrated
property due to some revisions being treated by svnmerge.py as unicode
strings, and others as int's.

* contrib/client-side/svnmerge/svnmerge.py
  (SvnLogParser): Always return revisions as ints.
  (action_init): Cast revision to str before concatenation.

Found by: Horst Hermanns <h.hermanns@telekom.de>
Patch by: Horst Hermanns <h.hermanns@telekom.de>
          me
Review by: Giovanni Bajo <rasky@develer.com>


r869928 | rocketraman | 2008-03-11 13:50:10 -0500 (Tue, 11 Mar 2008)

svnmerge.py: Similar to r29741, fix brokenness with r29666 when there is no 
default locale for sys.stdout.encoding in Python.

* contrib/client-side/svnmerge/svnmerge.py
  (recode_stdout_to_file): Treat as a no-op when sys.stdout.encoding returns
  None.


r869889 | rocketraman | 2008-03-09 16:06:52 -0500 (Sun, 09 Mar 2008)

Fix regression error in r29666 for non-english locales that was causing a 
KeyError when svnmerge.py commands were executed, since the output of svn 
info was non-english and therefore non-parseable.

* contrib/client-side/svnmerge.py: Set the environment in which the script
    operates to set LC_MESSAGES = C (to force svn messages, such as those
    for svn info to be in english, and thus parseable by svnmerge.py), while
    also removing any pre-existing setting for LC_ALL (since setting LC_ALL 
    to C causes log output to not be internationalized).

Patch by:  me
           Laurent Petit <laurent.petit@gmail.com>
Review by: Giovanni Bajo <rasky@develer.com>
Found by:  Hernán Martínez Foffani <hernan.martinez@ecc.es>


r869740 | rocketraman | 2008-03-01 18:48:59 -0600 (Sat, 01 Mar 2008)

Resolve issue with encoding commit log messages as described by
Romulo Ceccon at:

http://article.gmane.org/gmane.comp.version-control.subversion.svnmerge.devel/872

* contrib/client-side/svnmerge.py: Import locale, set locale to user default.
  (recode_stdout_to_file): New method to decode standard output and encode using
    the user's default locale encoding.
  (get_commit_log): Call recode_stdout_to_file to change the encoding of svn
    log output.

* contrib/client-side/svnmerge_test.py
  (testCommitMessageEncoding): New test case to verify the commit log message
    encoding.

Patch by:  Romulo A. Ceccon <romuloceccon@yahoo.com.br>
           me
Review by: Thomas Heller <theller@ctypes.org>


r869739 | rocketraman | 2008-03-01 18:24:27 -0600 (Sat, 01 Mar 2008)

Eliminate need for --bidirectional flag. Detect sources that
have integration info for the target, and automatically enable
reflected rev detection in this case. The automatic detection is
skipped if --bidirectional is explicitly set.

* contrib/client-side/svnmerge.py: Update help for global options.
  (should_find_reflected): New method to determine whether to find
    reflected revs or not.
  (action_avail),
  (action_merge): Call should_find_reflected.

* contrib/client-side/svnmerge_test.py
  (testBidirectionalMerges),
  (testBidirectionalMergesMultiBranch): Test avail with and
    without --bidirectional. Remove test for non-reflected default,
    and test merges without --bidirectional.


r868349 | rocketraman | 2007-12-05 10:59:26 -0600 (Wed, 05 Dec 2007)

Do not show phantom revisions in the default svnmerge.py commit
log message.

* contrib/client-side/svnmerge.py
  (action_merge): Do not include phantom revs in the log message
    for merged revisions or for record-only revisions.

Patch by: Alan Barrett <apb@cequrux.com>
          Raman Gupta <rocketraman@fastmail.fm>
Review by: dlr
           Piet-Hein Peeters <piet-hein.peeters@philips.com>


r867904 | rocketraman | 2007-11-15 10:31:00 -0600 (Thu, 15 Nov 2007)

* contrib/client-side/svnmerge/svnmerge.py
  (VersionedProperty.load): While looping through the revisions in which
    there are property changes, properly cache the old value for the
    next loop. Not a correctness issue, buy may improve performance
    slightly.

Patch by: anonymous
Review by: Giovanni Bajo <rasky@develer.com>
           Raman Gupta <rocketraman@fastmail.fm>


r867903 | rocketraman | 2007-11-15 10:27:36 -0600 (Thu, 15 Nov 2007)

Fix svnmerge_test.py broken by 26883 due to addition of --non-interactive flag.

* contrib/client-side/svnmerge/svnmerge_test.py
  (testTrimmedAvailMerge),
  (testMergeRecordOnly),
  (testBidirectionalMerges): Add --non-interactive to expected regex.


r866111 | rocketraman | 2007-08-10 16:53:58 -0500 (Fri, 10 Aug 2007)

Properly handle merge/block property conflicts when doing
transitive merging i.e. A -> B -> C. The previous version
purported to handle this but in fact did not.

* svnmerge.py:
  (get_merge_props),
  (get_block_props): Allow passing an optional rev argument.
  (action_merge): Before each merge, preset the merge and blocked
    property values to the merge left values. This prevents any
    chance of conflicts during the merge.

* svnmerge_test.py:
  (testTransitiveMergeWithBlock): Renamed from testTransitiveMerge.
    Added a test at the end for the merge property value.
  (testTransitiveMerge): New test that actually carries a merge
    through from A -> B -> C instead of blocking it.

  Found by: Piet-Hein Peeters <piet-hein.peeters@philips.com>
  Review by: giovannibajo


r866103 | rocketraman | 2007-08-10 08:37:02 -0500 (Fri, 10 Aug 2007)

Minor cleanup of unused variable.

* svnmerge.py:
  (action_merge): Removed an unused variable assignment to old_merge_props.


r865889 | dustin | 2007-07-21 22:10:58 -0500 (Sat, 21 Jul 2007)

* contrib/client-side/svnmerge/svnmerge.py
  (block_metadata): New function
  (analyze_revs): Consider changes to blocked-prop as reflected revisions.

Patch by:  Giovanni Bajo <rasky@develer.com>
Review by: Raman Gupta <rocketraman@fastmail.fm>
           Giovanni Bajo <rasky@develer.com>


r865800 | rocketraman | 2007-07-12 17:49:54 -0500 (Thu, 12 Jul 2007)

* COMMITTERS: add rocketraman (Raman Gupta) as partial committer for svnmerge.

r865758 | dustin | 2007-07-07 20:30:13 -0500 (Sat, 07 Jul 2007)

Move the post-merge merge_props and blocked_props update to *before*
the generation of the commit message. This allows a CTRL+C interrupt
to break the generation of the commit message, without leaving the
working copy in an inconsistent state. Requested by Giovanni Bajo.

* contrib/client-side/svnmerge.py:
  (action_merge): Move the commit log generation to the end of the
    method.

Patch by:  Raman Gupta <rocketraman@fastmail.fm>
Review by: Giovanni Bajo <rasky@develer.com>


r865757 | dustin | 2007-07-07 20:19:36 -0500 (Sat, 07 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>


r862651 | dlr | 2006-12-05 00:54:54 -0600 (Tue, 05 Dec 2006)

svnmerge: Add a test case for a behavior which we'd like fixed, where
the following sequence results in a property conflict to the
"svnmerge-integrated" directory property.

1. Init branch B
2. Merge changes from branch A to branch B
3. Init branch C, and attempt a merge of changes from branch B to branch C.

(This is the correct incarnation of r22575.)

* contrib/client-side/svnmerge_test.py
  (TestCase_TestRepo.testMergeWithPotentialPropertyConflict): Add test
   case expecting existing behavior, in hopes of finding a fix.

Found by: Auke Jilderda <auke@collab.net>
          John Smith <johnsmith71251@gmail.com>
          Raman Gupta <rocketraman@fastmail.fm>


r861162 | cmpilato | 2006-08-16 10:35:22 -0500 (Wed, 16 Aug 2006)

* contrib/server-side/svn-fast-backup
  Use the variables svnlook and rsync defined near the top instead of
  hard-coded Strings.

Patch by: Raman Gupta <rocketraman@fastmail.fm>
Reviewed by: me


r860139 | djames | 2006-06-12 16:26:56 -0500 (Mon, 12 Jun 2006)

Small optimization in obtaining the revisions to be checked for merging. The
last merged revision is included in analyze_head_revs, but later excluded by
the algorithm anyway, resulting in some unnecessary work.

Patch by: Raman Gupta <rocketraman@fastmail.fm>
Thread: http://www.orcaware.com/pipermail/svnmerge/2006-May/000588.html

* contrib/client-side/svnmerge.py
  (analyze_head_revs): Don't include the last merged revision in the list of
  revisions to be checked for merging.



r860138 | djames | 2006-06-12 16:22:13 -0500 (Mon, 12 Jun 2006)

Fix a bug in svnmerge.py where the first revision was always marked as
reflected even if it is not. Update VersionedProperty class to cache the
value of the svnmerge property prior to the first property change.
Follow up to r18696.

Patch by: me
          Raman Gupta <rocketraman@fastmail.fm>
Thread: http://www.orcaware.com/pipermail/svnmerge/2006-May/000588.html

* contrib/client-side/svnmerge.py
  (RevisionLog#__init__): Save the range of the log as self.begin and self.end.
  (VersionedProperty#__init__): Cache the property value before the range
  of the log. Initialize old_value. This prevents the first revision from being
  considered changed even if it is not.
  (analyze_revs): Initialize old_revs. This prevents the first revision
  from being considered reflected even if it is not.



r859727 | giovannibajo | 2006-05-16 07:19:43 -0500 (Tue, 16 May 2006)

Add the uninit command, which removes merge tracking information for a given
head URL, including blocked revision information. This is especially useful
if multiple heads are being tracked -- without uninit, this situation requires
the new property value to be manually set by the user via svn propset.

* svnmerge.py: Added uninit to command table.
  (action_uninit): New method for uninitialization of merge tracking info.

* svnmerge_test.py
  (TestCase_TestRepo.testUninit): New test case, checking that uninit works.
  (TestCase_TestRepo.testUninitForce): New test case.
  (TestCase_TestRepo.getproperty): Prevent array index errors when
    retrieving a property with no value.
  (TestCase_TestRepo.getBlockedProperty): New method to get the value
    of the svnmerge blocked property.

Patch by: Raman Gupta <rocketraman@fastmail.fm>
Review by: Daniel Rall <dlr@collab.net>
           Madan U Sreenivasan <madan@collab.net>
           Giovanni Bajo <rasky@develer.com>


r858761 | giovannibajo | 2006-03-02 09:50:53 -0600 (Thu, 02 Mar 2006)

Fixed a problem with the last indent patch to remove an extra
blank line after embedded log messages.

Patch by: Raman Gupta <rocketraman@fastmail.fm>

* contrib/client-side/svnmerge.py
  (construct_merged_log_message):
    Removed an extra newline being appended to log messages.



r858759 | giovannibajo | 2006-03-02 08:45:28 -0600 (Thu, 02 Mar 2006)

Patch by: Alan Barrett <apb@cequrux.com>
          Raman Gupta <rocketraman@fastmail.fm>
Reviewed by: Giovanni Bajo <rasky@develer.com>

* contrib/client-side/svnmerge.py
  (prefix_lines):
    New method to take a string and prepend each line of the string
    with a specified string. Lines are delimited by newline
    characters, and the entire string is asserted to be newline
    terminated.
  (construct_merged_log_message):
    Added indentation for each commit message. Added check for empty
    log messages, which should never happen but doesn't hurt.

* contrib/client-side/svnmerge_test.py
  (TestCase_PrefixLines.test_basic):
     New test for the prefix_lines functionality.



r858747 | blair | 2006-03-01 21:22:31 -0600 (Wed, 01 Mar 2006)

Fix the bidirectional test case in svnmerge_test.py to work with svn
1.2.x as well as 1.3.x since svn 1.2.x does not produce property
conflicts, and since the current test code expects it, the test fails.

Patch by: Raman Gupta <rocketraman@fastmail.fm>

* contrib/client-side/svnmerge_test.py
  (TestCase_TestRepo.testBidirectionalMerges)
    Remove an assertion on resolved output.


r858725 | blair | 2006-02-28 23:38:13 -0600 (Tue, 28 Feb 2006)

Improved merge command performance by eliminating svn log operations
on phantom revisions.

Patch by: Raman Gupta <rocketraman@fastmail.fm>

* contrib/client-side/svnmerge.py
  (action_merge):
    Remove phantom_revs from the revs list used for getting the merge
      intervals, and obtaining logs for writing the commit log
      message.  For the first use, this change has no detrimental
      effect, because the minimal_merge_intervals() function accounts
      for the phantom revisions. For the second use, this improves
      performance because now svnmerge does not execute an "svn log"
      for every phantom revision.
    Modified the range printing for the commit log message to re-add
      the phantom revs, so the range prints with the phantom revs, as
      is the current functionality.


r858688 | blair | 2006-02-24 16:49:13 -0600 (Fri, 24 Feb 2006)

When svnmerge.py is used to bidirectionally merge changes between a
branch and its head, it is necessary to not merge the same changes
forth and back: e.g., if you committed a merge of a certain revision
of the branch into the head, you do not want that commit to appear as
available to merged into the branch (as the code originated in the
branch itself!).  svnmerge can skip these so-called "reflected"
revisions with the new --bidirectional or -b command line option.

Patch by: Raman Gupta <rocketraman@fastmail.fm>
Reviewed by: Giovanni Bajo <rasky@develer.com>
(Tweaked by me.)

* contrib/client-side/svnmerge.py
  (analyze_revs):
    Take a new argument, the target directory receiving the merges.
    If the opts["bidirectional"] is True, then pass --verbose to 'svn
      log --quiet' to get a lit of all the changed paths in the head
      URL.  Look for any changed paths that exactly match the target
      directory and look for property changes on the directory in the
      svnmerge-integrated property for the target directory.
    Return an additional RevisionSet containing the reflected
      revisions.
  (analyze_head_revs):
    Pass the target directory receiving the merges down to
      analyze_revs().
  (action_avail):
    Use the new returned RevisionSet from analyze_head_revs() to
      remove from the set of available revisions the reflected ones.
  (action_merge):
    Use the new returned RevisionSet from analyze_head_revs() to
      remove from the set of available revisions the reflected ones.
  (common_opts):
    Add a new -b and --bidirectional flag to this, which defaults to
      False.
  (command_table):
    Add documentation about the bidirectional merge support to the
      'avail' and 'merge' commands.
    Enable the -b and --bidirectional command line options for the
      'avail' and 'merge' subcommands.

* contrib/client-side/svnmerge_test.py
  (TestCase_TestRepo.testBidirectionalMerges):
    New test method to check that reflected revisions are recognized
      properly for bidirectional merges.
  (TestCase_TestRepo.testBidirectionalMergesMultiBranch):
    New test method to check that merges from a second branch are not
      considered reflected for other branches.


r858674 | blair | 2006-02-23 20:01:02 -0600 (Thu, 23 Feb 2006)

Add a __len__ method to svnmerge.py's RevisionSet class so you can
easily find the number of revisions in the set by using len() on an
RevisionSet instance.

Patch by: Raman Gupta <rocketraman@fastmail.fm>

* contrib/client-side/svnmerge.py
  (RevisionSet.__len__):
    New method that returns the number of revisions in the set.

* contrib/client-side/svnmerge_test.py
  (TestCase_RevisionSet.test_length):
    New test method to test the new RevisionSet.__len__ method.


r858672 | blair | 2006-02-23 19:32:32 -0600 (Thu, 23 Feb 2006)

In svnmerge.py's test suite, relocate the test working copies from
using the template repository to the test repository so the template
repository is not affected by commits.

Patch by: Raman Gupta <rocketraman@fastmail.fm>

* contrib/client-side/svnmerge_test.py
  (TestCase_TestRepo.setUp):
    Run 'svn switch --relocate' on the newly copied test working
      copies.


r858649 | blair | 2006-02-23 12:28:17 -0600 (Thu, 23 Feb 2006)

Fixes and improvements in svnmerge.py's test suite to prepare for
bidirectional merge support.

Patch by: Giovanni Bajo <rasky@develer.com>
          Raman Gupta <rocketraman@fastmail.fm>
(Tweaked by me.)

* contrib/client-side/svnmerge_test.py
  (main):
    At script start time, always delete an existing template directory
      to force TestCase_TestRepo.setUp() to create a fresh template.
  (TestCase_SvnMerge.svnmerge2):
    Always clear svnmerge's internal cache before running svnmerge.
      This is needed for the bidirectional merge testing in a future
      patch.
  (TestCase_SvnMerge.setUp):
    Add to the template repository another branch of trunk which is
      then immediately renamed.  The new branch is not used in any
      tests currently.  I'm adding it now so that the tests for the
      bidirectional merge support that checks the expected revision
      numbers will not have to be renumbered in the future.  This
      change is from r238 from Giovanni Bajo's repository.
  (TestCase_TestRepo.testCheckInitializeEverything):
    Update the expected result to take into account the two additional
      commits in the template repository.  This change is from r238
      from Giovanni Bajo's repository.