1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 01:34:23 +00:00

implement relative upignore/cmpignore for #149 and some import refactoring

This commit is contained in:
deadc0de6
2019-06-04 21:50:11 +02:00
parent ba93547ea0
commit d4b3ed2229
6 changed files with 315 additions and 26 deletions

View File

@@ -15,7 +15,8 @@ from dotdrop.templategen import Templategen
from dotdrop.installer import Installer
from dotdrop.updater import Updater
from dotdrop.comparator import Comparator
from dotdrop.utils import get_tmpdir, remove, strip_home, run, uniq_list
from dotdrop.utils import get_tmpdir, remove, strip_home, \
run, uniq_list, patch_ignores
from dotdrop.linktypes import LinkTypes
from dotdrop.exceptions import YamlException
@@ -225,6 +226,7 @@ def cmd_compare(o, tmp):
same = False
continue
ignores = list(set(o.compare_ignore + dotfile.cmpignore))
ignores = patch_ignores(ignores, dotfile.src)
diff = comp.compare(insttmp, dotfile.dst, ignore=ignores)
if tmpsrc:
# clean tmp transformed dotfile if any