unison-gitignore


Nameunison-gitignore JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/lime-green/unison-gitignore
SummaryA unison wrapper to integrate with .gitignore
upload_time2023-01-01 17:15:57
maintainer
docs_urlNone
authorJosh DM
requires_python
licenseMIT
keywords unison gitignore
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Unison Gitignore
[![PyPI version](https://badge.fury.io/py/unison-gitignore.svg)](https://badge.fury.io/py/unison-gitignore)

A gitignore-aware wrapper around [Unison](https://github.com/bcpierce00/unison)

`unison-gitignore` will walk the local root and any supplied paths finding gitignore files and then call
`unison` with the appropriate unison ignore patterns

## Usage
First install it:
```bash
pip install unison-gitignore
```

Then use:
```bash
unison-gitignore /home/john_doe/local_root ssh://remote_root/ -path data
```
It accepts the exact same arguments as `unison`

## Caveats
- Will not add patterns when using two local roots:

    Unison does the match without the root attached, so a .gitignore file
    in either root would apply to both local roots
- Will not add patterns when profile usage method is used
- Does not handle `!pattern` in the same way as git does:

    ```
    b/
    !b/c/test.py
    ```
    `test.py` will not be ignored in git, but will be ignored by `unison`

    The [Unison reference](https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#reference)
    says this:
    > Unison starts detecting updates from the root of the replicas—i.e., from the empty path. If the empty path matches an ignore pattern and does not match an ignorenot pattern, then the whole replica will be ignored. (For this reason, it is not a good idea to include Name * as an ignore pattern. If you want to ignore everything except a certain set of files, use Name ?*.)

    > If the root is a directory, Unison continues looking for updates in all the immediate children of the root. Again, if the name of some child matches an ignore pattern and does not match an ignorenot pattern, then this whole path including everything below it will be ignored.

    > If any of the non-ignored children are directories, then the process continues recursively.

    So any negated files or directories that are not direct children of an ignored directory will be ignored improperly.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lime-green/unison-gitignore",
    "name": "unison-gitignore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "unison,gitignore",
    "author": "Josh DM",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/0b/d6/202d7f577da41aba1660304e1bbc82c7da8090d1322d13dac29c15bf6b1c/unison-gitignore-1.0.5.tar.gz",
    "platform": null,
    "description": "## Unison Gitignore\n[![PyPI version](https://badge.fury.io/py/unison-gitignore.svg)](https://badge.fury.io/py/unison-gitignore)\n\nA gitignore-aware wrapper around [Unison](https://github.com/bcpierce00/unison)\n\n`unison-gitignore` will walk the local root and any supplied paths finding gitignore files and then call\n`unison` with the appropriate unison ignore patterns\n\n## Usage\nFirst install it:\n```bash\npip install unison-gitignore\n```\n\nThen use:\n```bash\nunison-gitignore /home/john_doe/local_root ssh://remote_root/ -path data\n```\nIt accepts the exact same arguments as `unison`\n\n## Caveats\n- Will not add patterns when using two local roots:\n\n    Unison does the match without the root attached, so a .gitignore file\n    in either root would apply to both local roots\n- Will not add patterns when profile usage method is used\n- Does not handle `!pattern` in the same way as git does:\n\n    ```\n    b/\n    !b/c/test.py\n    ```\n    `test.py` will not be ignored in git, but will be ignored by `unison`\n\n    The [Unison reference](https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#reference)\n    says this:\n    > Unison starts detecting updates from the root of the replicas\u2014i.e., from the empty path. If the empty path matches an ignore pattern and does not match an ignorenot pattern, then the whole replica will be ignored. (For this reason, it is not a good idea to include Name * as an ignore pattern. If you want to ignore everything except a certain set of files, use Name ?*.)\n\n    > If the root is a directory, Unison continues looking for updates in all the immediate children of the root. Again, if the name of some child matches an ignore pattern and does not match an ignorenot pattern, then this whole path including everything below it will be ignored.\n\n    > If any of the non-ignored children are directories, then the process continues recursively.\n\n    So any negated files or directories that are not direct children of an ignored directory will be ignored improperly.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A unison wrapper to integrate with .gitignore",
    "version": "1.0.5",
    "split_keywords": [
        "unison",
        "gitignore"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "0242a4948acb84ca02c18c5135091497",
                "sha256": "5992571ca2dda8a25b6b86faaae7930e6ffdc38862fe0cc1f511e9c27917a0e0"
            },
            "downloads": -1,
            "filename": "unison_gitignore-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0242a4948acb84ca02c18c5135091497",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6656,
            "upload_time": "2023-01-01T17:15:56",
            "upload_time_iso_8601": "2023-01-01T17:15:56.295189Z",
            "url": "https://files.pythonhosted.org/packages/70/fb/49fffdb3b9e831e6e0c759d80339a5a060f92a909535493a35a60a919e84/unison_gitignore-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "6dda9d92927600ccd0f9754b3a47a06c",
                "sha256": "c416976da3a8e90831a7edcd38fd31d95b955c6710e40d47bf7767222813c49e"
            },
            "downloads": -1,
            "filename": "unison-gitignore-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "6dda9d92927600ccd0f9754b3a47a06c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9521,
            "upload_time": "2023-01-01T17:15:57",
            "upload_time_iso_8601": "2023-01-01T17:15:57.778022Z",
            "url": "https://files.pythonhosted.org/packages/0b/d6/202d7f577da41aba1660304e1bbc82c7da8090d1322d13dac29c15bf6b1c/unison-gitignore-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-01 17:15:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "lime-green",
    "github_project": "unison-gitignore",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "unison-gitignore"
}
        
Elapsed time: 0.03255s