doorstop.core.vcs.veracity.WorkingCopy.add()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 2
Ratio 100 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 2
loc 2
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0
cc 1
nop 2
crap 1
1
# SPDX-License-Identifier: LGPL-3.0-only
2
3 1
"""Plug-in module to store requirements in a Veracity repository."""
4 1
5
from doorstop import common
6 1
from doorstop.core.vcs.base import BaseWorkingCopy
7
8
log = common.logger(__name__)
9 1
10
11 View Code Duplication
class WorkingCopy(BaseWorkingCopy):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
12 1
    """Veracity working copy."""
13 1
14
    DIRECTORY = '.sgdrawer'
15 1
    IGNORES = ('.sgignores', '.vvignores')
16
17 1
    def lock(self, path):
18 1
        log.debug("`vv` does not support scripted locking: %s", path)
19 1
        self.call('vv', 'pull')
20
        self.call('vv', 'update')
21 1
22 1
    def edit(self, path):
23
        log.info("`vv` adds all changes")
24 1
25 1
    def add(self, path):
26
        self.call('vv', 'add', path)
27 1
28 1
    def delete(self, path):
29
        self.call('vv', 'remove', path)
30 1
31 1
    def commit(self, message=None):
32 1
        message = message or input("Commit message: ")
33 1
        self.call('vv', 'commit', '--message', message)
34
        self.call('vv', 'push')
35