view tests/test-commandserver.py.out @ 22288:4e2559841d6c

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".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 24 Aug 2014 23:47:26 +0900
parents 9a299c39de01
children
line wrap: on
line source


testing hellomessage:

o, 'capabilities: getencoding runcommand\nencoding: ***'
 runcommand id
000000000000 tip

testing unknowncommand:

abort: unknown command unknowncommand

testing checkruncommand:

 runcommand 
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge working directory with another revision
 pull          pull changes from the specified source
 push          push changes to the specified destination
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

(use "hg help" for the full list of commands or "hg -v" for details)
 runcommand id --quiet
000000000000
 runcommand id
000000000000 tip
 runcommand id --config ui.quiet=True
000000000000
 runcommand id
000000000000 tip
 runcommand id -runknown
abort: unknown revision 'unknown'!
 [255]

testing inputeof:

server exit code = 1

testing serverinput:

 runcommand import -
applying patch from stdin
 runcommand log
changeset:   0:eff892de26ec
tag:         tip
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     1


testing cwd:

 runcommand --cwd foo st bar
? bar
 runcommand st foo/bar
? foo/bar

testing localhgrc:

 runcommand showconfig
bundle.mainreporoot=$TESTTMP/repo
defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
defaults.shelve=--date "0 0"
defaults.tag=-d "0 0"
ui.slash=True
ui.interactive=False
ui.mergemarkers=detailed
ui.foo=bar
ui.nontty=true
 runcommand init foo
 runcommand -R foo showconfig ui defaults
defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
defaults.shelve=--date "0 0"
defaults.tag=-d "0 0"
ui.slash=True
ui.interactive=False
ui.mergemarkers=detailed
ui.nontty=true

testing hookoutput:

 runcommand --config hooks.pre-identify=python:test-commandserver.hook id
hook talking
now try to read something: 'some input'
eff892de26ec tip

testing outsidechanges:

 runcommand status
M a
 runcommand tip
changeset:   1:d3a0a68be6de
tag:         tip
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     2

 runcommand status

testing bookmarks:

 runcommand bookmarks
no bookmarks set
 runcommand bookmarks
   bm1                       1:d3a0a68be6de
   bm2                       1:d3a0a68be6de
 runcommand bookmarks
 * bm1                       1:d3a0a68be6de
   bm2                       1:d3a0a68be6de
 runcommand bookmarks bm3
 runcommand commit -Amm
 runcommand bookmarks
   bm1                       1:d3a0a68be6de
   bm2                       1:d3a0a68be6de
 * bm3                       2:aef17e88f5f0

testing tagscache:

 runcommand id -t -r 0

 runcommand id -t -r 0
foo

testing setphase:

 runcommand phase -r .
3: draft
 runcommand phase -r .
3: public

testing rollback:

 runcommand phase -r . -p
no phases changed
 [1]
 runcommand commit -Am.
 runcommand rollback
repository tip rolled back to revision 3 (undo commit)
working directory now based on revision 3
 runcommand phase -r .
3: public

testing branch:

 runcommand branch
default
marked working directory as branch foo
(branches are permanent and global, did you want a bookmark?)
 runcommand branch
foo
marked working directory as branch default
(branches are permanent and global, did you want a bookmark?)

testing hgignore:

 runcommand commit -Am.
adding .hgignore
 runcommand status -i -u
I ignored-file

testing phasecacheafterstrip:

 runcommand update -C 0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
(leaving bookmark bm3)
 runcommand commit -Am. a
created new head
 runcommand log -Gq
@  5:731265503d86
|
| o  4:7966c8e3734d
| |
| o  3:b9b85890c400
| |
| o  2:aef17e88f5f0
| |
| o  1:d3a0a68be6de
|/
o  0:eff892de26ec

 runcommand phase -p .
 runcommand phase .
5: public
 runcommand branches
default                        1:731265503d86

testing obsolete:

 runcommand up null
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 runcommand phase -df tip
 runcommand log --hidden
changeset:   1:731265503d86
tag:         tip
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     .

changeset:   0:eff892de26ec
bookmark:    bm1
bookmark:    bm2
bookmark:    bm3
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     1

 runcommand log
changeset:   0:eff892de26ec
bookmark:    bm1
bookmark:    bm2
bookmark:    bm3
tag:         tip
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     1


testing mqoutsidechanges:

 runcommand qapplied
 runcommand qapplied
0.diff
 runcommand qpop --all
popping 0.diff
patch queue now empty
 runcommand qqueue --active
foo

testing getpass:

 runcommand debuggetpass --config ui.interactive=True
password: 1234

testing hellomessage:

o, 'capabilities: getencoding runcommand\nencoding: ***'
 runcommand id
abort: there is no Mercurial repository here (.hg not found)
 [255]

testing startwithoutrepo:

 runcommand init repo2
 runcommand id -R repo2
000000000000 tip