mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-04-20 03:08:20 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21f7385400 | ||
|
|
24d8dfbc34 | ||
|
|
a6df7d284c | ||
|
|
67092448c2 | ||
|
|
e92ceebde0 |
@@ -940,7 +940,7 @@ class Project(object):
|
||||
ref = R_M + self.manifest.branch
|
||||
|
||||
if IsId(self.revision):
|
||||
dst = self.revision + '^0',
|
||||
dst = self.revision + '^0'
|
||||
self.bare_git.UpdateRef(ref, dst, message = msg, detach = True)
|
||||
else:
|
||||
remote = self.GetRemote(self.remote.name)
|
||||
|
||||
4
repo
4
repo
@@ -2,7 +2,7 @@
|
||||
|
||||
## repo default configuration
|
||||
##
|
||||
REPO_URL='git://android.kernel.org/tools/repo.git'
|
||||
REPO_URL='git://android.git.kernel.org/tools/repo.git'
|
||||
REPO_REV='stable'
|
||||
|
||||
# Copyright (C) 2008 Google Inc.
|
||||
@@ -28,7 +28,7 @@ if __name__ == '__main__':
|
||||
del magic
|
||||
|
||||
# increment this whenever we make important changes to this script
|
||||
VERSION = (1, 7)
|
||||
VERSION = (1, 8)
|
||||
|
||||
# increment this if the MAINTAINER_KEYS block is modified
|
||||
KEYRING_VERSION = (1,0)
|
||||
|
||||
@@ -55,6 +55,12 @@ If the --reviewers or --cc options are passed, those emails are
|
||||
added to the respective list of users, and emails are sent to any
|
||||
new users. Users passed to --reviewers must be already registered
|
||||
with the code review system, or the upload will fail.
|
||||
|
||||
If the --replace option is passed the user can designate which
|
||||
existing change(s) in Gerrit match up to the commits in the branch
|
||||
being uploaded. For each matched pair of change,commit the commit
|
||||
will be added as a new patch set, completely replacing the set of
|
||||
files and description associated with the change in Gerrit.
|
||||
"""
|
||||
|
||||
def _Options(self, p):
|
||||
@@ -151,7 +157,7 @@ with the code review system, or the upload will fail.
|
||||
_die("nothing uncommented for upload")
|
||||
self._UploadAndReport(todo, people)
|
||||
|
||||
def _ReplaceBranch(self, project):
|
||||
def _ReplaceBranch(self, project, people):
|
||||
branch = project.CurrentBranch
|
||||
if not branch:
|
||||
print >>sys.stdout, "no branches ready for upload"
|
||||
@@ -178,6 +184,7 @@ with the code review system, or the upload will fail.
|
||||
for line in script:
|
||||
m = change_re.match(line)
|
||||
if m:
|
||||
c = m.group(1)
|
||||
f = m.group(2)
|
||||
try:
|
||||
f = full_hashes[f]
|
||||
@@ -185,7 +192,11 @@ with the code review system, or the upload will fail.
|
||||
print 'fh = %s' % full_hashes
|
||||
print >>sys.stderr, "error: commit %s not found" % f
|
||||
sys.exit(1)
|
||||
to_replace[m.group(1)] = f
|
||||
if c in to_replace:
|
||||
print >>sys.stderr,\
|
||||
"error: change %s cannot accept multiple commits" % c
|
||||
sys.exit(1)
|
||||
to_replace[c] = f
|
||||
|
||||
if not to_replace:
|
||||
print >>sys.stderr, "error: no replacements specified"
|
||||
@@ -247,7 +258,7 @@ with the code review system, or the upload will fail.
|
||||
print >>sys.stderr, \
|
||||
'error: --replace requires exactly one project'
|
||||
sys.exit(1)
|
||||
self._ReplaceBranch(project_list[0])
|
||||
self._ReplaceBranch(project_list[0], people)
|
||||
return
|
||||
|
||||
for project in project_list:
|
||||
|
||||
Reference in New Issue
Block a user