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

Branch support #106

Closed
4 tasks done
lptr opened this issue Sep 18, 2014 · 13 comments
Closed
4 tasks done

Branch support #106

lptr opened this issue Sep 18, 2014 · 13 comments
Milestone

Comments

@lptr
Copy link
Contributor

lptr commented Sep 18, 2014

This involves several things:

  • ability to add repositories from a branch
  • switching repositories to branches (maybe do this with pride do?)
  • filtering pride do to run only on repos that are on a certain branch
  • storing and sharing branch state between prides
@fondasimone
Copy link
Contributor

Why filtering only pride do? Imho it could be useful to have filtered list, update and maybe remove too.

@lptr
Copy link
Contributor Author

lptr commented Sep 18, 2014

Makes sense.

@lptr
Copy link
Contributor Author

lptr commented Sep 18, 2014

I'd love to see a format for the command-line options to specify filters in general. We could extend this to add support for repos with changes etc. Can you come up with something?

@fondasimone
Copy link
Contributor

I would go for a classic:
-b (-branch) branch-name
-m (-modified) or -c (-changed)

pride -b my-branch list
pride -b my-branch do git checkout master
pride -b my-branch add koi-something

pride -m do git stash (how to pop those later?? they get flagged as non-modified?)

@lptr
Copy link
Contributor Author

lptr commented Sep 18, 2014

We can have short-hands like this (though we are running out of single-character options quickly), but I would also like something more flexible, something like:

pride do --filter branch=my-branch,unpublished=true -- git push origin my-branch

@fondasimone
Copy link
Contributor

Wow, such verbosity!

Is pride already using any single char switches? Help does not display anything.

If #101 will allow to create shortcut for filters, both options looks ok to me.

@lptr
Copy link
Contributor Author

lptr commented Sep 18, 2014

Erm... Did you check...

See 'pride help <command>' for more information on a specific command.

@lptr
Copy link
Contributor Author

lptr commented Sep 18, 2014

Example:

$ pride help do
NAME
        pride do - Execute a command on a set of modules

SYNOPSIS
        pride do [(-b | --bare)] [--exclude <module>...]
                [--gradle-home <directory>] [--gradle-version <version>]
                [(-I <module> | --include <module>)...]
                [(-p <directory> | --pride-directory <directory>)] [(-q | --quiet)]
                [(-v | --verbose)] [--] <commandLine>...

OPTIONS
        -b, --bare
            Only print the result of the executed commands

        --exclude <module>
            Do not execute command on module (can be specified multiple times)

        --gradle-home <directory>
            Use specified Gradle home

        --gradle-version <version>
            Use specified Gradle version (can be a version number, a URL of a
            distribution, or a location of an installation)

        -I <module>, --include <module>
            Execute the command on module (can be specified multiple times)

        -p <directory>, --pride-directory <directory>
            Initializes the pride in the given directory instead of the current
            directory

        -q, --quiet
            Quite mode

        -v, --verbose
            Verbose mode

        --
            This option can be used to separate command-line options from the
            list of argument, (useful when arguments might be mistaken for
            command-line options

        <commandLine>
            The command to execute

@fondasimone
Copy link
Contributor

awww such help

@lptr
Copy link
Contributor Author

lptr commented Sep 22, 2014

Please test with 0.9.7-rc1.

@lptr lptr closed this as completed Sep 22, 2014
@lptr
Copy link
Contributor Author

lptr commented Sep 22, 2014

You can add stuff from a branch. This will check out the "boxfish-geometry" repo (from behind your repo.base.url) on the “select" branch:

$ pride add boxfish-geometry --branch select

You can switch repos to another branch. Here’s how to switch boxfish-geometry to “master”:

$ pride update --switch master boxfish-geometry

You can filter repositories in pride do, pride update, pride list and pride remove.

This will use a regular expression to hide all repositories that start with “pdom-“:

$ pride list --exclude “pdom-.*"

This will show repos with uncommitted changes:

$ pride list --uncommitted

This will remove all repos that are on branch “master”:

$ pride remove --branch master

You can do nifty things like switch everything on branch “lajos” to “lajos-2.0”, like so:

$ pride update --branch lajos --switch lajos-2.0

For a full list of filters, see the help of one of the commands that can do filtering, such as:

$ pride help list

If you give your ~/.pride/config file to someone, they can create a pride on the same branches as you are on via:

$ pride init --from-config {your-config-file}

(Creating the same pride this way was possible previously, the addition is that now you also get to the same branches in each repo.)

@rishabhg
Copy link

\o/

@fondasimone
Copy link
Contributor

💛 to superbranches nao!!1!

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

No branches or pull requests

3 participants