Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
6f750e76fb46
Commit
6f750e76fb46
authored
16 years ago
by
Benoit Boissinot
Browse files
Options
Downloads
Patches
Plain Diff
dirstate.walk: skip unreadable directories (issue1213)
Do not abort on permission denied error, just skip the directory.
parent
8a5c88c7e97b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mercurial/dirstate.py
+9
-2
9 additions, 2 deletions
mercurial/dirstate.py
tests/test-permissions
+7
-0
7 additions, 0 deletions
tests/test-permissions
tests/test-permissions.out
+4
-0
4 additions, 0 deletions
tests/test-permissions.out
with
20 additions
and
2 deletions
mercurial/dirstate.py
+
9
−
2
View file @
6f750e76
...
...
@@ -492,5 +492,6 @@
nd
=
work
.
pop
()
if
hasattr
(
match
,
'
dir
'
):
match
.
dir
(
nd
)
skip
=
None
if
nd
==
'
.
'
:
nd
=
''
...
...
@@ -495,4 +496,3 @@
if
nd
==
'
.
'
:
nd
=
''
entries
=
listdir
(
join
(
nd
),
stat
=
True
)
else
:
...
...
@@ -498,5 +498,12 @@
else
:
entries
=
listdir
(
join
(
nd
),
stat
=
True
,
skip
=
'
.hg
'
)
skip
=
'
.hg
'
try
:
entries
=
listdir
(
join
(
nd
),
stat
=
True
,
skip
=
skip
)
except
OSError
,
inst
:
if
inst
.
errno
==
errno
.
EACCES
:
fwarn
(
nd
,
inst
.
strerror
)
continue
raise
for
f
,
kind
,
st
in
entries
:
nf
=
normalize
(
nd
and
(
nd
+
"
/
"
+
f
)
or
f
,
True
)
if
nf
not
in
results
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-permissions
+
7
−
0
View file @
6f750e76
...
...
@@ -16,3 +16,10 @@
chmod
-w
.
hg diff
--nodates
chmod
+w
.
chmod
+w .hg/store/data/a.i
mkdir dir
touch dir
/a
hg status
chmod
-rx
dir
hg status
This diff is collapsed.
Click to expand it.
tests/test-permissions.out
+
4
−
0
View file @
6f750e76
...
...
@@ -20,3 +20,7 @@
@@ -1,1 +1,1 @@
-foo
+barber
M a
? dir/a
dir: Permission denied
M a
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment