##// END OF EJS Templates
largefiles: factor out procedures to update standins for pre-committing...
largefiles: factor out procedures to update standins for pre-committing This patch factors out procedures to update standins for pre-committing. This is one of preparations to avoid execution of such procedures according to invocation context. For example, resuming automated committing (e.g. "hg rebase --continue") should update standins at the 1st commit, because largefiles in the working directory may be modified manually. But on the other hand, it should avoid updating standins at subsequent committings for efficiency reason. For simplicity, this patch just moves procedures mechanically only with replacing below. - "self" => "repo" - "lfutil." => (none) - "orig" invocation => returning "match" Using "fstandin" instead "standin" as the name of local variable for the loop below is the only special care, because the latter shadows the same name function in "lfutil.py". [before] for standin in standins: lfile = lfutil.splitstandin(standin) if lfdirstate[lfile] != 'r': lfutil.updatestandin(self, standin) [after] for fstandin in standins: lfile = splitstandin(fstandin) if lfdirstate[lfile] != 'r': updatestandin(repo, fstandin)

File last commit:

r21391:cb158354 default
r23185:9870173e default
Show More
test-up-local-change.t
241 lines | 5.6 KiB | text/troff | Tads3Lexer
/ tests / test-up-local-change.t
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ HGMERGE=true; export HGMERGE
Martin Geisler
tests: remove redundant mkdir...
r13956 $ hg init r1
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ cd r1
$ echo a > a
$ hg addremove
adding a
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "1"
Nicolas Dumazet
tests: unify test-up-local-change
r12120
$ hg clone . ../r2
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ../r2
$ hg up
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo abc > a
$ hg diff --nodates
Martin Geisler
tests: remove unneeded -d flags...
r12156 diff -r c19d34741b0a a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 --- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a
+abc
$ cd ../r1
$ echo b > b
$ echo a2 > a
$ hg addremove
adding b
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "2"
Nicolas Dumazet
tests: unify test-up-local-change
r12120
$ cd ../r2
$ hg -q pull ../r1
$ hg status
M a
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 1
$ hg --debug up
searching for copies back to rev 1
unmatched files in other:
b
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: change priority / ordering of merge actions...
r21389 b: remote created -> g
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting b
updating: b 1/2 files (50.00%)
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 a: versions differ -> m
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 updating: a 2/2 files (100.00%)
Nicolas Dumazet
tests: unify test-up-local-change
r12120 picked tool 'true' for a (binary False symlink False)
merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
$ hg --debug up 0
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: delay debug messages for merge actions...
r18541 b: other deleted -> r
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 removing b
Nicolas Dumazet
tests: unify test-up-local-change
r12120 updating: b 1/2 files (50.00%)
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 a: versions differ -> m
Nicolas Dumazet
tests: unify test-up-local-change
r12120 updating: a 2/2 files (100.00%)
picked tool 'true' for a (binary False symlink False)
merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@1e71731e6fbb+ other a@c19d34741b0a ancestor a@1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 1
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg --debug merge
Kevin Bullock
merge: make 'nothing to merge' aborts consistent...
r15619 abort: nothing to merge
(use 'hg update' instead)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 1
$ hg --debug up
searching for copies back to rev 1
unmatched files in other:
b
resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: False, force: False, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
Mads Kiilerich
merge: change priority / ordering of merge actions...
r21389 b: remote created -> g
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 getting b
updating: b 1/2 files (50.00%)
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 a: versions differ -> m
Bryan O'Sullivan
tests: update test output (will be folded into parent)
r18631 updating: a 2/2 files (100.00%)
Nicolas Dumazet
tests: unify test-up-local-change
r12120 picked tool 'true' for a (binary False symlink False)
merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@c19d34741b0a+ other a@1e71731e6fbb ancestor a@c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
$ hg -v history
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 files: a b
description:
2
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 files: a
description:
1
$ hg diff --nodates
Martin Geisler
tests: remove unneeded -d flags...
r12156 diff -r 1e71731e6fbb a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 --- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a2
+abc
create a second head
$ cd ../r1
$ hg up 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo b2 > b
$ echo a3 > a
$ hg addremove
adding b
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "3"
Nicolas Dumazet
tests: unify test-up-local-change
r12120 created new head
$ cd ../r2
$ hg -q pull ../r1
$ hg status
M a
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg --debug up
Siddharth Agarwal
update: improve error message for dirty non-linear update with rev
r19800 abort: uncommitted changes
(commit and merge, or update --clean to discard changes)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
$ hg --debug merge
Siddharth Agarwal
merge: standardize error message for dirty working dir
r19802 abort: uncommitted changes
Kevin Bullock
merge: make 'nothing to merge' aborts consistent...
r15619 (use 'hg status' to list changes)
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 [255]
Nicolas Dumazet
tests: unify test-up-local-change
r12120 $ hg --debug merge -f
searching for copies back to rev 1
Mads Kiilerich
copies: when both sides made the same copy, report it as a copy...
r20641 unmatched files new in both:
b
Nicolas Dumazet
tests: unify test-up-local-change
r12120 resolving manifests
Siddharth Agarwal
manifestmerge: pass in branchmerge and force separately...
r18605 branchmerge: True, force: True, partial: False
Martin Geisler
merge: make debug output easier to read...
r15625 ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 preserving a for resolve of a
preserving b for resolve of b
Nicolas Dumazet
tests: unify test-up-local-change
r12120 a: versions differ -> m
updating: a 1/2 files (50.00%)
picked tool 'true' for a (binary False symlink False)
merging a
Martin Geisler
tests: remove unneeded -d flags...
r12156 my a@1e71731e6fbb+ other a@83c51d0caff4 ancestor a@c19d34741b0a
Mads Kiilerich
merge: change debug logging - test output changes but no real changes...
r21391 b: versions differ -> m
Nicolas Dumazet
tests: unify test-up-local-change
r12120 updating: b 2/2 files (100.00%)
picked tool 'true' for b (binary False symlink False)
merging b
Martin Geisler
tests: remove unneeded -d flags...
r12156 my b@1e71731e6fbb+ other b@83c51d0caff4 ancestor b@000000000000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg parents
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 1:1e71731e6fbb
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 2
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 2:83c51d0caff4
Nicolas Dumazet
tests: unify test-up-local-change
r12120 tag: tip
Martin Geisler
tests: remove unneeded -d flags...
r12156 parent: 0:c19d34741b0a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-up-local-change
r12120 summary: 3
$ hg diff --nodates
Martin Geisler
tests: remove unneeded -d flags...
r12156 diff -r 1e71731e6fbb a
Nicolas Dumazet
tests: unify test-up-local-change
r12120 --- a/a
+++ b/a
@@ -1,1 +1,1 @@
-a2
+abc
test a local add
$ cd ..
$ hg init a
$ hg init b
$ echo a > a/a
$ echo a > b/a
$ hg --cwd a commit -A -m a
adding a
$ cd b
$ hg add a
$ hg pull -u ../a
pulling from ../a
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..