Skip to content
Snippets Groups Projects
Commit 7ac03bfa authored by Mads Kiilerich's avatar Mads Kiilerich
Browse files

largefiles: don't crash on 'local renamed directory' actions

a12798938721 introduced splitstandin on all action filenames. It would however
crash on 'd' actions where the filename is None.

Fix that and add test coverage for that case.
parent 7547bcc1
No related branches found
No related tags found
No related merge requests found
......@@ -380,7 +380,7 @@
for action in actions:
f, m, args, msg = action
splitstandin = lfutil.splitstandin(f)
splitstandin = f and lfutil.splitstandin(f)
if (m == "g" and splitstandin is not None and
splitstandin in p1 and splitstandin not in removes):
# Case 1: normal file in the working copy, largefile in
......
......@@ -2192,6 +2192,39 @@
$ cd ..
merge action 'd' for 'local renamed directory to d2/g' which has no filename
$ hg init merge-action
$ cd merge-action
$ touch l
$ hg add --large l
$ mkdir d1
$ touch d1/f
$ hg ci -Aqm0
Invoking status precommit hook
A d1/f
A l
$ echo > d1/f
$ touch d1/g
$ hg ci -Aqm1
Invoking status precommit hook
M d1/f
A d1/g
$ hg up -qr0
$ hg mv d1 d2
moving d1/f to d2/f (glob)
$ hg ci -qm2
Invoking status precommit hook
A d2/f
R d1/f
$ hg merge
merging d2/f and d1/f to d2/f
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
getting changed largefiles
0 largefiles updated, 0 removed
$ cd ..
Check whether "largefiles" feature is supported only in repositories
enabling largefiles extension.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment