Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs and customised paths #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

fredcooke
Copy link
Collaborator

First 3 commits should be good improvements. Last one is a work in progress and clearly marked as such. Please amend the work in the last one to fill in the gaps and make it accurate about what's possible now with those two files/what you can do with those two files, and any further existing examples. Then we can amend the docs and tests to cover new scenarios that aren't possible and then implement those. Then final review and merge. Not using broken Microsoft PR draft feature, assigned to me, will reassign once I feel it's ready.

… and multiline code blocks. Triple must start and end on its own lines before and after the block. Single is usually used inline in the middle of text. It is an error to use triple inline in text and the local syntax highlighting reflects that.
…ich may or may not be possible at this time. Intent is for Mike to add commits on top of this one to fill gaps and correct things and for me to rebase -i clean it up once we're where we need to be. Please don't amend this and force push.
@fredcooke fredcooke self-assigned this Apr 23, 2021
@@ -97,6 +97,24 @@ BRANCHOUT_NAME=shorter-name

to the Branchoutfile and ideally use the same value as the optionalDirName during branchout init.

### Personal customisation

Sometimes the branchout defaults don't work for a particular scenario even though they do work for most of your colleagues.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see this is the problem... they should work for everyone or no one... there aren't really special cases for people although the org might be special

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a step back. What's important about this tool is NOT conformity and control of author over the world.

What's important about this tool is:

  • Documenting a set of repos for a particular purpose within an organisation or for the public
  • Efficiently managing large numbers of repos in a clean/easy way
  • Consistent tooling for building projects with separated/isolated software repos
  • Helper tooling for common things done on sets of projects (eg consistent git email and sshCommand config set on clone, may not be available yet, but I'm keen to add it)
  • Consistent structure within a set of repos (currently only one style supported, but a few others have been brewing in my head for a while, keen to implement and use)

And all of that stuff is GREAT and a good reason for me to burn my personal time on this in the coming months, happy to become contributor number two to your project/great idea! :-D

Where on your disk those two roots are is NOT important, not even when you share a path to a colleague, unless they're of below average intelligence. The only part of the path that is key to consistency/understanding should be the BRANCHOUT_NAME within those two root directories, wherever they are. Typically paths I give to colleagues are in the context of the repo that the discussion is about, eg src/main/java/ or whatever, not full absolute paths that may mean nothing on their disparate operating systems anyway.

On my machine ~/ is cleared out every night at 4am against a whitelist so I had to update that whitelist to add two more entries and every time I ls -al ~/ I see ~20% extra stuff that I don't want to. My personal structure after this is changed will be:

~/repos/branchoutRoots

and

~/repos/branchout/cacheAndSettingsRoots/

then it'll all be in one place, nice and handy right next to my not-yet-managed-by-branchout structures that I'd LOVE to port over :-D

I've told you before, I love this project. And I've also told you, it doesn't 100% work for me, yet. This is a step in the right direction that will also help many others with unpleasant usage situations to deal with get the best out of the tool in environments that they don't fully control.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable

README.md Outdated

```
~/.config/Branchoutrc?
${BRANCHOUT_BASE}/.branchoutrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats branchout base?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you thinking a common place like the metarepo? i guess that would work

BRANCHOUT_PROJECTION_DIRECTORY

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess it could be absolute but that just is hard if you have multiple platforms

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, both of these two lines were for you to confirm/rewrite in a way that makes sense. They were just guesses.

I'll add a glossary from the source code, maybe in a different file? And we can get on the same page terminology/jargon wise there.

README.md Outdated
In cases like these you can use the following two files to ????

```
~/.config/Branchoutrc?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is correct

```
#### Moving the branchout projects base dir

To set the root of where branchout initialises branchout repos do XXX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set BRANCHOUT_PROJECTS_DIRECTORY in ~/.config/branchoutrc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stickycode Is this true? Where I saw this used it was used on top of ${HOME} and it would be perfectly reasonable to put it on another drive mounted under for example /code or whatever that's outside ~/ - one such reason that I've hit in the past is limited path names in ubuntu with encrypted home functionality. I had to have my repos outside of ~/ for that reason.

Do we need a new variable that overrides both this and the base path being $HOME or just a wrapper layer around home that uses home as a default and lets you override it to eg / or wherever else you want it?


#### Moving the branchout caching base dir

To set the root of where branchout stores project specific caches and settings/credentials do YYY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess this should be similar BRANCHOUT_STATES_DIRECTORY in ~/.config/branchoutrc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comments above, if we keep this relative to the current $HOME and then just move the base of both that could be good enough, or might be better to have the two base values also be separate?

@fredcooke
Copy link
Collaborator Author

@stickycode what is the purpose of the branchoutrc in ${BRANCHOUT_STATE}/as opposed to the one in ~/.config/ ?

… file layering and remove question mark from branchoutrc and replace capital B with b and correct var name for the other branchoutrc and comment on that.
…d modified as necessary to suit any changes made.
@fredcooke
Copy link
Collaborator Author

Outcome on discussions about this from earlier today:

The change will be from a single partially configurable option (I feel like we should keep supporting this provided both aren't specified which would be an error) to two overrides both of which are full paths not relative or composite.

When I'm clear of other higher priority work I'll pick this up again and move it forward.

@fredcooke
Copy link
Collaborator Author

@stickycode what is the purpose of the branchoutrc in ${BRANCHOUT_STATE}/as opposed to the one in ~/.config/ ?

Forgot about this, but probably still a valid question if it ever was one.

@stickycode
Copy link
Member

stickycode commented Jun 28, 2021 via email

@fredcooke
Copy link
Collaborator Author

Okay, that's fair enough. So I take it that the settings are in this order:

Defaults in scripts
Global overrides defaults
Local overrides global

Is that right? If not, what is it doing?

@stickycode
Copy link
Member

stickycode commented Jun 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants