<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/error.py, branch v1.12.28</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v1.12.28</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v1.12.28'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2015-06-04T00:21:16+00:00</updated>
<entry>
<title>error: fix typos</title>
<updated>2015-06-04T00:21:16+00:00</updated>
<author>
<name>Anthony King</name>
<email>anthonydking@slimroms.net</email>
</author>
<published>2015-06-03T15:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=be4456cf249f29371eef41bed4e15f6d3c1a2cc0'/>
<id>urn:sha1:be4456cf249f29371eef41bed4e15f6d3c1a2cc0</id>
<content type='text'>
Change-Id: I09c47024ef54c360ea3c15c5d4f169e13444e412
</content>
</entry>
<entry>
<title>More verbose errors for NoManifestExceptions.</title>
<updated>2014-03-11T05:33:43+00:00</updated>
<author>
<name>Dan Sandler</name>
<email>dsandler@android.com</email>
</author>
<published>2014-03-09T17:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=53e902a19b0b80e07ac55966d13c5c84c5b0e8ce'/>
<id>urn:sha1:53e902a19b0b80e07ac55966d13c5c84c5b0e8ce</id>
<content type='text'>
The old "manifest required for this command -- please run
init" is replaced by a more helpful message that lists the
command repo was trying to execute (with arguments) as well
as the str() of the NoManifestException. For example:

&gt; error: in `sync`: [Errno 2] No such file or directory:
&gt; 	'path/to/.repo/manifests/.git/HEAD'
&gt; error: manifest missing or unreadable -- please run init

Other failure points in basic command parsing and dispatch
are more clearly explained in the same fashion.

Change-Id: I6212e5c648bc5d57e27145d55a5391ca565e4149
</content>
</entry>
<entry>
<title>Raise a NoManifestException when the manifest DNE</title>
<updated>2012-11-16T02:50:11+00:00</updated>
<author>
<name>Conley Owens</name>
<email>cco3@android.com</email>
</author>
<published>2012-11-16T01:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=75ee0570da09abb1d2bbefe0d25f0560727e6b71'/>
<id>urn:sha1:75ee0570da09abb1d2bbefe0d25f0560727e6b71</id>
<content type='text'>
When a command (eg, `repo forall`) expects the manifest project to
exist, but there is no manifest, an IOException gets raised.  This
change defines a new Exception type to be raised in these cases and
raises it when project.py fails to read the manifest.

Change-Id: Iac576c293a37f7d8f60cd4f6aa95b2c97f9e7957
</content>
</entry>
<entry>
<title>More coding style cleanup</title>
<updated>2012-10-22T03:30:14+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>david.pursehouse@sonymobile.com</email>
</author>
<published>2012-10-11T07:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5c6eeac8f0350fd6b14cf226ffcff655f1dd9582'/>
<id>urn:sha1:5c6eeac8f0350fd6b14cf226ffcff655f1dd9582</id>
<content type='text'>
Fixing more issues found with pylint.  Some that were supposed to
have been fixed in the previous sweep (Ie0db839e) but were missed:

C0321: More than one statement on a single line
W0622: Redefining built-in 'name'

And some more:

W0631: Using possibly undefined loop variable 'name'
W0223: Method 'name' is abstract in class 'name' but is not overridden
W0231: __init__ method from base class 'name' is not called

Change-Id: Ie119183708609d6279e973057a385fde864230c3
</content>
</entry>
<entry>
<title>Coding style cleanup</title>
<updated>2012-10-09T10:45:30+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>david.pursehouse@sonymobile.com</email>
</author>
<published>2012-09-24T03:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8a68ff96057ec58e524a3e41a2d8dca7b5d016bc'/>
<id>urn:sha1:8a68ff96057ec58e524a3e41a2d8dca7b5d016bc</id>
<content type='text'>
Fix the following issues reported by pylint:

C0321: More than one statement on a single line
W0622: Redefining built-in 'name'
W0612: Unused variable 'name'
W0613: Unused argument 'name'
W0102: Dangerous default value 'value' as argument
W0105: String statement has no effect

Also fixed a few cases of inconsistent indentation.

Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
</content>
</entry>
<entry>
<title>Remove `ImportError` class</title>
<updated>2012-10-04T08:31:09+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>david.pursehouse@sonymobile.com</email>
</author>
<published>2012-10-03T06:47:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b926116a1483d04df99252ed02418bf8e58094a3'/>
<id>urn:sha1:b926116a1483d04df99252ed02418bf8e58094a3</id>
<content type='text'>
The definition of `ImportError` redefines the Python built-in
class of the same name.

It is not used anywhere, so remove it.

Change-Id: I557ce28c93a3306fff72873dc6f477330fc33128
</content>
</entry>
<entry>
<title>Add manifest groups</title>
<updated>2012-04-13T16:46:00+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2012-03-29T03:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5acde75e5d70b323197ffb2c9d4fdea3612098f5'/>
<id>urn:sha1:5acde75e5d70b323197ffb2c9d4fdea3612098f5</id>
<content type='text'>
Allows specifying a list of groups with a -g argument to repo init.
The groups act on a group= attribute specified on projects in the
manifest.
All projects are implicitly labelled with "default" unless they are
explicitly labelled "-default".
Prefixing a group with "-" removes matching projects from the list
of projects to sync.
If any non-inverted manifest groups are specified, the default label
is ignored.

Change-Id: I3a0dd7a93a8a1756205de1d03eee8c00906af0e5
Reviewed-on: https://gerrit-review.googlesource.com/34570
Reviewed-by: Shawn Pearce &lt;sop@google.com&gt;
Tested-by: Shawn Pearce &lt;sop@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Support downloading bundle to initialize repository</title>
<updated>2011-09-28T17:07:36+00:00</updated>
<author>
<name>Shawn O. Pearce</name>
<email>sop@google.com</email>
</author>
<published>2011-09-19T21:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f322b9abb4cadc67b991baf6ba1b9f2fbd5d7812'/>
<id>urn:sha1:f322b9abb4cadc67b991baf6ba1b9f2fbd5d7812</id>
<content type='text'>
An HTTP (or HTTPS) based remote server may now offer a 'clone.bundle'
file in each repository's Git directory. Over an http:// or https://
remote repo will first ask for '$URL/clone.bundle', and if present
download this to bootstrap the local client, rather than relying
on the native Git transport to initialize the new repository.

Bundles may be hosted elsewhere. The client automatically follows a
HTTP 302 redirect to acquire the bundle file. This allows servers
to direct clients to cached copies residing on content delivery
networks, where the bundle may be closer to the end-user.

Bundle downloads are resumeable from where they last left off,
allowing clients to initialize large repositories even when the
connection gets interrupted.

If a bundle does not exist for a repository (a HTTP 404 response
code is returned for '$URL/clone.bundle'), the native Git transport
is used instead. If the client is performing a shallow sync, the
bundle transport is not used, as there is no way to embed shallow
data into the bundle.

Change-Id: I05dad17792fd6fd20635a0f71589566e557cc743
Signed-off-by: Shawn O. Pearce &lt;sop@google.com&gt;
</content>
</entry>
<entry>
<title>Support repo-level pre-upload hook and prep for future hooks.</title>
<updated>2011-03-11T19:53:23+00:00</updated>
<author>
<name>Doug Anderson</name>
<email>dianders@google.com</email>
</author>
<published>2011-03-04T19:54:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=37282b4b9c5b1d9a1ff07f7f0686a81b65a0a5c6'/>
<id>urn:sha1:37282b4b9c5b1d9a1ff07f7f0686a81b65a0a5c6</id>
<content type='text'>
All repo-level hooks are expected to live in a single project at the
top level of that project.  The name of the hooks project is provided
in the manifest.xml.  The manifest also lists which hooks are enabled
to make it obvious if a file somehow failed to sync down (or got
deleted).

Before running any hook, we will prompt the user to make sure that it
is OK.  A user can deny running the hook, allow once, or allow
"forever" (until hooks change).  This tries to keep with the git
spirit of not automatically running anything on the user's computer
that got synced down.  Note that individual repo commands can add
always options to avoid these prompts as they see fit (see below for
the 'upload' options).

When hooks are run, they are loaded into the current interpreter (the
one running repo) and their main() function is run.  This mechanism is
used (instead of using subprocess) to make it easier to expand to a
richer hook interface in the future.  During loading, the
interpreter's sys.path is updated to contain the directory containing
the hooks so that hooks can be split into multiple files.

The upload command has two options that control hook behavior:
  - no-verify=False, verify=False (DEFAULT):
    If stdout is a tty, can prompt about running upload hooks if needed.
    If user denies running hooks, the upload is cancelled.  If stdout is
    not a tty and we would need to prompt about upload hooks, upload is
    cancelled.
  - no-verify=False, verify=True:
    Always run upload hooks with no prompt.
  - no-verify=True, verify=False:
    Never run upload hooks, but upload anyway (AKA bypass hooks).
  - no-verify=True, verify=True:
    Invalid

Sample bit of manifest.xml code for enabling hooks (assumes you have a
project named 'hooks' where hooks are stored):
  &lt;repo-hooks in-project="hooks" enabled-list="pre-upload" /&gt;

Sample main() function in pre-upload.py in hooks directory:
  def main(project_list, **kwargs):
    print ('These projects will be uploaded: %s' %
           ', '.join(project_list))
    print ('I am being a good boy and ignoring anything in kwargs\n'
           'that I don\'t understand.')
    print 'I fail 50% of the time.  How flaky.'
    if random.random() &lt;= .5:
      raise Exception('Pre-upload hook failed.  Have a nice day.')

Change-Id: I5cefa2cd5865c72589263cf8e2f152a43c122f70
</content>
</entry>
<entry>
<title>Document any crashes from the user's text editor</title>
<updated>2009-06-24T14:15:21+00:00</updated>
<author>
<name>Shawn O. Pearce</name>
<email>sop@google.com</email>
</author>
<published>2009-06-24T14:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=54fccd71fbdc60adf99b9a9bf4712c121d4312ba'/>
<id>urn:sha1:54fccd71fbdc60adf99b9a9bf4712c121d4312ba</id>
<content type='text'>
Rather than failing with no information, display the child exit
status and the command line we tried to use to edit a text file.
There may be some useful information to help understand the crash.

Signed-off-by: Shawn O. Pearce &lt;sop@google.com&gt;
</content>
</entry>
</feed>
