Changeset 839 in tailor


Ignore:
Timestamp:
09/24/05 20:37:49 (8 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Hash name:
20050924183749-d4f9e-fbfee2e5c6325fa1509901976503c1a9bfba4439
Message:

svn-copyfrom-and-remove-test
Add unit test that exposes a bug in the SVN log parser; SVN shows 'D' for
files that were removed after a (larger) merge and never committed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tests/svn.py

    r820 r839  
    541541        self.assertEqual(entry.action_kind, entry.RENAMED) 
    542542        self.assertEqual(entry.old_name, 'scripts/trac-admin') 
     543 
     544 
     545    COPYFROM_AND_REMOVE_TEST = """\ 
     546<?xml version="1.0" encoding="utf-8"?> 
     547<log> 
     548<logentry 
     549   revision="3170"> 
     550<author>abartlet</author> 
     551<date>2004-10-24T23:54:00.078045Z</date> 
     552<paths> 
     553<path 
     554   action="D">/branches/SAMBA_4_0/source/nsswitch/wins.c</path> 
     555<path 
     556   action="A">/branches/SAMBA_4_0/source/nsswitch/config.m4</path> 
     557<path 
     558   copyfrom-path="/branches/SAMBA_3_0/source/nsswitch" 
     559   copyfrom-rev="3150" 
     560   action="A">/branches/SAMBA_4_0/source/nsswitch</path> 
     561<path 
     562   action="M">/branches/SAMBA_4_0/source/nsswitch/wb_common.c</path> 
     563</paths> 
     564<msg>Add winbind client support back into Samba4.  This is to allow 
     565auth_winbind to work, and to therefore use the new ntlm_auth and 
     566GENSEC in an otherwise Samba3 setup. 
     567 
     568I'm not quite sure what fun-and games my svn cp caused as I merged 
     569this from samba_3_0, but anyway... 
     570 
     571Andrew Bartlett 
     572</msg> 
     573</logentry> 
     574</log> 
     575""" 
     576 
     577    def testCopyFromAndRemove(self): 
     578        """Verify the svn parser handle copyfrom+remove""" 
     579 
     580        log = StringIO(self.COPYFROM_AND_REMOVE_TEST) 
     581        csets = changesets_from_svnlog(log, 
     582                                       'http://svnanon.samba.org/samba', 
     583                                       '/branches/SAMBA_4_0') 
     584 
     585        self.assertEqual(len(csets), 1) 
     586 
     587        cset = csets[0] 
     588        self.assertEqual(len(cset.entries), 3) 
     589 
     590        entry = cset.entries[0] 
     591        self.assertEqual(entry.name, 'source/nsswitch/config.m4') 
     592        self.assertEqual(entry.action_kind, entry.ADDED) 
     593 
     594        entry = cset.entries[1] 
     595        self.assertEqual(entry.name, 'source/nsswitch') 
     596        self.assertEqual(entry.action_kind, entry.ADDED) 
     597 
     598        entry = cset.entries[2] 
     599        self.assertEqual(entry.name, 'source/nsswitch/wb_common.c') 
     600        self.assertEqual(entry.action_kind, entry.ADDED) 
Note: See TracChangeset for help on using the changeset viewer.