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
9d774a10
Commit
9d774a10
authored
13 years ago
by
Matt Mackall
Browse files
Options
Downloads
Plain Diff
merge with stable
parents
7c06e9c3
85cba926
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/largefiles/lfcommands.py
+5
-1
5 additions, 1 deletion
hgext/largefiles/lfcommands.py
tests/test-largefiles-cache.t
+70
-0
70 additions, 0 deletions
tests/test-largefiles-cache.t
with
75 additions
and
1 deletion
hgext/largefiles/lfcommands.py
+
5
−
1
View file @
9d774a10
...
...
@@ -437,7 +437,11 @@
(
not
os
.
path
.
exists
(
abslfile
)
or
expecthash
!=
lfutil
.
hashfile
(
abslfile
))):
if
not
lfutil
.
copyfromcache
(
repo
,
expecthash
,
lfile
):
return
None
# don't try to set the mode or update the dirstate
# use normallookup() to allocate entry in largefiles dirstate,
# because lack of it misleads lfiles_repo.status() into
# recognition that such cache missing files are REMOVED.
lfdirstate
.
normallookup
(
lfile
)
return
None
# don't try to set the mode
ret
=
1
mode
=
os
.
stat
(
absstandin
).
st_mode
if
mode
!=
os
.
stat
(
abslfile
).
st_mode
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-largefiles-cache.t
0 → 100644
+
70
−
0
View file @
9d774a10
Create
user
cache
directory
$
USERCACHE
=
`
pwd
`
/
cache
;
export
USERCACHE
$
cat
<<
EOF
>>
$
{
HGRCPATH
}
>
[
extensions
]
>
hgext
.
largefiles
=
>
[
largefiles
]
>
usercache
=
$
{
USERCACHE
}
>
EOF
$
mkdir
-
p
$
{
USERCACHE
}
Create
source
repo
,
and
commit
adding
largefile
.
$
hg
init
src
$
cd
src
$
echo
large
>
large
$
hg
add
--
large
large
$
hg
commit
-
m 'add largefile'
$
cd
..
Discard
all
cached
largefiles
in
USERCACHE
$
rm
-
rf
$
{
USERCACHE
}
Create
mirror
repo
,
and
pull
from
source
without
largefile:
"
pull
"
is
used
instead
of
"
clone
"
for
suppression
of
(
1
)
updating
to
tip
(
=
cahcing
largefile
from
source
repo
),
and
(
2
)
recording
source
repo
as
"
default
"
path
in
.
hg
/
hgrc
.
$
hg
init
mirror
$
cd
mirror
$
hg
pull
../
src
pulling
from
../
src
requesting
all
changes
adding
changesets
adding
manifests
adding
file
changes
added
1
changesets
with
1
changes
to
1
files
(
run
'
hg update
'
to
get
a
working
copy
)
Update
working
directory
to
"
tip
",
which
requires
largefile
("
large
"),
but
there
is
no
cache
file
for
it
.
So
,
hg
must
treat
it
as
"
missing
"(
!
)
file
.
$
hg
update
1
files
updated
,
0
files
merged
,
0
files
removed
,
0
files
unresolved
getting
changed
largefiles
large:
Can
'
t get file locally
(no default or default-push path set in hgrc)
0 largefiles updated, 0 removed
$ hg status
! large
Update working directory to null: this cleanup .hg/largefiles/dirstate
$ hg update null
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
getting changed largefiles
0 largefiles updated, 0 removed
Update working directory to tip, again.
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
getting changed largefiles
large: Can
'
t
get
file
locally
(
no
default
or
default
-
push
path
set
in
hgrc
)
0
largefiles
updated
,
0
removed
$
hg
status
!
large
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