1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

929 Commits

Author SHA1 Message Date
deadc0de6
68022a5fc6 bump version v0.32.0 2020-03-12 08:10:11 +01:00
deadc0de
c026edaf32 Merge pull request #211 from davla/master
Fixing custom filters and functions paths
2020-02-22 19:30:59 +01:00
Davide Laezza
eeccd78ade Fixing custom filters and functions paths 2020-02-22 17:08:09 +01:00
deadc0de6
fb071321e9 add func_file and filter_file for the config (for #210) 2020-02-15 13:05:17 +01:00
deadc0de
b56e8ea00b Merge pull request #208 from brokenpip3/master
re-add bash and zsh completion to aur packages
2020-02-08 17:09:58 +01:00
brokenpip3
bec45a2fbd re-add bash and zsh completion to aur packages 2020-02-08 12:56:41 +01:00
deadc0de6
d860c07f64 add test for included profile 2020-01-29 16:32:08 +01:00
deadc0de6
a2b3ee2c41 fix tests 2020-01-29 14:56:13 +01:00
deadc0de6
7498be51b6 allow empty src/dst for dotfiles 2020-01-29 14:51:48 +01:00
deadc0de6
873a22bab6 ensure profile dotfiles is not None 2020-01-29 14:09:50 +01:00
deadc0de6
adc4581533 fix diff tests 2020-01-27 08:10:25 +01:00
deadc0de6
d54f0eb465 fix diff default 2020-01-27 08:02:28 +01:00
deadc0de6
bb20f1f6bf bump aur package 2020-01-26 20:18:33 +01:00
deadc0de6
7bf9672758 bump version v0.31.0 2020-01-26 19:58:53 +01:00
deadc0de6
0e421c7908 default to unified diff 2020-01-26 19:54:25 +01:00
deadc0de6
8a663e7267 fix completion files 2020-01-26 19:45:53 +01:00
deadc0de
e8fe9b931f Merge pull request #206 from deadc0de6/diff_command
Diff command
2020-01-26 19:43:54 +01:00
deadc0de
2809afb6dd Merge pull request #205 from Sighery/diff_command
Use alternative list-based diff_cmd escaping
2020-01-26 19:41:17 +01:00
deadc0de6
99150cec88 remove "import shlex" to pass tests 2020-01-26 19:37:52 +01:00
Sighery
704f8deab6 Use alternative list-based diff_cmd escaping
The previous escaping method of wrapping the arguments with double
quotes would eventually fail in some cases, since Linux allows pretty
much any character for a filename.

Using a different quoting character, like the single quote would have
brought you back to the exact same issue. As soon as any part of the
path contained your escape quote character, the code would break.

The code would use `shlex`, a parser for Linux shells. However, this
wasn't working since even that wouldn't know where your argument began
and ended, since it wasn't escaped properly. Meaning, a string like:

`diff -r /home/test/.config/Code - OSS/t"t't.test mytestfile.test`

Would then break any of the quoting solutions. And shlex, since it
wouldn't know where arguments start and end, it would think an
argument ends at `home/test/.config/Code`, since the spaces haven't
been escaped. But escaping the spaces with quote characters is not a
good idea since any parts of the path with those quote arguments would
then again break shlex and it wouldn't be able to tell when your
argument starts and ends.

The solution for that is to, before we replace our diff template
string with the given files arguments, we can just split it by
whitespace, and manually replace the `{0}` and `{1}` placeholders.
This allows us to keep the separation with a Python list. What does
this mean? That when you then call `subprocess.Popen` with this list,
`subprocess` knows where all your arguments start and end, even if
they themselves are not properly escaped. But since it's all split in
a list, `subprocess` has a concept of what is a single argument and
would apply the needed escaping to each individual argument.
2020-01-26 12:28:28 +01:00
deadc0de6
40a9872f56 quote diff command arguments (#203) 2020-01-26 11:21:14 +01:00
deadc0de6
98911550df fix quotes in arguments for #203 2020-01-23 08:27:44 +01:00
deadc0de6
d4375c5d04 adding ability to provide diff command for #203 2020-01-22 17:41:48 +01:00
deadc0de
0da393cef2 Merge pull request #202 from Sighery/master
Fix diff order
2020-01-22 10:24:55 +01:00
Sighery
0658df361d Rename diff arguments for better clarity 2020-01-21 20:54:24 +01:00
deadc0de6
74ffe6a1b4 fix tests 2020-01-21 09:10:45 +01:00
deadc0de6
53dfbc8aa3 fix bug for #204 2020-01-21 09:03:24 +01:00
Sighery
6adf151d83 Fix diff order to compare dst with src
The current diffs are confusing, since they compare the source against
the destination file. To make it less confusing: source is the file
that contains modifications, and destination is the one to be
overwritten.

With the current order, it displays changes as if you were applying
the destination file on the source file.

This commit makes it so that it displays the changes it would need to
apply source on destination. This is consistent with tools such as
patch, that take first the destination file, and second the patch
you're going to apply. Diffing should be done the same way, first the
destination, second the file with the new changes. This is how other
tools that provide diffs such as git also work.
2020-01-19 19:09:03 +01:00
deadc0de
d242742d24 Merge pull request #201 from deadc0de6/ignore_not_existing
custom functions and custom filters
2020-01-12 12:02:52 +01:00
deadc0de6
f02327c6e4 adding ability to add custom functions and filters for #200 2020-01-12 12:01:03 +01:00
deadc0de6
a7a8d92799 clean tests 2020-01-12 11:44:12 +01:00
deadc0de6
d5d5e30b92 dynamically load jinja2 custom functions 2020-01-12 10:43:51 +01:00
deadc0de
e5372dbf8c Merge pull request #199 from deadc0de6/ignore_not_existing
ignore not existing paths
2020-01-01 20:15:30 +01:00
deadc0de6
9e51dfc0e8 fix splitting issue for #198 and rename to optional 2019-12-29 16:05:05 +01:00
deadc0de6
35ebd2b43a implement feature for #198 2019-12-27 18:40:54 +01:00
deadc0de6
a1c5524107 fix pep8 2019-12-14 14:09:01 +01:00
deadc0de6
01e04854de fix update issue with rights for #197 2019-12-14 14:02:09 +01:00
deadc0de6
84b049a992 update aur package 2019-12-07 11:42:38 +01:00
deadc0de6
9ce79e7de6 bump version v0.30.0 2019-12-06 08:46:17 +01:00
deadc0de6
28f39ad0ab fix tests 2019-11-27 20:10:13 +01:00
deadc0de6
d63424e793 refactor printing dotfiles 2019-11-27 19:33:46 +01:00
deadc0de6
a235115db3 update completion scripts 2019-11-27 19:23:45 +01:00
deadc0de6
723ff3dda2 clean output of profiles 2019-11-27 19:23:00 +01:00
deadc0de6
775057a77f refactor command "list" to "profiles" 2019-11-27 19:21:18 +01:00
deadc0de6
8844084999 refactor command "listfiles" to "files" 2019-11-27 19:11:31 +01:00
deadc0de6
77527d92c6 add dependencies 2019-11-27 18:37:57 +01:00
deadc0de6
364de92505 disable debug logs on tests 2019-11-20 15:00:08 +01:00
deadc0de6
e681235ea5 fix bugs for #165 2019-11-20 14:18:40 +01:00
deadc0de6
b7d0f6ed32 fix bugs for #165 2019-11-20 14:00:15 +01:00
deadc0de6
86783ca554 add python 3.8 support 2019-11-17 08:01:03 +01:00