2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "largefiles =" >> $HGRCPATH
|
|
|
|
|
|
|
|
Create the repository outside $HOME since largefiles write to
|
|
|
|
$HOME/.cache/largefiles.
|
|
|
|
|
|
|
|
$ hg init test
|
|
|
|
$ cd test
|
|
|
|
$ echo "root" > root
|
|
|
|
$ hg add root
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg commit -m "Root commit" --config extensions.largefiles=!
|
|
|
|
|
|
|
|
Ensure that .hg/largefiles isn't created before largefiles are added
|
|
|
|
#if unix-permissions
|
|
|
|
$ chmod 555 .hg
|
|
|
|
#endif
|
|
|
|
$ hg status
|
|
|
|
#if unix-permissions
|
|
|
|
$ chmod 755 .hg
|
|
|
|
#endif
|
|
|
|
|
|
|
|
$ test -f .hg/largefiles
|
|
|
|
[1]
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ echo "large" > foo
|
|
|
|
$ hg add --large foo
|
|
|
|
$ hg commit -m "Add foo as a largefile"
|
|
|
|
|
|
|
|
$ hg update -r 0
|
|
|
|
getting changed largefiles
|
|
|
|
0 largefiles updated, 1 removed
|
2013-01-23 03:51:53 +04:00
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ echo "normal" > foo
|
|
|
|
$ hg add foo
|
|
|
|
$ hg commit -m "Add foo as normal file"
|
|
|
|
created new head
|
|
|
|
|
|
|
|
Normal file in the working copy, keeping the normal version:
|
|
|
|
|
|
|
|
$ echo "n" | hg merge --config ui.interactive=Yes
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local normal file foo into a largefile
|
2014-10-01 03:04:18 +04:00
|
|
|
use (l)argefile or keep (n)ormal file? n
|
2014-12-06 03:45:52 +03:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
(branch merge, don't forget to commit)
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ hg status
|
|
|
|
$ cat foo
|
|
|
|
normal
|
|
|
|
|
|
|
|
Normal file in the working copy, keeping the largefile version:
|
|
|
|
|
|
|
|
$ hg update -q -C
|
|
|
|
$ echo "l" | hg merge --config ui.interactive=Yes
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local normal file foo into a largefile
|
2014-10-01 03:04:18 +04:00
|
|
|
use (l)argefile or keep (n)ormal file? l
|
|
|
|
getting changed largefiles
|
2011-12-09 20:35:00 +04:00
|
|
|
1 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ hg status
|
|
|
|
M foo
|
|
|
|
|
|
|
|
$ hg diff --nodates
|
|
|
|
diff -r fa129ab6b5a7 .hglf/foo
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/.hglf/foo
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+7f7097b041ccf68cc5561e9600da4655d21c6d18
|
|
|
|
diff -r fa129ab6b5a7 foo
|
|
|
|
--- a/foo
|
|
|
|
+++ /dev/null
|
|
|
|
@@ -1,1 +0,0 @@
|
|
|
|
-normal
|
|
|
|
|
|
|
|
$ cat foo
|
|
|
|
large
|
|
|
|
|
|
|
|
Largefile in the working copy, keeping the normal version:
|
|
|
|
|
|
|
|
$ hg update -q -C -r 1
|
|
|
|
$ echo "n" | hg merge --config ui.interactive=Yes
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local largefile foo into a normal file
|
2014-10-01 03:04:18 +04:00
|
|
|
keep (l)argefile or use (n)ormal file? n
|
|
|
|
getting changed largefiles
|
2011-12-09 20:35:00 +04:00
|
|
|
0 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ hg status
|
|
|
|
M foo
|
|
|
|
|
|
|
|
$ hg diff --nodates
|
|
|
|
diff -r ff521236428a .hglf/foo
|
|
|
|
--- a/.hglf/foo
|
|
|
|
+++ /dev/null
|
|
|
|
@@ -1,1 +0,0 @@
|
|
|
|
-7f7097b041ccf68cc5561e9600da4655d21c6d18
|
|
|
|
diff -r ff521236428a foo
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/foo
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+normal
|
|
|
|
|
|
|
|
$ cat foo
|
|
|
|
normal
|
|
|
|
|
|
|
|
Largefile in the working copy, keeping the largefile version:
|
|
|
|
|
|
|
|
$ hg update -q -C -r 1
|
|
|
|
$ echo "l" | hg merge --config ui.interactive=Yes
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local largefile foo into a normal file
|
2014-10-01 03:04:18 +04:00
|
|
|
keep (l)argefile or use (n)ormal file? l
|
2014-12-06 03:51:37 +03:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
(branch merge, don't forget to commit)
|
2011-12-09 20:35:00 +04:00
|
|
|
|
|
|
|
$ hg status
|
|
|
|
|
|
|
|
$ cat foo
|
|
|
|
large
|
2012-06-11 03:40:51 +04:00
|
|
|
|
2013-10-24 22:33:59 +04:00
|
|
|
Whatever ... commit something so we can invoke merge when updating
|
|
|
|
|
|
|
|
$ hg commit -m '3: Merge'
|
|
|
|
|
|
|
|
Updating from largefile to normal - no reason to prompt
|
|
|
|
|
|
|
|
$ hg up -r 2
|
|
|
|
getting changed largefiles
|
|
|
|
0 largefiles updated, 0 removed
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ cat foo
|
|
|
|
normal
|
|
|
|
|
|
|
|
(the update above used to leave the working dir in a very weird state - clean it
|
|
|
|
$ hg up -qr null
|
|
|
|
$ hg up -qr 2
|
|
|
|
)
|
|
|
|
|
|
|
|
Updating from normal to largefile - no reason to prompt
|
|
|
|
|
|
|
|
$ hg up -r 3
|
|
|
|
getting changed largefiles
|
|
|
|
1 largefiles updated, 0 removed
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ cat foo
|
|
|
|
large
|
|
|
|
|
2012-06-11 03:40:51 +04:00
|
|
|
$ cd ..
|
2013-10-29 01:34:05 +04:00
|
|
|
|
|
|
|
|
|
|
|
Systematic testing of merges involving largefiles:
|
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
Ancestor: normal Parent: normal-id Parent: large result: large
|
|
|
|
Ancestor: normal Parent: normal2 Parent: large result: ?
|
|
|
|
Ancestor: large Parent: large-id Parent: normal result: normal
|
|
|
|
Ancestor: large Parent: large2 Parent: normal result: ?
|
2013-10-29 01:34:05 +04:00
|
|
|
|
|
|
|
All cases should try merging both ways.
|
|
|
|
|
|
|
|
Prepare test repo:
|
|
|
|
|
|
|
|
$ hg init merges
|
|
|
|
$ cd merges
|
2014-07-18 04:17:17 +04:00
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
prepare cases with "normal" ancestor:
|
2014-07-18 04:17:17 +04:00
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg up -qr null
|
2013-10-29 01:34:05 +04:00
|
|
|
$ echo normal > f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -Aqm "normal-ancestor"
|
|
|
|
$ hg tag -l "normal-ancestor"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ touch f2
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -Aqm "normal-id"
|
|
|
|
$ hg tag -l "normal-id"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ echo normal2 > f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -m "normal2"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg tag -l "normal2"
|
2014-12-01 04:11:17 +03:00
|
|
|
$ echo normal > f
|
|
|
|
$ hg ci -Aqm "normal-same"
|
|
|
|
$ hg tag -l "normal-same"
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg up -qr "normal-ancestor"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg rm f
|
|
|
|
$ echo large > f
|
|
|
|
$ hg add --large f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -qm "large"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg tag -l "large"
|
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
prepare cases with "large" ancestor:
|
2013-10-29 01:34:05 +04:00
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg up -qr null
|
2013-10-29 01:34:05 +04:00
|
|
|
$ echo large > f
|
|
|
|
$ hg add --large f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -qm "large-ancestor"
|
|
|
|
$ hg tag -l "large-ancestor"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ touch f2
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -Aqm "large-id"
|
|
|
|
$ hg tag -l "large-id"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ echo large2 > f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -m "large2"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg tag -l "large2"
|
2014-12-01 04:11:17 +03:00
|
|
|
$ echo large > f
|
|
|
|
$ hg ci -Aqm "large-same"
|
|
|
|
$ hg tag -l "large-same"
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg up -qr "large-ancestor"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg rm f
|
|
|
|
$ echo normal > f
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg ci -qAm "normal"
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg tag -l "normal"
|
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg log -GT '{tags}'
|
|
|
|
@ normal tip
|
|
|
|
|
|
2014-12-01 04:11:17 +03:00
|
|
|
| o large-same
|
|
|
|
| |
|
2014-12-01 04:10:57 +03:00
|
|
|
| o large2
|
|
|
|
| |
|
|
|
|
| o large-id
|
|
|
|
|/
|
|
|
|
o large-ancestor
|
|
|
|
|
|
|
|
o large
|
|
|
|
|
|
2014-12-01 04:11:17 +03:00
|
|
|
| o normal-same
|
|
|
|
| |
|
2014-12-01 04:10:57 +03:00
|
|
|
| o normal2
|
|
|
|
| |
|
|
|
|
| o normal-id
|
|
|
|
|/
|
|
|
|
o normal-ancestor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ancestor: normal Parent: normal-id Parent: large result: large
|
|
|
|
|
|
|
|
$ hg up -Cqr normal-id
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg merge -r large
|
|
|
|
getting changed largefiles
|
|
|
|
1 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr large
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg merge -r normal-id
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
2014-12-01 04:11:17 +03:00
|
|
|
Ancestor: normal Parent: normal-same Parent: large result: large
|
|
|
|
|
|
|
|
$ hg up -Cqr normal-same
|
|
|
|
$ hg merge -r large
|
|
|
|
getting changed largefiles
|
|
|
|
1 largefiles updated, 0 removed
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr large
|
|
|
|
$ hg merge -r normal-same
|
2014-12-01 04:30:21 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2014-12-01 04:11:17 +03:00
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
2013-10-29 01:34:05 +04:00
|
|
|
Ancestor: normal Parent: normal2 Parent: large result: ?
|
|
|
|
(annoying extra prompt ... but it do not do any serious harm)
|
|
|
|
|
|
|
|
$ hg up -Cqr normal2
|
|
|
|
$ hg merge -r large
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local normal file f into a largefile
|
|
|
|
use (l)argefile or keep (n)ormal file? l
|
2013-10-29 01:34:05 +04:00
|
|
|
getting changed largefiles
|
|
|
|
1 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
|
|
|
$ hg up -Cqr normal2
|
2014-12-12 08:21:21 +03:00
|
|
|
$ echo n | hg merge -r large --config ui.interactive=Yes
|
2014-10-01 03:04:18 +04:00
|
|
|
remote turned local normal file f into a largefile
|
|
|
|
use (l)argefile or keep (n)ormal file? n
|
2014-12-06 03:45:52 +03:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
normal2
|
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr large
|
|
|
|
$ hg merge -r normal2
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local largefile f into a normal file
|
|
|
|
keep (l)argefile or use (n)ormal file? l
|
2014-12-06 03:51:37 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large
|
|
|
|
|
|
|
|
$ hg up -Cqr large
|
2014-12-12 08:21:21 +03:00
|
|
|
$ echo n | hg merge -r normal2 --config ui.interactive=Yes
|
2014-10-01 03:04:18 +04:00
|
|
|
remote turned local largefile f into a normal file
|
|
|
|
keep (l)argefile or use (n)ormal file? n
|
|
|
|
getting changed largefiles
|
2013-10-29 01:34:05 +04:00
|
|
|
0 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
normal2
|
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
Ancestor: large Parent: large-id Parent: normal result: normal
|
2013-10-29 01:34:05 +04:00
|
|
|
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg up -Cqr large-id
|
2013-10-29 01:34:05 +04:00
|
|
|
$ hg merge -r normal
|
|
|
|
getting changed largefiles
|
|
|
|
0 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
normal
|
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr normal
|
2014-12-01 04:10:57 +03:00
|
|
|
$ hg merge -r large-id
|
2013-10-29 01:34:05 +04:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
|
|
|
normal
|
|
|
|
|
2014-12-01 04:11:17 +03:00
|
|
|
Ancestor: large Parent: large-same Parent: normal result: normal
|
|
|
|
|
|
|
|
$ hg up -Cqr large-same
|
|
|
|
$ hg merge -r normal
|
|
|
|
getting changed largefiles
|
2014-12-01 04:11:29 +03:00
|
|
|
0 largefiles updated, 0 removed
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2014-12-01 04:11:17 +03:00
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
2014-12-01 04:11:29 +03:00
|
|
|
normal
|
2014-12-01 04:11:17 +03:00
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr normal
|
|
|
|
$ hg merge -r large-same
|
2014-12-01 04:30:21 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2014-12-01 04:11:17 +03:00
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
2014-12-01 04:11:29 +03:00
|
|
|
normal
|
2014-12-01 04:11:17 +03:00
|
|
|
|
2013-10-29 01:34:05 +04:00
|
|
|
Ancestor: large Parent: large2 Parent: normal result: ?
|
|
|
|
(annoying extra prompt ... but it do not do any serious harm)
|
|
|
|
|
|
|
|
$ hg up -Cqr large2
|
|
|
|
$ hg merge -r normal
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local largefile f into a normal file
|
|
|
|
keep (l)argefile or use (n)ormal file? l
|
2014-12-06 03:51:37 +03:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large2
|
|
|
|
|
|
|
|
$ hg up -Cqr large2
|
2014-12-12 08:21:21 +03:00
|
|
|
$ echo n | hg merge -r normal --config ui.interactive=Yes
|
|
|
|
remote turned local largefile f into a normal file
|
|
|
|
keep (l)argefile or use (n)ormal file? n
|
2014-10-01 03:04:18 +04:00
|
|
|
getting changed largefiles
|
2013-10-29 01:34:05 +04:00
|
|
|
0 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
normal
|
|
|
|
|
|
|
|
swap
|
|
|
|
|
|
|
|
$ hg up -Cqr normal
|
|
|
|
$ hg merge -r large2
|
2013-10-29 01:34:07 +04:00
|
|
|
remote turned local normal file f into a largefile
|
|
|
|
use (l)argefile or keep (n)ormal file? l
|
2013-10-29 01:34:05 +04:00
|
|
|
getting changed largefiles
|
|
|
|
1 largefiles updated, 0 removed
|
largefiles: update largefiles even if rebase is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if rebase is aborted by conflict. This prevents users from
viewing appropriate largefiles while resolving conflicts.
While rebase, largefiles in the working directory are updated only at
successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if rebase is aborted by conflict, this patch
centralizes the logic of updating largefiles in the working directory
into the "mergeupdate" wrapping "merge.update".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, largefiles in the
working directory should be updated with other (normal) files
simultaneously while "merge.update" execution: maybe by hooking
"applyupdates".
"Action list based updating" introduced by hooking "applyupdates" will
also improve performance of updating, because it automatically
decreases target files to be checked.
Just after this patch, there are some improper things in "Case 0" code
path of "lfilesrepo.commit()":
- "updatelfiles" invocation is redundant for rebase
- detailed comment doesn't meet to rebase behavior
These will be resolved after the subsequent patch for transplant,
because this code path is shared with transplant.
Even though replacing "merge.update" in rebase extension by "hg.merge"
can also avoid this problem, this patch chooses centralizing the logic
into "mergeupdate", because:
- "merge.update" invocation in rebase extension can't be directly
replaced by "hg.merge", because:
- rebase requires some extra arguments, which "hg.merge" doesn't
take (e.g. "ancestor")
- rebase doesn't require statistics information forcibly displayed
in "hg.merge"
- introducing "mergeupdate" can resolve also problem of some other
code paths directly using "merge.update"
largefiles in the working directory aren't updated regardless of
the result of commands below, before this patch:
- backout (for revisions other than the parent revision of the
working directory without "--merge")
- graft
- histedit (for revisions other than the parent of the working
directory
When "partial" is specified, "merge.update" doesn't update dirstate
entries for standins, even though standins themselves are updated.
In this case, "normallookup" should be used to mark largefiles as
"possibly dirty" forcibly, because applying "normal" on lfdirstate
treats them as "clean" unexpectedly.
This is reason why "normallookup=partial" is specified for
"lfcommands.updatelfiles".
This patch doesn't test "hg rebase --continue", because it doesn't
work correctly if largefiles in the working directory are modified
manually while resolving conflicts. This will be fixed in the next
step of refactoring for largefiles.
All changes of tests/*.t files other than test-largefiles-update.t in
this patch come from invoking "updatelfiles" not after but before
statistics output of "hg.update", "hg.clean" and "hg.merge".
2014-08-24 18:47:26 +04:00
|
|
|
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
2013-10-29 01:34:05 +04:00
|
|
|
$ cat f
|
|
|
|
large2
|
|
|
|
|
|
|
|
$ hg up -Cqr normal
|
2014-12-12 08:21:21 +03:00
|
|
|
$ echo n | hg merge -r large2 --config ui.interactive=Yes
|
|
|
|
remote turned local normal file f into a largefile
|
|
|
|
use (l)argefile or keep (n)ormal file? n
|
2014-10-01 03:04:18 +04:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2013-10-29 01:34:05 +04:00
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat f
|
|
|
|
normal
|
|
|
|
|
|
|
|
$ cd ..
|