##// END OF EJS Templates
tests: fix builtin module test on pypy...
tests: fix builtin module test on pypy On pypy datetime and cProfile are modules written in Python, not in C. For the purpose of this test, just list them explicitely as builtins, which silences warnings about them being imported before stdlib modules.

File last commit:

r28192:cb6a952e stable
r28713:806d260c default
Show More
test-revert.t
1147 lines | 31.3 KiB | text/troff | Tads3Lexer
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg init repo
$ cd repo
$ echo 123 > a
$ echo 123 > c
$ echo 123 > e
$ hg add a c e
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "first" a c e
Adrian Buehlmann
test-revert: add case for nothing changed
r14745
nothing changed
$ hg revert
abort: no files or directories specified
Adrian Buehlmann
revert: improve hints on abort when reverting to parent without --all...
r14755 (use --all to revert all files)
Adrian Buehlmann
test-revert: add case for nothing changed
r14745 [255]
Adrian Buehlmann
test-revert: add revert --all case when nothing changed...
r14767 $ hg revert --all
Adrian Buehlmann
test-revert: add case for nothing changed
r14745
Pierre-Yves David
test-revert: improve comment...
r22099 Introduce some changes and revert them
--------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106 $ echo 123 > b
$ hg status
? b
$ echo 12 > c
$ hg status
M c
? b
$ hg add b
$ hg status
M c
A b
$ hg rm a
$ hg status
M c
A b
R a
Pierre-Yves David
test-revert: improve comment...
r22099
revert removal of a file
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg revert a
$ hg status
M c
A b
Pierre-Yves David
test-revert: improve comment...
r22099
revert addition of a file
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg revert b
$ hg status
M c
? b
Pierre-Yves David
test-revert: improve comment...
r22099
revert modification of a file (--no-backup)
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg revert --no-backup c
$ hg status
? b
Pierre-Yves David
test-revert: improve comment...
r22099
revert deletion (! status) of a added file
------------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg add b
$ hg status b
A b
$ rm b
$ hg status b
! b
$ hg revert -v b
forgetting b
$ hg status b
Mads Kiilerich
tests: hide 'No such file or directory' messages...
r15521 b: * (glob)
Nicolas Dumazet
tests: unify test-revert
r12106
$ ls
a
c
e
Pierre-Yves David
test-revert: improve comment...
r22099 Test creation of backup (.orig) files
-------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ echo z > e
$ hg revert --all -v
saving current version of e as e.orig
reverting e
Christian Delahousse
revert: allow configuring the .orig file location
r26938 Test creation of backup (.orig) file in configured file location
----------------------------------------------------------------
$ echo z > e
$ hg revert --all -v --config 'ui.origbackuppath=.hg/origbackups'
Matt Harbison
tests: fix globs for Windows
r26969 creating directory: $TESTTMP/repo/.hg/origbackups (glob)
saving current version of e as $TESTTMP/repo/.hg/origbackups/e.orig (glob)
Christian Delahousse
revert: allow configuring the .orig file location
r26938 reverting e
$ rm -rf .hg/origbackups
Pierre-Yves David
test-revert: improve comment...
r22099 revert on clean file (no change)
--------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert a
no changes needed to a
Pierre-Yves David
test-revert: improve comment...
r22099 revert on an untracked file
---------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ echo q > q
$ hg revert q
file not managed: q
$ rm q
Pierre-Yves David
test-revert: improve comment...
r22099 revert on file that does not exists
-----------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert notfound
Martin Geisler
tests: remove unneeded -d flags...
r12156 notfound: no such file in rev 334a9e57682c
Nicolas Dumazet
tests: unify test-revert
r12106 $ touch d
$ hg add d
$ hg rm a
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m "second"
Nicolas Dumazet
tests: unify test-revert
r12106 $ echo z > z
$ hg add z
$ hg st
A z
? e.orig
Pierre-Yves David
test-revert: improve comment...
r22099 revert to another revision (--rev)
----------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert --all -r0
adding a
removing d
forgetting z
Pierre-Yves David
test-revert: improve comment...
r22099 revert explicitly to parent (--rev)
-----------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert --all -rtip
forgetting a
undeleting d
$ rm a *.orig
Pierre-Yves David
test-revert: improve comment...
r22099 revert to another revision (--rev) and exact match
--------------------------------------------------
exact match are more silent
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert -r0 a
$ hg st a
A a
$ hg rm d
$ hg st d
R d
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 should keep d removed
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert -r0 d
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to d
Nicolas Dumazet
tests: unify test-revert
r12106 $ hg st d
R d
$ hg update -C
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pierre-Yves David
test-revert: improve comment...
r22099
revert of exec bit
------------------
Adrian Buehlmann
test-revert: enable for Windows
r16886 #if execbit
Nicolas Dumazet
tests: unify test-revert
r12106 $ chmod +x c
$ hg revert --all
reverting c
$ test -x c || echo non-executable
non-executable
$ chmod +x c
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg commit -m exe
Nicolas Dumazet
tests: unify test-revert
r12106
$ chmod -x c
$ hg revert --all
reverting c
$ test -x c && echo executable
executable
Adrian Buehlmann
test-revert: enable for Windows
r16886 #endif
Nicolas Dumazet
tests: unify test-revert
r12106
FUJIWARA Katsunori
context: write dirstate out explicitly after marking files as clean...
r25753 Test that files reverted to other than the parent are treated as
"modified", even if none of mode, size and timestamp of it isn't
changed on the filesystem (see also issue4583).
$ echo 321 > e
$ hg diff --git
diff --git a/e b/e
--- a/e
+++ b/e
@@ -1,1 +1,1 @@
-123
+321
$ hg commit -m 'ambiguity from size'
$ cat e
321
$ touch -t 200001010000 e
$ hg debugrebuildstate
$ cat >> .hg/hgrc <<EOF
> [fakedirstatewritetime]
> # emulate invoking dirstate.write() via repo.status()
> # at 2000-01-01 00:00
> fakenow = 200001010000
>
> [extensions]
> fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
> EOF
$ hg revert -r 0 e
$ cat >> .hg/hgrc <<EOF
> [extensions]
> fakedirstatewritetime = !
> EOF
$ cat e
123
$ touch -t 200001010000 e
$ hg status -A e
M e
Nicolas Dumazet
tests: unify test-revert
r12106 $ cd ..
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue241: update and revert produces inconsistent repositories
Pierre-Yves David
test-revert: improve comment...
r22099 --------------------------------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg init a
$ cd a
$ echo a >> a
$ hg commit -A -d '1 0' -m a
adding a
$ echo a >> a
$ hg commit -d '2 0' -m a
$ hg update 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ mkdir b
$ echo b > b/b
Pierre-Yves David
test-revert: improve comment...
r22099 call `hg revert` with no file specified
---------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert -rtip
Matt Mackall
revert: drop requirement to use -r to revert with two parents...
r14542 abort: no files or directories specified
Adrian Buehlmann
revert: mention update in hint of abort when reverting to non-parent...
r14726 (use --all to revert all files, or 'hg update 1' to update)
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-revert
r12106
Martin von Zweigbergk
revert: accept just -I/-X without paths or -a/-i (issue4592)...
r24841 call `hg revert` with -I
---------------------------
$ echo a >> a
$ hg revert -I a
reverting a
call `hg revert` with -X
---------------------------
$ echo a >> a
$ hg revert -X d
reverting a
Pierre-Yves David
test-revert: improve comment...
r22099 call `hg revert` with --all
---------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert --all -rtip
reverting a
Martin von Zweigbergk
revert: accept just -I/-X without paths or -a/-i (issue4592)...
r24841 $ rm *.orig
Nicolas Dumazet
tests: unify test-revert
r12106
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue332: confusing message when reverting directory
Pierre-Yves David
test-revert: improve comment...
r22099 ----------------------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci -A -m b
Nicolas Dumazet
tests: unify test-revert
r12106 adding b/b
created new head
$ echo foobar > b/b
$ mkdir newdir
$ echo foo > newdir/newfile
$ hg add newdir/newfile
$ hg revert b newdir
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 reverting b/b (glob)
forgetting newdir/newfile (glob)
Nicolas Dumazet
tests: unify test-revert
r12106 $ echo foobar > b/b
$ hg revert .
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 reverting b/b (glob)
Nicolas Dumazet
tests: unify test-revert
r12106
reverting a rename target should revert the source
Pierre-Yves David
test-revert: improve comment...
r22099 --------------------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg mv a newa
$ hg revert newa
$ hg st a newa
? newa
Pierre-Yves David
revert: look for copy information for all local modifications...
r23403 Also true for move overwriting an existing file
$ hg mv --force a b/b
$ hg revert b/b
$ hg status a b/b
Nicolas Dumazet
tests: unify test-revert
r12106 $ cd ..
$ hg init ignored
$ cd ignored
$ echo '^ignored$' > .hgignore
$ echo '^ignoreddir$' >> .hgignore
$ echo '^removed$' >> .hgignore
$ mkdir ignoreddir
$ touch ignoreddir/file
$ touch ignoreddir/removed
$ touch ignored
$ touch removed
4 ignored files (we will add/commit everything)
$ hg st -A -X .hgignore
I ignored
I ignoreddir/file
I ignoreddir/removed
I removed
$ hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed
$ echo >> ignored
$ echo >> ignoreddir/file
$ hg rm removed ignoreddir/removed
should revert ignored* and undelete *removed
Pierre-Yves David
test-revert: improve comment...
r22099 --------------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert -a --no-backup
reverting ignored
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 reverting ignoreddir/file (glob)
undeleting ignoreddir/removed (glob)
Nicolas Dumazet
tests: unify test-revert
r12106 undeleting removed
$ hg st -mardi
$ hg up -qC
$ echo >> ignored
$ hg rm removed
should silently revert the named files
Pierre-Yves David
test-revert: improve comment...
r22099 --------------------------------------
Nicolas Dumazet
tests: unify test-revert
r12106
$ hg revert --no-backup ignored removed
$ hg st -mardi
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
Pierre-Yves David
test-revert: improve comment...
r22099 Reverting copy (issue3920)
--------------------------
Bryan O'Sullivan
revert: ensure that copies and renames are honored (issue3920)...
r19129 someone set up us the copies
$ rm .hgignore
$ hg update -C
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg mv ignored allyour
$ hg copy removed base
$ hg commit -m rename
copies and renames, you have no chance to survive make your time (issue3920)
$ hg update '.^'
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg revert -rtip -a
adding allyour
adding base
removing ignored
$ hg status -C
A allyour
ignored
A base
removed
R ignored
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573 Test revert of a file added by one side of the merge
Pierre-Yves David
test-revert: improve comment...
r22099 ====================================================
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
Pierre-Yves David
test-revert: improve comment...
r22099 remove any pending change
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg revert --all
forgetting allyour
forgetting base
undeleting ignored
$ hg purge --all --config extensions.purge=
Pierre-Yves David
test-revert: improve comment...
r22099 Adds a new commit
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ echo foo > newadd
$ hg add newadd
$ hg commit -m 'other adds'
created new head
Pierre-Yves David
test-revert: improve comment...
r22099 merge it with the other head
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg merge # merge 1 into 2
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg summary
parent: 2:b8ec310b2d4e tip
other adds
parent: 1:f6180deb8fbe
rename
branch: default
commit: 2 modified, 1 removed (merge)
update: (current)
Gilles Moris
summary: move the parents phase marker to commit line (issue4688)...
r25382 phases: 3 draft
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
Pierre-Yves David
test-revert: improve comment...
r22099 clarifies who added what
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg status
M allyour
M base
R ignored
$ hg status --change 'p1()'
A newadd
$ hg status --change 'p2()'
A allyour
A base
R ignored
Pierre-Yves David
test-revert: improve comment...
r22099 revert file added by p1() to p1() state
-----------------------------------------
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg revert -r 'p1()' 'glob:newad?'
$ hg status
M allyour
M base
R ignored
Pierre-Yves David
test-revert: improve comment...
r22099 revert file added by p1() to p2() state
------------------------------------------
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg revert -r 'p2()' 'glob:newad?'
removing newadd
$ hg status
M allyour
M base
R ignored
R newadd
Pierre-Yves David
test-revert: improve comment...
r22099 revert file added by p2() to p2() state
------------------------------------------
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg revert -r 'p2()' 'glob:allyou?'
$ hg status
M allyour
M base
R ignored
R newadd
Pierre-Yves David
test-revert: improve comment...
r22099 revert file added by p2() to p1() state
------------------------------------------
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
$ hg revert -r 'p1()' 'glob:allyou?'
removing allyour
$ hg status
M base
R allyour
R ignored
R newadd
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 Systematic behavior validation of most possible cases
=====================================================
Pierre-Yves David
revert: add a test case to reverting "add" during merges...
r21573
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 This section tests most of the possible combinations of revision states and
working directory states. The number of possible cases is significant but they
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r23139 but they all have a slightly different handling. So this section commits to
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 and testing all of them to allow safe refactoring of the revert code.
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
A python script is used to generate a file history for each combination of
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 states, on one side the content (or lack thereof) in two revisions, and
on the other side, the content and "tracked-ness" of the working directory. The
three states generated are:
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
- a "base" revision
- a "parent" revision
- the working directory (based on "parent")
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 The files generated have names of the form:
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 <rev1-content>_<rev2-content>_<working-copy-content>-<tracked-ness>
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
All known states are not tested yet. See inline documentation for details.
Special cases from merge and rename are not tested by this section.
Write the python script to disk
-------------------------------
Pierre-Yves David
test-revert: display the list of all generated cases...
r22127 check list of planned files
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ python $TESTDIR/generate-working-copy-states.py filelist 2
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 content1_content1_content1-tracked
content1_content1_content1-untracked
content1_content1_content3-tracked
content1_content1_content3-untracked
content1_content1_missing-tracked
content1_content1_missing-untracked
content1_content2_content1-tracked
content1_content2_content1-untracked
content1_content2_content2-tracked
content1_content2_content2-untracked
content1_content2_content3-tracked
content1_content2_content3-untracked
content1_content2_missing-tracked
content1_content2_missing-untracked
content1_missing_content1-tracked
content1_missing_content1-untracked
content1_missing_content3-tracked
content1_missing_content3-untracked
content1_missing_missing-tracked
content1_missing_missing-untracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 missing_content2_content2-tracked
missing_content2_content2-untracked
missing_content2_content3-tracked
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 missing_content2_content3-untracked
missing_content2_missing-tracked
missing_content2_missing-untracked
missing_missing_content3-tracked
missing_missing_content3-untracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 missing_missing_missing-tracked
missing_missing_missing-untracked
Pierre-Yves David
test-revert: display the list of all generated cases...
r22127
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 Script to make a simple text version of the content
---------------------------------------------------
$ cat << EOF >> dircontent.py
> # generate a simple text view of the directory for easy comparison
> import os
> files = os.listdir('.')
> files.sort()
> for filename in files:
> if os.path.isdir(filename):
> continue
> content = open(filename).read()
> print '%-6s %s' % (content.strip(), filename)
> EOF
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
Generate appropriate repo state
-------------------------------
$ hg init revert-ref
$ cd revert-ref
Generate base changeset
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ python $TESTDIR/generate-working-copy-states.py state 2 1
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg addremove --similarity 0
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 adding content1_content1_content1-tracked
adding content1_content1_content1-untracked
adding content1_content1_content3-tracked
adding content1_content1_content3-untracked
adding content1_content1_missing-tracked
adding content1_content1_missing-untracked
adding content1_content2_content1-tracked
adding content1_content2_content1-untracked
adding content1_content2_content2-tracked
adding content1_content2_content2-untracked
adding content1_content2_content3-tracked
adding content1_content2_content3-untracked
adding content1_content2_missing-tracked
adding content1_content2_missing-untracked
adding content1_missing_content1-tracked
adding content1_missing_content1-untracked
adding content1_missing_content3-tracked
adding content1_missing_content3-untracked
adding content1_missing_missing-tracked
adding content1_missing_missing-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 A content1_content1_content1-tracked
A content1_content1_content1-untracked
A content1_content1_content3-tracked
A content1_content1_content3-untracked
A content1_content1_missing-tracked
A content1_content1_missing-untracked
A content1_content2_content1-tracked
A content1_content2_content1-untracked
A content1_content2_content2-tracked
A content1_content2_content2-untracked
A content1_content2_content3-tracked
A content1_content2_content3-untracked
A content1_content2_missing-tracked
A content1_content2_missing-untracked
A content1_missing_content1-tracked
A content1_missing_content1-untracked
A content1_missing_content3-tracked
A content1_missing_content3-untracked
A content1_missing_missing-tracked
A content1_missing_missing-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg commit -m 'base'
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 (create a simple text version of the content)
$ python ../dircontent.py > ../content-base.txt
$ cat ../content-base.txt
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 content1 content1_content1_content1-tracked
content1 content1_content1_content1-untracked
content1 content1_content1_content3-tracked
content1 content1_content1_content3-untracked
content1 content1_content1_missing-tracked
content1 content1_content1_missing-untracked
content1 content1_content2_content1-tracked
content1 content1_content2_content1-untracked
content1 content1_content2_content2-tracked
content1 content1_content2_content2-untracked
content1 content1_content2_content3-tracked
content1 content1_content2_content3-untracked
content1 content1_content2_missing-tracked
content1 content1_content2_missing-untracked
content1 content1_missing_content1-tracked
content1 content1_missing_content1-untracked
content1 content1_missing_content3-tracked
content1 content1_missing_content3-untracked
content1 content1_missing_missing-tracked
content1 content1_missing_missing-untracked
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 Create parent changeset
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ python $TESTDIR/generate-working-copy-states.py state 2 2
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg addremove --similarity 0
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 removing content1_missing_content1-tracked
removing content1_missing_content1-untracked
removing content1_missing_content3-tracked
removing content1_missing_content3-untracked
removing content1_missing_missing-tracked
removing content1_missing_missing-untracked
adding missing_content2_content2-tracked
adding missing_content2_content2-untracked
adding missing_content2_content3-tracked
adding missing_content2_content3-untracked
adding missing_content2_missing-tracked
adding missing_content2_missing-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 M content1_content2_content1-tracked
M content1_content2_content1-untracked
M content1_content2_content2-tracked
M content1_content2_content2-untracked
M content1_content2_content3-tracked
M content1_content2_content3-untracked
M content1_content2_missing-tracked
M content1_content2_missing-untracked
A missing_content2_content2-tracked
A missing_content2_content2-untracked
A missing_content2_content3-tracked
A missing_content2_content3-untracked
A missing_content2_missing-tracked
A missing_content2_missing-untracked
R content1_missing_content1-tracked
R content1_missing_content1-untracked
R content1_missing_content3-tracked
R content1_missing_content3-untracked
R content1_missing_missing-tracked
R content1_missing_missing-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg commit -m 'parent'
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 (create a simple text version of the content)
$ python ../dircontent.py > ../content-parent.txt
$ cat ../content-parent.txt
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 content1 content1_content1_content1-tracked
content1 content1_content1_content1-untracked
content1 content1_content1_content3-tracked
content1 content1_content1_content3-untracked
content1 content1_content1_missing-tracked
content1 content1_content1_missing-untracked
content2 content1_content2_content1-tracked
content2 content1_content2_content1-untracked
content2 content1_content2_content2-tracked
content2 content1_content2_content2-untracked
content2 content1_content2_content3-tracked
content2 content1_content2_content3-untracked
content2 content1_content2_missing-tracked
content2 content1_content2_missing-untracked
content2 missing_content2_content2-tracked
content2 missing_content2_content2-untracked
content2 missing_content2_content3-tracked
content2 missing_content2_content3-untracked
content2 missing_content2_missing-tracked
content2 missing_content2_missing-untracked
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 Setup working directory
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ python $TESTDIR/generate-working-copy-states.py state 2 wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg addremove --similarity 0
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 adding content1_missing_content1-tracked
adding content1_missing_content1-untracked
adding content1_missing_content3-tracked
adding content1_missing_content3-untracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 adding content1_missing_missing-tracked
adding content1_missing_missing-untracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 adding missing_missing_content3-tracked
adding missing_missing_content3-untracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 adding missing_missing_missing-tracked
adding missing_missing_missing-untracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 $ hg forget *_*_*-untracked
$ rm *_*_missing-*
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 M content1_content1_content3-tracked
M content1_content2_content1-tracked
M content1_content2_content3-tracked
M missing_content2_content3-tracked
A content1_missing_content1-tracked
A content1_missing_content3-tracked
A missing_missing_content3-tracked
R content1_content1_content1-untracked
R content1_content1_content3-untracked
R content1_content1_missing-untracked
R content1_content2_content1-untracked
R content1_content2_content2-untracked
R content1_content2_content3-untracked
R content1_content2_missing-untracked
R missing_content2_content2-untracked
R missing_content2_content3-untracked
R missing_content2_missing-untracked
! content1_content1_missing-tracked
! content1_content2_missing-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 ! content1_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ! missing_content2_missing-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 ! missing_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ? content1_missing_content1-untracked
? content1_missing_content3-untracked
? missing_missing_content3-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
$ hg status --rev 'desc("base")'
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 M content1_content1_content3-tracked
M content1_content2_content2-tracked
M content1_content2_content3-tracked
M content1_missing_content3-tracked
A missing_content2_content2-tracked
A missing_content2_content3-tracked
A missing_missing_content3-tracked
R content1_content1_content1-untracked
R content1_content1_content3-untracked
R content1_content1_missing-untracked
R content1_content2_content1-untracked
R content1_content2_content2-untracked
R content1_content2_content3-untracked
R content1_content2_missing-untracked
R content1_missing_content1-untracked
R content1_missing_content3-untracked
R content1_missing_missing-untracked
! content1_content1_missing-tracked
! content1_content2_missing-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 ! content1_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ! missing_content2_missing-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 ! missing_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ? missing_missing_content3-untracked
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 (create a simple text version of the content)
$ python ../dircontent.py > ../content-wc.txt
$ cat ../content-wc.txt
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 content1 content1_content1_content1-tracked
content1 content1_content1_content1-untracked
content3 content1_content1_content3-tracked
content3 content1_content1_content3-untracked
content1 content1_content2_content1-tracked
content1 content1_content2_content1-untracked
content2 content1_content2_content2-tracked
content2 content1_content2_content2-untracked
content3 content1_content2_content3-tracked
content3 content1_content2_content3-untracked
content1 content1_missing_content1-tracked
content1 content1_missing_content1-untracked
content3 content1_missing_content3-tracked
content3 content1_missing_content3-untracked
content2 missing_content2_content2-tracked
content2 missing_content2_content2-untracked
content3 missing_content2_content3-tracked
content3 missing_content2_content3-untracked
content3 missing_missing_content3-tracked
content3 missing_missing_content3-untracked
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ cd ..
Pierre-Yves David
test-revert: add methodical revert to parent for working directory...
r22128 Test revert --all to parent content
-----------------------------------
(setup from reference repo)
$ cp -r revert-ref revert-parent-all
$ cd revert-parent-all
check revert output
$ hg revert --all
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 undeleting content1_content1_content1-untracked
reverting content1_content1_content3-tracked
undeleting content1_content1_content3-untracked
reverting content1_content1_missing-tracked
undeleting content1_content1_missing-untracked
reverting content1_content2_content1-tracked
undeleting content1_content2_content1-untracked
undeleting content1_content2_content2-untracked
reverting content1_content2_content3-tracked
undeleting content1_content2_content3-untracked
reverting content1_content2_missing-tracked
undeleting content1_content2_missing-untracked
forgetting content1_missing_content1-tracked
forgetting content1_missing_content3-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 forgetting content1_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 undeleting missing_content2_content2-untracked
reverting missing_content2_content3-tracked
undeleting missing_content2_content3-untracked
reverting missing_content2_missing-tracked
undeleting missing_content2_missing-untracked
forgetting missing_missing_content3-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 forgetting missing_missing_missing-tracked
Pierre-Yves David
test-revert: add methodical revert to parent for working directory...
r22128
Compare resulting directory with revert target.
The diff is filtered to include change only. The only difference should be
additional `.orig` backup file when applicable.
$ python ../dircontent.py > ../content-parent-all.txt
$ cd ..
$ diff -U 0 -- content-parent.txt content-parent-all.txt | grep _
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 +content3 content1_content1_content3-tracked.orig
+content3 content1_content1_content3-untracked.orig
+content1 content1_content2_content1-tracked.orig
+content1 content1_content2_content1-untracked.orig
+content3 content1_content2_content3-tracked.orig
+content3 content1_content2_content3-untracked.orig
+content1 content1_missing_content1-tracked
+content1 content1_missing_content1-untracked
+content3 content1_missing_content3-tracked
+content3 content1_missing_content3-untracked
+content3 missing_content2_content3-tracked.orig
+content3 missing_content2_content3-untracked.orig
+content3 missing_missing_content3-tracked
+content3 missing_missing_content3-untracked
Pierre-Yves David
test-revert: add methodical revert to "base"...
r22129
Test revert --all to "base" content
-----------------------------------
(setup from reference repo)
$ cp -r revert-ref revert-base-all
$ cd revert-base-all
check revert output
$ hg revert --all --rev 'desc(base)'
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 undeleting content1_content1_content1-untracked
reverting content1_content1_content3-tracked
undeleting content1_content1_content3-untracked
reverting content1_content1_missing-tracked
undeleting content1_content1_missing-untracked
undeleting content1_content2_content1-untracked
reverting content1_content2_content2-tracked
undeleting content1_content2_content2-untracked
reverting content1_content2_content3-tracked
undeleting content1_content2_content3-untracked
reverting content1_content2_missing-tracked
undeleting content1_content2_missing-untracked
adding content1_missing_content1-untracked
reverting content1_missing_content3-tracked
adding content1_missing_content3-untracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 reverting content1_missing_missing-tracked
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 adding content1_missing_missing-untracked
removing missing_content2_content2-tracked
removing missing_content2_content3-tracked
removing missing_content2_missing-tracked
forgetting missing_missing_content3-tracked
Martin von Zweigbergk
test-revert: make sure all 'tracked' files are really tracked...
r23161 forgetting missing_missing_missing-tracked
Pierre-Yves David
test-revert: add methodical revert to "base"...
r22129
Compare resulting directory with revert target.
The diff is filtered to include change only. The only difference should be
additional `.orig` backup file when applicable.
$ python ../dircontent.py > ../content-base-all.txt
$ cd ..
$ diff -U 0 -- content-base.txt content-base-all.txt | grep _
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 +content3 content1_content1_content3-tracked.orig
+content3 content1_content1_content3-untracked.orig
+content2 content1_content2_content2-untracked.orig
+content3 content1_content2_content3-tracked.orig
+content3 content1_content2_content3-untracked.orig
+content3 content1_missing_content3-tracked.orig
+content3 content1_missing_content3-untracked.orig
+content2 missing_content2_content2-untracked
+content3 missing_content2_content3-tracked.orig
+content3 missing_content2_content3-untracked
+content3 missing_missing_content3-tracked
+content3 missing_missing_content3-untracked
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130
Test revert to parent content with explicit file name
-----------------------------------------------------
(setup from reference repo)
$ cp -r revert-ref revert-parent-explicit
$ cd revert-parent-explicit
revert all files individually and check the output
(output is expected to be different than in the --all case)
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130 > echo '### revert for:' $file;
> hg revert $file;
> echo
> done
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content1-tracked
no changes needed to content1_content1_content1-tracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content1-untracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content3-tracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content3-untracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_missing-tracked
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_missing-untracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content1-tracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content1-untracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content2-tracked
no changes needed to content1_content2_content2-tracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content2-untracked
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content3-tracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content3-untracked
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_missing-tracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_missing-untracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content1-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content1-untracked
file not managed: content1_missing_content1-untracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content3-tracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content3-untracked
file not managed: content1_missing_content3-untracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_missing-tracked
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_missing-untracked
content1_missing_missing-untracked: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_content2_content2-tracked
no changes needed to missing_content2_content2-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_content2_content2-untracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_content2_content3-tracked
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_content3-untracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_missing-tracked
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_missing-untracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_missing_content3-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_missing_content3-untracked
file not managed: missing_missing_content3-untracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_missing_missing-tracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_missing_missing-untracked
missing_missing_missing-untracked: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r23139 check resulting directory against the --all run
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130 (There should be no difference)
$ python ../dircontent.py > ../content-parent-explicit.txt
$ cd ..
$ diff -U 0 -- content-parent-all.txt content-parent-explicit.txt | grep _
[1]
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131
Test revert to "base" content with explicit file name
-----------------------------------------------------
(setup from reference repo)
$ cp -r revert-ref revert-base-explicit
$ cd revert-base-explicit
revert all files individually and check the output
(output is expected to be different than in the --all case)
Martin von Zweigbergk
generate-working-copy-states: accept depth arguments on command line...
r23447 $ for file in `python $TESTDIR/generate-working-copy-states.py filelist 2`; do
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131 > echo '### revert for:' $file;
> hg revert $file --rev 'desc(base)';
> echo
> done
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content1-tracked
no changes needed to content1_content1_content1-tracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content1-untracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content3-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_content3-untracked
### revert for: content1_content1_missing-tracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content1_missing-untracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content1-tracked
no changes needed to content1_content2_content1-tracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content1-untracked
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content2-tracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content2-untracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content3-tracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_content3-untracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_missing-tracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_content2_missing-untracked
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content1-tracked
no changes needed to content1_missing_content1-tracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content1-untracked
### revert for: content1_missing_content3-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_content3-untracked
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_missing-tracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: content1_missing_missing-untracked
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_content2-tracked
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_content2_content2-untracked
no changes needed to missing_content2_content2-untracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_content3-tracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_content2_content3-untracked
no changes needed to missing_content2_content3-untracked
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_missing-tracked
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_content2_missing-untracked
no changes needed to missing_content2_missing-untracked
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_missing_content3-tracked
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Martin von Zweigbergk
test-revert: sort by output filename again...
r23160 ### revert for: missing_missing_content3-untracked
file not managed: missing_missing_content3-untracked
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_missing_missing-tracked
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Martin von Zweigbergk
test-revert: name files by state, not by state transition...
r23159 ### revert for: missing_missing_missing-untracked
missing_missing_missing-untracked: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r23139 check resulting directory against the --all run
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131 (There should be no difference)
$ python ../dircontent.py > ../content-base-explicit.txt
$ cd ..
$ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _
[1]
Pierre-Yves David
revert: properly revert to ancestor of p2 during merge (issue5052)...
r28192
Revert to an ancestor of P2 during a merge (issue5052)
-----------------------------------------------------
(prepare the repository)
$ hg init issue5052
$ cd issue5052
$ echo '.\.orig' > .hgignore
$ echo 0 > root
$ hg ci -qAm C0
$ echo 0 > A
$ hg ci -qAm C1
$ echo 1 >> A
$ hg ci -qm C2
$ hg up -q 0
$ echo 1 > B
$ hg ci -qAm C3
$ hg status --rev 'ancestor(.,2)' --rev 2
A A
$ hg log -G -T '{rev} ({files})\n'
@ 3 (B)
|
| o 2 (A)
| |
| o 1 (A)
|/
o 0 (.hgignore root)
actual tests: reverting to something else than a merge parent
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status --rev 'p1()'
M A
$ hg status --rev 'p2()'
A B
$ hg status --rev '1'
M A
A B
$ hg revert --rev 1 --all
reverting A
removing B
$ hg status --rev 1
From the other parents
$ hg up -C 'p2()'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status --rev 'p1()'
M B
$ hg status --rev 'p2()'
A A
$ hg status --rev '1'
M A
A B
$ hg revert --rev 1 --all
reverting A
removing B
$ hg status --rev 1
$ cd ..