Commit Graph

9 Commits (7a9b425ddb6545b829ccfd91500ecc4a97cd2211)

Author SHA1 Message Date
iannucci@chromium.org f3e37a0fbb Add better error messages to git_reparent_branch.
R=dhsharp@chromium.org, vadimsh@chromium.org
BUG=538454

Review URL: https://codereview.chromium.org/1498163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297848 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sdefresne@chromium.org d421f6a477 Fix "git rebase-update" when multiple branch are stale.
Fix a bug that left branches tracking a dead branch if both their parent
and grand-parent were left with no changes after a "rebase-update" step.

Given the following initial state:
  $ git map-branches -v
  origin/master
    a
      b
        c *        [ ahead 1 ]

without this patch, a "git rebase-update" on this tree state would
leave the branch "c" as tracking a non-existing branch "a":

  $ git recursive-rebase
  a up-to-date
  b up-to-date
  c up-to-date
  Reparented c to track a (was tracking b)
  Deleted branch b (was 448d1da).
  Deleted branch a (was 448d1da).
  $ git map-branches -v
  {a:GONE}
    c *

with the patch, we record that the branch "c" is tracking must be
updated twice and we end up in a state were "c" is correctly tracking
"origin/master":

  $ git recursive-rebase
  a up-to-date
  b up-to-date
  c up-to-date
  Reparented c to track origin/master (was tracking b)
  Deleted branch b (was 448d1da).
  Deleted branch a (was 448d1da).
  $ git map-branches -v
  origin/master
    c *            [ ahead 1 ]

BUG=456806

Review URL: https://codereview.chromium.org/1482753002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297792 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
stip@chromium.org 74374f985f Add a --keep-going flag for people who run rebase-update infrequently.
Review URL: https://codereview.chromium.org/1331263002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296639 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org 41a9ce45ee Fail with user friendly error when no new parent branch is specified.
Before this change, running
$ git reparent-branch
produced stacktrace and
"TypeError: sequence item 4: expected string, NoneType found"

R=iannucci@chromium.org
TEST=manual + unittest + coverage.
BUG=

Review URL: https://codereview.chromium.org/1280633003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296235 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 58888e1171 Fix git branch parsing.
In git version 2.4 the git branch command prints "* (HEAD detached at"
or "* (HEAD detached from" instead of "* (detached from". Adjust the parsing to make our tests
still work with git 2.4.

BUG=487172

Review URL: https://codereview.chromium.org/1162763003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295578 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org a1bf72dd1e Disable tests that break because of git 2.4
BUG=487172

Review URL: https://codereview.chromium.org/1150663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295375 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
pgervais@chromium.org b9f2751b87 Added hyphen-only options
Some options have words separated by underscores. Added options with
same name and underscores replaced by hyphens.

BUG=400953

Review URL: https://codereview.chromium.org/436963005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@288366 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 512d97d412 Remember what branches we delete and do not try to reparent them in cleanup.
R=agable@chromium.org
BUG=357367

Review URL: https://codereview.chromium.org/214133006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260704 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org c050a5b2be Add a family of git-commands to assist with the management of multiple CLs/branches.
git-rebase-update - ensure all branches are up to date
git-new-branch - create branches
git-rename-branch - rename a branch while preserving parentage relationships
git-reparent-branch - change the parent of a branch, including rebasing it correctly onto that new parent.
git-squash-branch - collapse a branch into a single commit
git-upstream-diff - show the diff between the current branch and it's upstream branch
git-mark-merge-base - explicitly set what you want the above tools to consider the merge-base for the current branch.

R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=261738

Review URL: https://codereview.chromium.org/184253003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259520 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago