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
ddccb22e
Commit
ddccb22e
authored
Mar 18, 2013
by
Matthias Putz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added windows pager
parent
62834956
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
19 deletions
+37
-19
workspace.xml
.idea/workspace.xml
+17
-18
main.py
main.py
+20
-1
No files found.
.idea/workspace.xml
View file @
ddccb22e
...
...
@@ -3,12 +3,11 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
name=
"Default"
comment=
""
>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/main.py"
afterPath=
"$PROJECT_DIR$/main.py"
/>
<change
type=
"MODIFICATION"
beforePath=
"$PROJECT_DIR$/project.py"
afterPath=
"$PROJECT_DIR$/project.py"
/>
</list>
<ignored
path=
"git-repo.iws"
/>
<ignored
path=
".idea/workspace.xml"
/>
<file
path=
"/Dummy.txt"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363590315380"
ignored=
"false"
/>
<file
path=
"/main.py"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363
598089701
"
ignored=
"false"
/>
<file
path=
"/main.py"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363
600781772
"
ignored=
"false"
/>
<file
path=
"/portable.py"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363275619057"
ignored=
"false"
/>
<file
path=
"/a.py"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363252132925"
ignored=
"false"
/>
<file
path=
"/a.dummy"
changelist=
"2c74b80f-dc83-420e-8ea2-4ad07fb0ac68"
time=
"1363594579797"
ignored=
"false"
/>
...
...
@@ -80,13 +79,13 @@
<favorites_list
name=
"git-repo"
/>
</component>
<component
name=
"FileEditorManager"
>
<splitter
split-orientation=
"horizontal"
split-proportion=
"0.
5163934
"
>
<splitter
split-orientation=
"horizontal"
split-proportion=
"0.
684111
"
>
<split-first>
<leaf>
<file
leaf-file-name=
"main.py"
pinned=
"false"
current=
"true"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/main.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"
81"
column=
"21"
selection-start=
"2796"
selection-end=
"2796"
vertical-scroll-proportion=
"0.6992754
"
>
<state
line=
"
417"
column=
"0"
selection-start=
"12997"
selection-end=
"12997"
vertical-scroll-proportion=
"0.39823008
"
>
<folding>
<element
signature=
"e#625#662#0"
expanded=
"true"
/>
</folding>
...
...
@@ -97,7 +96,7 @@
<file
leaf-file-name=
"portable-pager.py"
pinned=
"false"
current=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tests/portable-pager.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"
70"
column=
"6"
selection-start=
"1497"
selection-end=
"1497
"
vertical-scroll-proportion=
"0.0"
>
<state
line=
"
67"
column=
"4"
selection-start=
"1422"
selection-end=
"1422
"
vertical-scroll-proportion=
"0.0"
>
<folding
/>
</state>
</provider>
...
...
@@ -184,7 +183,7 @@
<file
leaf-file-name=
"pager.py"
pinned=
"false"
current=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/pager.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"
55"
column=
"4"
selection-start=
"1423"
selection-end=
"1423"
vertical-scroll-proportion=
"0.3327645
"
>
<state
line=
"
44"
column=
"4"
selection-start=
"1226"
selection-end=
"1226"
vertical-scroll-proportion=
"0.05235602
"
>
<folding>
<element
signature=
"e#603#640#0"
expanded=
"true"
/>
</folding>
...
...
@@ -760,7 +759,7 @@
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/main.py
</url>
<line>
4
16
</line>
<line>
4
32
</line>
<option
name=
"timeStamp"
value=
"18"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"python-line"
>
...
...
@@ -800,12 +799,12 @@
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/main.py
</url>
<line>
15
7
</line>
<line>
15
8
</line>
<option
name=
"timeStamp"
value=
"40"
/>
</line-breakpoint>
<line-breakpoint
enabled=
"true"
type=
"python-line"
>
<url>
file://$PROJECT_DIR$/main.py
</url>
<line>
41
0
</line>
<line>
41
4
</line>
<option
name=
"timeStamp"
value=
"42"
/>
</line-breakpoint>
</breakpoints>
...
...
@@ -913,20 +912,13 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/pager.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"
55"
column=
"4"
selection-start=
"1423"
selection-end=
"1423"
vertical-scroll-proportion=
"0.3327645
"
>
<state
line=
"
44"
column=
"4"
selection-start=
"1226"
selection-end=
"1226"
vertical-scroll-proportion=
"0.05235602
"
>
<folding>
<element
signature=
"e#603#640#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tests/portable-pager.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"70"
column=
"6"
selection-start=
"1497"
selection-end=
"1497"
vertical-scroll-proportion=
"0.0"
>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/project.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"822"
column=
"42"
selection-start=
"26091"
selection-end=
"26091"
vertical-scroll-proportion=
"0.0"
>
...
...
@@ -936,9 +928,16 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tests/portable-pager.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"67"
column=
"4"
selection-start=
"1422"
selection-end=
"1422"
vertical-scroll-proportion=
"0.0"
>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/main.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
line=
"
81"
column=
"21"
selection-start=
"2796"
selection-end=
"2796"
vertical-scroll-proportion=
"0.6992754
"
>
<state
line=
"
417"
column=
"0"
selection-start=
"12997"
selection-end=
"12997"
vertical-scroll-proportion=
"0.39823008
"
>
<folding>
<element
signature=
"e#625#662#0"
expanded=
"true"
/>
</folding>
...
...
main.py
View file @
ddccb22e
...
...
@@ -40,6 +40,7 @@ from error import NoSuchProjectError
from
error
import
RepoChangedException
from
manifest_xml
import
XmlManifest
from
pager
import
RunPager
from
pager
import
_SelectPager
from
subcmds
import
all_commands
...
...
@@ -406,10 +407,25 @@ def _Debug(host, env):
sys
.
stderr
.
write
(
"Error: you must add pydevd in a pysrc folder (e.g. in eclipse plugin) to your PYTHONPATH.
\n
"
)
sys
.
exit
(
1
)
# If program runs in Windows and a Pager is required, fork has to circumvented:
# make a system call of the current script with the additional parameter '--no-pager' and
# append a pipe for the pager, e.g. '| less'
def
_WindowsPager
(
repo
):
(
name
,
cmd
,
gopts
,
_gargs
,
copts
,
cargs
,
argv
)
=
repo
.
config
if
_UsePager
(
name
,
cmd
,
gopts
,
copts
):
print
(
"USE PAGER"
)
python
=
sys
.
executable
thisScript
=
os
.
path
.
abspath
(
__file__
)
args
=
sys
.
argv
[
1
:]
argsSplit
=
args
.
index
(
'--'
)
args1
=
args
[:
argsSplit
]
args2
=
args
[
argsSplit
+
1
:]
pager
=
_SelectPager
(
cmd
.
manifest
.
globalConfig
)
shellCommand
=
"
%
s
%
s
%
s -- --no-pager
%
s |
%
s"
%
(
python
,
thisScript
,
' '
.
join
(
args1
),
' '
.
join
(
args2
),
pager
)
print
(
"EXECUTE:
%
s"
%
shellCommand
)
os
.
system
(
shellCommand
)
return
True
return
False
...
...
@@ -438,8 +454,11 @@ def _Main(argv):
repo
=
_Repo
(
opt
.
repodir
)
repo
.
_Config
(
argv
)
# intercept here if on Windows and Pager is required
if
not
portable
.
isLinux
():
if
_WindowsPager
(
repo
):
# everything was already done; so exit
exit
(
0
);
if
opt
.
debug
:
...
...
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