carp: Check-in [fe6094c783]

A python graphical and terminal EncFS front-end

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Hide some temporary files from the last changes view
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:fe6094c783e26c57a9112e30794cebd0a31a9b804116a08aa9fac6ed0943f998
User & Date: milouse 2017-09-25 20:26:48
Context
2017-10-12
17:38
Use a config file option to ignore certain file name patterns check-in: ba564fa9d2 user: milouse tags: trunk
2017-09-25
20:26
Hide some temporary files from the last changes view check-in: fe6094c783 user: milouse tags: trunk
2017-09-06
19:45
Bump version check-in: 1c96bc3327 user: milouse tags: trunk, v0.7.1
Changes

Changes to carp/carpgui.py.

39
40
41
42
43
44
45


46
47
48
49
50
51
52
..
82
83
84
85
86
87
88



89
90
91
92
93
94
95
}


class CarpGui:
    def __init__(self):
        self.activity_re = re.compile("^\[([0-9\s:-]+)\] (.+) "
                                      "(created|deleted|modified|moved)$")


        self.parse_args()
        self.sm = StashManager(self.config_file)
        Notify.init("Carp")

        self.must_autostart = os.path.isfile(os.path.join(
            xdg_config_home, "autostart", "carp.desktop"))

................................................................................

        modified_files = []
        last_line = None
        for line in file_lines:
            match = self.activity_re.match(line)
            if match is None:
                continue



            new_line = "{}{}".format(match[2], match[3])
            if new_line == last_line:
                continue
            last_line = new_line
            modified_files.append((match[1], match[2], match[3]))

        if len(modified_files) == 0:







>
>







 







>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
}


class CarpGui:
    def __init__(self):
        self.activity_re = re.compile("^\[([0-9\s:-]+)\] (.+) "
                                      "(created|deleted|modified|moved)$")
        self.lock_re = re.compile("(?:^\.~.+#|.+~$|.+\.lock$|"
                                  ".+~\.[A-Z0-9]{6}$)")
        self.parse_args()
        self.sm = StashManager(self.config_file)
        Notify.init("Carp")

        self.must_autostart = os.path.isfile(os.path.join(
            xdg_config_home, "autostart", "carp.desktop"))

................................................................................

        modified_files = []
        last_line = None
        for line in file_lines:
            match = self.activity_re.match(line)
            if match is None:
                continue
            concerned_file = os.path.basename(match[2])
            if self.lock_re.search(concerned_file) is not None:
                continue
            new_line = "{}{}".format(match[2], match[3])
            if new_line == last_line:
                continue
            last_line = new_line
            modified_files.append((match[1], match[2], match[3]))

        if len(modified_files) == 0: