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
3eb632d9
Commit
3eb632d9
authored
13 years ago
by
Patrick Mezard
Browse files
Options
Downloads
Patches
Plain Diff
extdiff: fix broken symlinks handling (issue1909)
parent
42d51659
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/extdiff.py
+3
-2
3 additions, 2 deletions
hgext/extdiff.py
tests/test-extdiff.t
+14
-0
14 additions, 0 deletions
tests/test-extdiff.t
with
17 additions
and
2 deletions
hgext/extdiff.py
+
3
−
2
View file @
3eb632d9
...
...
@@ -100,7 +100,8 @@
if
'
x
'
in
fctx
.
flags
():
util
.
set_flags
(
dest
,
False
,
True
)
if
node
is
None
:
fns_and_mtime
.
append
((
dest
,
repo
.
wjoin
(
fn
),
os
.
path
.
getmtime
(
dest
)))
fns_and_mtime
.
append
((
dest
,
repo
.
wjoin
(
fn
),
os
.
lstat
(
dest
).
st_mtime
))
return
dirname
,
fns_and_mtime
def
dodiff
(
ui
,
repo
,
diffcmd
,
diffopts
,
pats
,
opts
):
...
...
@@ -222,7 +223,7 @@
util
.
system
(
cmdline
,
cwd
=
tmproot
)
for
copy_fn
,
working_fn
,
mtime
in
fns_and_mtime
:
if
os
.
path
.
getmtime
(
copy_fn
)
!=
mtime
:
if
os
.
lstat
(
copy_fn
).
st_mtime
!=
mtime
:
ui
.
debug
(
'
file changed while diffing.
'
'
Overwriting: %s (src: %s)
\n
'
%
(
working_fn
,
copy_fn
))
util
.
copyfile
(
copy_fn
,
working_fn
)
...
...
This diff is collapsed.
Click to expand it.
tests/test-extdiff.t
+
14
−
0
View file @
3eb632d9
...
...
@@ -167,4 +167,5 @@
$ hg falabala -o this -c 1
diffing this a.8a5febb7f867/a a.34eed99112ab/a
[1]
$ cd ..
...
...
@@ -170,1 +171,14 @@
$ hg init testsymlinks
$ cd testsymlinks
$ echo a > a
$ hg ci -Am adda
adding a
$ echo a >> a
$ ln -s missing linka
$ hg add linka
$ hg falabala -r 0 --traceback
diffing testsymlinks.07f494440405 testsymlinks
[1]
$ cd ..
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