Skip to content

Commit 58ca062

Browse files
author
Matthias Putz
committed
Update: google git-repo v1.12.33
1 parent f2235e7 commit 58ca062

File tree

10 files changed

+148
-72
lines changed

10 files changed

+148
-72
lines changed

SUBMITTING_PATCHES

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Short Version:
44
- Provide a meaningful commit message.
55
- Check for coding errors with pylint
66
- Make sure all code is under the Apache License, 2.0.
7-
- Publish your changes for review:
7+
- Publish your changes for review.
8+
- Make corrections if requested.
9+
- Verify your changes on gerrit so they can be submitted.
810

911
git push https://gerrit-review.googlesource.com/git-repo HEAD:refs/for/master
1012

@@ -75,6 +77,17 @@ Ensure you have obtained an HTTP password to authenticate:
7577

7678
https://gerrit-review.googlesource.com/new-password
7779

80+
Ensure that you have the local commit hook installed to automatically
81+
add a ChangeId to your commits:
82+
83+
curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit-review.googlesource.com/tools/hooks/commit-msg
84+
chmod +x `git rev-parse --git-dir`/hooks/commit-msg
85+
86+
If you have already committed your changes you will need to amend the commit
87+
to get the ChangeId added.
88+
89+
git commit --amend
90+
7891
Push your patches over HTTPS to the review server, possibly through
7992
a remembered remote to make this easier in the future:
8093

@@ -85,3 +98,18 @@ a remembered remote to make this easier in the future:
8598

8699
You will be automatically emailed a copy of your commits, and any
87100
comments made by the project maintainers.
101+
102+
103+
(5) Make changes if requested
104+
105+
The project maintainer who reviews your changes might request changes to your
106+
commit. If you make the requested changes you will need to amend your commit
107+
and push it to the review server again.
108+
109+
110+
(6) Verify your changes on gerrit
111+
112+
After you receive a Code-Review+2 from the maintainer, select the Verified
113+
button on the gerrit page for the change. This verifies that you have tested
114+
your changes and notifies the maintainer that they are ready to be submitted.
115+
The maintainer will then submit your changes to the repository.

docs/manifest-format.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ following DTD:
4747
<!ATTLIST default sync-s CDATA #IMPLIED>
4848

4949
<!ELEMENT manifest-server (EMPTY)>
50-
<!ATTLIST url CDATA #REQUIRED>
50+
<!ATTLIST manifest-server url CDATA #REQUIRED>
5151

5252
<!ELEMENT project (annotation*,
5353
project*,
54-
copyfile?,
55-
linkfile?)>
54+
copyfile*,
55+
linkfile*)>
5656
<!ATTLIST project name CDATA #REQUIRED>
5757
<!ATTLIST project path CDATA #IMPLIED>
5858
<!ATTLIST project remote IDREF #IMPLIED>
@@ -71,14 +71,14 @@ following DTD:
7171
<!ATTLIST annotation keep CDATA "true">
7272

7373
<!ELEMENT copyfile (EMPTY)>
74-
<!ATTLIST src value CDATA #REQUIRED>
75-
<!ATTLIST dest value CDATA #REQUIRED>
74+
<!ATTLIST copyfile src CDATA #REQUIRED>
75+
<!ATTLIST copyfile dest CDATA #REQUIRED>
7676

7777
<!ELEMENT linkfile (EMPTY)>
78-
<!ATTLIST src value CDATA #REQUIRED>
79-
<!ATTLIST dest value CDATA #REQUIRED>
78+
<!ATTLIST linkfile src CDATA #REQUIRED>
79+
<!ATTLIST linkfile dest CDATA #REQUIRED>
8080

81-
<!ELEMENT extend-project>
81+
<!ELEMENT extend-project (EMPTY)>
8282
<!ATTLIST extend-project name CDATA #REQUIRED>
8383
<!ATTLIST extend-project path CDATA #IMPLIED>
8484
<!ATTLIST extend-project groups CDATA #IMPLIED>

git_command.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ def __init__(self,
169169
if p is not None:
170170
s = p + ' ' + s
171171
_setenv(env, 'GIT_CONFIG_PARAMETERS', s)
172+
if 'GIT_ALLOW_PROTOCOL' not in env:
173+
_setenv(env, 'GIT_ALLOW_PROTOCOL',
174+
'file:git:http:https:ssh:persistent-http:persistent-https:sso:rpc')
172175

173176
if project:
174177
if not cwd:

project.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def __linkIt(self, relSrc, absDest):
253253
if not portable.os_path_islink(absDest) or (portable.os_path_realpath(absDest) != relSrc):
254254
try:
255255
# remove existing file first, since it might be read-only
256-
if os.path.exists(absDest):
256+
if os.path.lexists(absDest):
257257
os.remove(absDest)
258258
else:
259259
dest_dir = os.path.dirname(absDest)
@@ -1115,7 +1115,8 @@ def Sync_NetworkHalf(self,
11151115
clone_bundle=True,
11161116
no_tags=False,
11171117
archive=False,
1118-
optimized_fetch=False):
1118+
optimized_fetch=False,
1119+
prune=False):
11191120
"""Perform only the network IO portion of the sync process.
11201121
Local working directory/branch state is not affected.
11211122
"""
@@ -1186,7 +1187,7 @@ def Sync_NetworkHalf(self,
11861187
if (need_to_fetch
11871188
and not self._RemoteFetch(initial=is_new, quiet=quiet, alt_dir=alt_dir,
11881189
current_branch_only=current_branch_only,
1189-
no_tags=no_tags)):
1190+
no_tags=no_tags, prune=prune)):
11901191
return False
11911192

11921193
if self.worktree:
@@ -1587,8 +1588,6 @@ def PruneHeads(self):
15871588

15881589
if kill:
15891590
old = self.bare_git.GetHead()
1590-
if old is None:
1591-
old = 'refs/heads/please_never_use_this_as_a_branch_name'
15921591

15931592
try:
15941593
self.bare_git.DetachHead(rev)
@@ -1600,7 +1599,10 @@ def PruneHeads(self):
16001599
capture_stderr=True)
16011600
b.Wait()
16021601
finally:
1603-
self.bare_git.SetHead(old)
1602+
if ID_RE.match(old):
1603+
self.bare_git.DetachHead(old)
1604+
else:
1605+
self.bare_git.SetHead(old)
16041606
left = self._allrefs
16051607

16061608
for branch in kill:
@@ -1800,7 +1802,8 @@ def _RemoteFetch(self, name=None,
18001802
initial=False,
18011803
quiet=False,
18021804
alt_dir=None,
1803-
no_tags=False):
1805+
no_tags=False,
1806+
prune=False):
18041807

18051808
is_sha1 = False
18061809
tag_name = None
@@ -1913,6 +1916,9 @@ def _RemoteFetch(self, name=None,
19131916
else:
19141917
cmd.append('--tags')
19151918

1919+
if prune:
1920+
cmd.append('--prune')
1921+
19161922
spec = []
19171923
if not current_branch_only:
19181924
# Fetch whole repo

0 commit comments

Comments
 (0)