Re: Example configuration of mr with vcsh?
On Sat, May 28, 2016 at 01:09:48PM -0700, John Whitley wrote: > 1) `vcsh pull`, to grab any changes on GitHub not on this host. This rebases. > 2) `vcsh push`, and done. > > It’s really rare that I have any conflicts during rebase. When I do, > they always tend to be trivial. Conflicts most commonly happen > because I forgot to push some important fix from one host and decide > to rewrite it on another. > > This creates a purely linear history, and I find to be much easier to > manage than per-host repos, IMO. No merging to multiple branches, no > complex history. This does not keep a backup of the host-specific configuration though, so you'll need to start over in case of a rebuilt host or a catastrophic failure. And you cannot start on a new machine with a 100% clone of another host's local configuration because the host-specific config is not in a central repository. Is this not an issue for you? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: Example configuration of mr with vcsh?
On Sun, May 29, 2016 at 08:30:00AM +0900, Sean Whitton wrote: > On Sat, May 28, 2016 at 02:18:12PM +0200, Marc Haber wrote: > > Sophisticated, but way too complex for my modest needs. I would need > > weeks trying to understand this. > > My file is complex but GNU+stow is actually simpler than vcsh. I do use stow since 1998, I think. I don't like the idea of having something stowed in my home directory. vcsh seems much more elegant, and it also helps increasing my git skills. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: Example configuration of mr with vcsh?
On Sat, May 28, 2016 at 01:09:48PM -0700, John Whitley wrote: > Marc Haberwrote: > > On Fri, May 27, 2016 at 12:47:04PM -0700, John Whitley wrote: > >> You can check out my setup at jwhitley/vcsh-root on Github[1]. > > > > One more question: When you live with this setup, is there a "golden > > host" which you usually use to push your changes, or do you regularly > > push from any host that might have been the cause or a change? > > No. I assume that there are multiple hosts which may have changes “in > flight”. This may be a desktop vs. laptop, personal vs. work system, > multiple work VMs, and so on. And this does work in practice? Impressive. Does it take special discipline or does it just work? > > Are all your host's checkouts on the master branch and get > > continuously rebased when you pull, or do you have host-specific > > branches on all hosts? If you have host-specific branches, how do you > > push/merge/pull/fetch to distribute your changes to other hosts? > > See my vcsh hooks at [1]: one hook runs `git config pull.rebase true` > on every repo. Thus any attempt to pull into one of my vcsh managed > repos automatically rebases. That's what I reckoned, I was just not sure whether you do branch and needed more clarification. > So my workflow is generally: > > 1) `vcsh pull`, to grab any changes on GitHub not on this host. This > rebases. > 2) `vcsh push`, and done. > > It’s really rare that I have any conflicts during rebase. When I do, > they always tend to be trivial. Conflicts most commonly happen > because I forgot to push some important fix from one host and decide > to rewrite it on another. I understand. > This creates a purely linear history, and I find to be much easier to > manage than per-host repos, IMO. No merging to multiple branches, no > complex history. I'll try it thiat way. > As for per-host configuration, I use two approaches. First, my zsh > setup has both environment and alias configuration that’s architecture > specific from files under `~/.zlocal/${arch}`, and optionally loads > non-version controlled, this-host-only configuration from > `~/.zlocal/this`. Second, I can always modify the enabled set of > vcsh/mr repos on one host. If needed, I’ll add a host-specific repo > if there are changes that really need to be versioned and isolated > (e.g. for a work context). I am having my doubts whether that will work in my setting, but I'll try it. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: Example configuration of mr with vcsh?
Marc Haberwrote: > > Hi John, > > thanks for sharing your code. > glad to hear it’s been helpful! > What is exactly the process of bootstrapping? Do you scp the bootstrap > script to the host and execute it there, or do you start over with > cloning the repo, checking out the bootstrap branch and then executing > it? The bootstrap script is intended to be copied to the install system, and run from there. Generally, I just use curl, wget, or even just a browser to grab the script. I do this in manual steps for new physical systems (e.g. new laptop), and have automated it for VMs, etc. > >> The mr config lives at `.config/mr`. Pre-configured repos live at >> `.config/mr/available.d`, and are symlinked into place to enabled them >> on a given system in `.config/mr/config.d`. The symlinks in >> `config.d` are therefore the default enabled repos. > > And this lives in the master branch of the vcsh-root repo which is > cloned by bootstrap.sh? Yes, that’s right. > > Thank you very much. Together with the other examples in this thread > and RichiH's vcsh_mr_template mentioned in the man page this should > give me ample supply of things to chew on. Great. My repo is effectively a version of RichiH’s template tweaked and customized over time to my needs. So you get to see a baseline with his version and an adapted one with mine. Cheers! John ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: Example configuration of mr with vcsh?
Hi John, On Fri, May 27, 2016 at 12:47:04PM -0700, John Whitley wrote: > You can check out my setup at jwhitley/vcsh-root on Github[1]. One more question: When you live with this setup, is there a "golden host" which you usually use to push your changes, or do you regularly push from any host that might have been the cause or a change? Are all your host's checkouts on the master branch and get continuously rebased when you pull, or do you have host-specific branches on all hosts? If you have host-specific branches, how do you push/merge/pull/fetch to distribute your changes to other hosts? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: Example configuration of mr with vcsh?
Marc Haberwrote: > Does anybody coincidentally have a working mr configuration and usage > examples to share? I would really appreciate that. Hi Marc, You can check out my setup at jwhitley/vcsh-root on Github[1]. See also the bootstrap branch at [2]. I’ve been meaning to add README files to these (and have setup vcsh for it!) but haven’t actually written those out yet. :-( So here’s a quick primer to my setup. Dig in, and feel free to ask questions. I well realize that this stuff can be a bit mazelike. # Bootstrapping The bootstrap branch contains the setup script (bootstrap.sh) that’s used to install my vcsh configuration on a new system. This is used on new physical hosts as well as on VMs. E.g. I’ll have a step in a Vagrantfile that installs my setup on development VMs. The bootstrap script also handles a lot of initial git configuration. The bootstrap script is purposely minimal. Rich bootstrap logic is provided via vcsh hooks. See the hooks-available and hooks-enabled directories at [3], and browse the hook files for details. These are currently used to enforce certain git configurations on all vcsh managed repos. For example, git’s sparse checkout feature is enabled so that some filenames (e.g. Vagrantfile, README.md) are never actually checked out. These files are useful for per-repo documentation and development, but aren’t intended to be part of my homedir setup. # vcsh and mr notes This repo uses its own local copies of vcsh and mr, since they are bootstrap requirements and there’s no telling whether these tools are even available from any local package manager. These are installed under the `~/local` hierarchy. The mr config lives at `.config/mr`. Pre-configured repos live at `.config/mr/available.d`, and are symlinked into place to enabled them on a given system in `.config/mr/config.d`. The symlinks in `config.d` are therefore the default enabled repos. # Testing Both master and bootstrap branches have Vagrantfiles used for ad-hoc testing of the respective branch in a VM. That is, the `master` branch Vagrantfile is used to test changes in the local repo. These changes must be committed but not yet pushed upstream. The `bootstrap` branch Vagrantfile likewise tests local changes to the bootstrap script, installing using the current *remote* vcsh-root repo. See the usage instructions at the top of each file. [1] https://github.com/jwhitley/vcsh-root [2] https://github.com/jwhitley/vcsh-root/tree/bootstrap [3] https://github.com/jwhitley/vcsh-root/tree/master/.config/vcsh > > Greetings > Marc > > -- > - > Marc Haber | "I don't trust Computers. They | Mailadresse im Header > Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 > Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 > ___ > vcs-home mailing list > vcs-home@lists.madduck.net > http://lists.madduck.net/listinfo/vcs-home ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home