Code Monkey home page Code Monkey logo

Comments (9)

Segaja avatar Segaja commented on May 28, 2024 1
~/work/:
  libtmux:
    vcs: 'git'
    remotes:
      origin: 'https://github.com/vcs-python/vcspull.git'
  libtmux_mirrored_remotes:
    vcs: 'git'
    remotes:
      origin: 'ssh//[email protected]/vcs-python/vcspull.git'
      fetch: 'https://github.com/vcs-python/vcspull.git'
  MySVNProject:
    vcs: 'svn'
    url: http://unladen-swallow.googlecode.com/svn/trunk/

from vcspull.

Segaja avatar Segaja commented on May 28, 2024 1

We should also think of adding some kind of config validation between reading the config from the file and actually using it.

from vcspull.

Segaja avatar Segaja commented on May 28, 2024

Do we really need to rework the config structure? As far as I see the extract_repos() call just adds some information, but I think the current sync could work without it.

from vcspull.

Segaja avatar Segaja commented on May 28, 2024

Also in your example the git config is a bit redundant if fetch and push urls are the same. Is that explicit to make the coding easier?

from vcspull.

tony avatar tony commented on May 28, 2024

Do we really need to rework the config structure? As far as I see the extract_repos() call just adds some information, but I think the current sync could work without it.

I'd like the make sure the code more transparent and clear - maybe you are onto something. Perhaps make a PR?

from vcspull.

tony avatar tony commented on May 28, 2024

Also in your example the git config is a bit redundant if fetch and push urls are the same. Is that explicit to make the coding easier?

You're right

git remote allows git remote add <name> <url> . This populates both the push+fetch:

git remote -v
origin  git+ssh://[email protected]/vcs-python/vcspull.git (fetch)
origin  git+ssh://[email protected]/vcs-python/vcspull.git (push)

I added a variant for remotes:

~/work/:
  libtmux:
    vcs: 'git'
    options:
      origin: 
        url: 'https://github.com/vcs-python/vcspull.git'

Long form:

  libtmux_mirrored_remotes:
    vcs: 'git'
    options:
      origin: 
        fetch: 'https://github.com/vcs-python/vcspull.git'
        push: 'git+ssh//[email protected]/vcs-python/vcspull.git'

from vcspull.

tony avatar tony commented on May 28, 2024

My backstory is back when I created tmuxp/vcspull/etc years ago. I took a lot of inspiration from a config management tool called salt states, see their git.

The more "magic" and "hydration" there is, the more pain it is to debug.

you're feedback is very welcome. I'm easy either way as far as what the structure looks like (or whether it changes substantially)

from vcspull.

Segaja avatar Segaja commented on May 28, 2024

Do we really need to rework the config structure? As far as I see the extract_repos() call just adds some information, but I think the current sync could work without it.

I'd like the make sure the code more transparent and clear - maybe you are onto something. Perhaps make a PR?

I'm trying. I'm not sure if I want the path expansion to happen during config loading or when we loop over the entries anyway to update them.

from vcspull.

tony avatar tony commented on May 28, 2024

I'm trying. I'm not sure if I want the path expansion to happen during config loading or when we loop over the entries anyway to update them.

Chicken or egg.

from vcspull.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.