~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/diffservice

  • Committer: William Grant
  • Date: 2010-02-15 05:37:50 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215053750-hihmegnp8e7dshc2
Ignore test coverage files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    svnclient = pysvn.Client()
49
49
    svnclient.exception_style = 1
50
50
    diff = svnclient.diff
51
 
    diff_text = diff( '/tmp/svndiff',
 
51
 
 
52
    # pysvn's diff tempfile behaviour changes with Subversion 1.6.x.
 
53
    # < 1.6 wants a filename, >= 1.6 wants a directory.
 
54
    if pysvn.svn_version > (1, 6):
 
55
        tmp_path = '/tmp'
 
56
    else:
 
57
        tmp_path = '/tmp/svndiff'
 
58
 
 
59
    diff_text = diff(tmp_path,
52
60
        os.path.join('/home', sys.argv[1]),
53
61
        revision1=revs[0],
54
62
        revision2=revs[1]
60
68
    try:
61
69
        code = e[1][0][1]
62
70
        # See subversion/include/svn_error_codes.h.
 
71
        # 150000: ERR_ENTRY_NOT_FOUND
63
72
        # 155007: WC_NOT_DIRECTORY.
64
73
        # 160013: FS_NOT_FOUND
65
74
        # 200005: UNVERSIONED_RESOURCE
66
 
        if code in (155007, 160013, 200005):
 
75
        if code in (150000, 155007, 160013, 200005):
67
76
            error = 'notfound'
68
77
        else:
69
78
            error = '%s (code %d)' % (error, code)