diff options
author | Shawn O. Pearce <sop@google.com> | 2009-04-16 11:21:18 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-04-16 11:21:18 -0700 |
commit | 350cde4c4bec5e7b5776cf52d61da600af3efc31 (patch) | |
tree | 45c09f4113cf5d7c0d5430360344c5d97d93304e /subcmds/init.py | |
parent | 48244781c2cad1565b4b32b4524ff9931a39f848 (diff) | |
download | git-repo-350cde4c4bec5e7b5776cf52d61da600af3efc31.tar.gz |
Change repo sync to be more friendly when updating the treev1.6.6
We now try to sync all projects that can be done safely first, before
we start rebasing user commits over the upstream. This has the nice
effect of making the local tree as close to the upstream as possible
before the user has to start resolving merge conflicts, as that extra
information in other projects may aid in the conflict resolution.
Informational output is buffered and delayed until calculation for
all projects has been done, so that the user gets one concise list
of notice messages, rather than it interrupting the progress meter.
Fast-forward output is now prefixed with the project header, so the
user can see which project that update is taking place in, and make
some relation of the diffstat back to the project name.
Rebase output is now prefixed with the project header, so that if
the rebase fails, the user can see which project we were operating
on and can try to address the failure themselves.
Since rebase sits on a detached HEAD, we now look for an in-progress
rebase during sync, so we can alert the user that the given project
is in a state we cannot handle.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index a32eaae0..103a78d6 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -20,6 +20,7 @@ from color import Coloring | |||
20 | from command import InteractiveCommand, MirrorSafeCommand | 20 | from command import InteractiveCommand, MirrorSafeCommand |
21 | from error import ManifestParseError | 21 | from error import ManifestParseError |
22 | from remote import Remote | 22 | from remote import Remote |
23 | from project import SyncBuffer | ||
23 | from git_command import git, MIN_GIT_VERSION | 24 | from git_command import git, MIN_GIT_VERSION |
24 | 25 | ||
25 | class Init(InteractiveCommand, MirrorSafeCommand): | 26 | class Init(InteractiveCommand, MirrorSafeCommand): |
@@ -129,7 +130,10 @@ default.xml will be used. | |||
129 | print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url | 130 | print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url |
130 | sys.exit(1) | 131 | sys.exit(1) |
131 | 132 | ||
132 | m.Sync_LocalHalf() | 133 | syncbuf = SyncBuffer(m.config) |
134 | m.Sync_LocalHalf(syncbuf) | ||
135 | syncbuf.Finish() | ||
136 | |||
133 | if is_new or m.CurrentBranch is None: | 137 | if is_new or m.CurrentBranch is None: |
134 | if not m.StartBranch('default'): | 138 | if not m.StartBranch('default'): |
135 | print >>sys.stderr, 'fatal: cannot create default in manifest' | 139 | print >>sys.stderr, 'fatal: cannot create default in manifest' |