Changeset 27

Show
Ignore:
Timestamp:
2008年07月30日 00时34分38秒 (4 years ago)
Author:
jiangx
Message:

store ,v file into RCS directory; bug in last commit: remove continue

Location:
trunk
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/config/Makefile

    r25 r27  
    88        @-rm $(CONFFILE) >/dev/null 2>&1 
    99        @-rm localconfig.pyc >/dev/null 2>&1 
    10         @-rm *,v 2>&1 
     10        @-rm -f *,v RCS/*,v 2>&1 
    1111 
    1212%: $(SRCDIR)/%.in 
  • trunk/pysvnmanager/model/rcsbackup.py

    r26 r27  
    1313 
    1414def is_rcs_exist(wcfile): 
    15     rcsfile = wcfile+',v' 
    16     return os.access(rcsfile, os.F_OK) 
     15    wcpath = os.path.dirname(os.path.abspath(wcfile)) 
     16    if os.path.isdir(wcpath+'/RCS'): 
     17        rcsfile = wcpath+'/RCS/'+os.path.basename(wcfile)+',v' 
     18    else: 
     19        rcsfile = wcfile+',v' 
     20    return os.path.exists(rcsfile) 
    1721 
    1822def get_unicode(msg, escape=False): 
     
    5559    for i in cmd: 
    5660        log.debug("Command: "+i) 
    57         continue 
    5861        try: 
    5962            buff = os.popen(i).read().strip() 
  • trunk/pysvnmanager/tests/test_rcs_backup.py

    r24 r27  
    1414class TestRcsBackup(TestController): 
    1515    wcfile  = "%s/%s" % (os.path.dirname(os.path.abspath(__file__)), 'rcstest.txt') 
    16     rcsfile = wcfile+',v' 
     16    wcpath = os.path.dirname(os.path.abspath(wcfile)) 
     17    if os.path.isdir(wcpath+'/RCS'): 
     18        rcsfile = wcpath+'/RCS/'+os.path.basename(wcfile)+',v' 
     19    else: 
     20        rcsfile = wcfile+',v' 
    1721 
    1822    #def __init__(self, *args): 
    1923    #    super(TestController, self).__init__(*args) 
    20  
    2124  
    2225    def setUp(self): 
     
    2528        if os.access(self.rcsfile, os.R_OK): 
    2629            os.remove(self.rcsfile) 
    27  
    2830 
    2931    def tearDown(self): 
     
    6062        # Backup test. (rcs file not exist yet) 
    6163        self.writefile() 
     64        assert self.get_revision() == 1, self.get_revision() 
    6265        assert os.access(self.wcfile, os.R_OK) 
    6366        assert not os.access(self.rcsfile, os.R_OK) 
    6467        rcs.backup(self.wcfile) 
    6568        assert os.access(self.wcfile, os.R_OK) 
    66         assert os.access(self.rcsfile, os.R_OK) 
     69        assert os.path.exists(self.rcsfile) 
     70        assert os.access(self.rcsfile, os.R_OK), self.rcsfile 
    6771 
    6872        # Backup test. (rcs exist already) 
  • trunk/pysvnmanager/websetup.py

    r4 r27  
    2121    if not os.path.exists(here+'/config'): 
    2222        os.mkdir(here+'/config') 
     23    if not os.path.exists(here+'/config/RCS'): 
     24        os.mkdir(here+'/config/RCS') 
    2325    filelist = ['svn.access', 'svn.passwd', 'localconfig.py'] 
    2426    for f in filelist: