Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
git-repo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux-tools
git-repo
Commits
7486c3ba
Commit
7486c3ba
authored
Mar 28, 2013
by
Matthias Putz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes: debug option, formatting, ..
parent
e5328a48
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
main.py
main.py
+8
-7
project.py
project.py
+1
-1
repo
repo
+0
-0
upload.py
subcmds/upload.py
+3
-1
No files found.
main.py
View file @
7486c3ba
...
...
@@ -49,7 +49,7 @@ from subcmds import all_commands
from
repo_trace
import
REPO_TRACE
,
IsTrace
,
Trace
global_options
=
optparse
.
OptionParser
(
usage
=
"repo [-p|--paginate|--no-pager|--piped-into-less] COMMAND [ARGS]"
)
global_options
=
optparse
.
OptionParser
(
usage
=
"repo [-p|--paginate|--no-pager|--piped-into-less
|--debug|--debug-host|--debug-env
] COMMAND [ARGS]"
)
global_options
.
add_option
(
'-p'
,
'--paginate'
,
dest
=
'pager'
,
action
=
'store_true'
,
help
=
'display command output in the pager'
)
...
...
@@ -66,6 +66,9 @@ global_options.add_option('--version',
dest
=
'show_version'
,
action
=
'store_true'
,
help
=
'display this version of repo'
)
global_options
.
add_option
(
"--piped-into-pager"
,
action
=
"store_true"
,
dest
=
"pipedIntoPager"
,
default
=
False
)
global_options
.
add_option
(
"--debug"
,
action
=
"store_true"
,
dest
=
"debug"
,
default
=
False
)
global_options
.
add_option
(
"--debug-host"
,
dest
=
"debug_host"
,
default
=
'localhost'
)
global_options
.
add_option
(
"--debug-env"
,
dest
=
"debug_env"
,
default
=
"intellij"
)
def
_UsePager
(
name
,
cmd
,
gopts
,
copts
):
...
...
@@ -438,9 +441,6 @@ def _Main(argv):
help
=
"version of the wrapper script"
)
opt
.
add_option
(
"--wrapper-path"
,
dest
=
"wrapper_path"
,
help
=
"location of the wrapper script"
)
opt
.
add_option
(
"-d"
,
"--debug"
,
action
=
"store_true"
,
dest
=
"debug"
,
default
=
False
)
opt
.
add_option
(
"--debug-host"
,
dest
=
"debug_host"
,
default
=
'localhost'
)
opt
.
add_option
(
"--debug-env"
,
dest
=
"debug_env"
,
default
=
"intellij"
)
_PruneOptions
(
argv
,
opt
)
opt
,
argv
=
opt
.
parse_args
(
argv
)
...
...
@@ -460,9 +460,10 @@ def _Main(argv):
# everything was already done; so exit
return
0
if
opt
.
debug
:
print
(
"enter debug mode, host
%
s"
%
opt
.
debug_host
)
_Debug
(
opt
.
debug_host
,
opt
.
debug_env
)
gopts
=
repo
.
config
[
2
]
if
gopts
.
debug
:
print
(
"enter debug mode, host
%
s"
%
gopts
.
debug_host
)
_Debug
(
gopts
.
debug_host
,
gopts
.
debug_env
)
if
portable
.
isPosix
():
# deactivate pager on posix systems since forked process cant be debugged
os
.
environ
[
'GIT_PAGER'
]
=
''
...
...
project.py
View file @
7486c3ba
...
...
@@ -1139,7 +1139,7 @@ class Project(object):
last_mine
=
None
cnt_mine
=
0
for
commit
in
local_changes
:
commit_id
,
committer_email
=
commit
.
split
(
' '
,
1
)
commit_id
,
committer_email
=
portable
.
stream2str
(
commit
)
.
split
(
' '
,
1
)
if
committer_email
==
self
.
UserEmail
:
last_mine
=
commit_id
cnt_mine
+=
1
...
...
repo
100644 → 100755
View file @
7486c3ba
File mode changed from 100644 to 100755
subcmds/upload.py
View file @
7486c3ba
...
...
@@ -21,6 +21,7 @@ import sys
from
command
import
InteractiveCommand
from
editor
import
Editor
from
error
import
HookError
,
UploadError
import
portable
from
project
import
RepoHook
UNUSUAL_COMMIT_THRESHOLD
=
5
...
...
@@ -186,9 +187,10 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
len
(
commit_list
)
!=
1
and
's'
or
''
,
date
))
for
commit
in
commit_list
:
print
(
'
%
s'
%
commit
)
print
(
'
%
s'
%
portable
.
stream2str
(
commit
)
)
sys
.
stdout
.
write
(
'to
%
s (y/N)? '
%
remote
.
review
)
sys
.
stdout
.
flush
()
answer
=
sys
.
stdin
.
readline
()
.
strip
()
.
lower
()
answer
=
answer
in
(
'y'
,
'yes'
,
'1'
,
'true'
,
't'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment