##// END OF EJS Templates
formatter: add pickle format...
formatter: add pickle format This gives convenient Python2 output. Python 3 users will need encoding=bytes.

File last commit:

r22208:d3659b37 default
r22430:968247e8 default
Show More
test-revert.t
1201 lines | 27.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
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
$ 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
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 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
$ 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)
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
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 This section tests most of the possible combinations of working directory
changes and inter-revision changes. The number of possible cases is significant
but they all have a slighly different handling. So this section commits to
generating and testing all of them to allow safe refactoring of the revert code.
A python script is used to generate a file history for each combination of
changes between, on one side the working directory and its parent and on
the other side, changes between a revert target (--rev) and working directory
parent. The three states generated are:
- a "base" revision
- a "parent" revision
- the working directory (based on "parent")
The file generated have names of the form:
<changeset-state>_<working-copy-state>
Here, "changeset-state" conveys the state in "base" and "parent" (or the change
that happen between them), "working-copy-state" is self explanatory.
All known states are not tested yet. See inline documentation for details.
Special cases from merge and rename are not tested by this section.
There are also multiple cases where the current revert implementation is known to
slightly misbehave.
Write the python script to disk
-------------------------------
$ cat << EOF > gen-revert-cases.py
> # generate proper file state to test revert behavior
> import sys
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 > import os
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 >
> # content of the file in "base" and "parent"
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 > # None means no file at all
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > ctxcontent = {
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 > # clean: no change from base to parent
> 'clean': ['base', 'base'],
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > # modified: file content change from base to parent
> 'modified': ['base', 'parent'],
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 > # added: file is missing from base and added in parent
> 'added': [None, 'parent'],
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 > # removed: file exist in base but is removed from parent
> 'removed': ['base', None],
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137 > # file exist neither in base not in parent
> 'missing': [None, None],
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > }
>
> # content of file in working copy
> wccontent = {
> # clean: wc content is the same as parent
> 'clean': lambda cc: cc[1],
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 > # revert: wc content is the same as base
> 'revert': lambda cc: cc[0],
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 > # wc: file exist with a content different from base and parent
> 'wc': lambda cc: 'wc',
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 > # removed: file is missing and marked as untracked
> 'removed': lambda cc: None,
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 > # deleted: file is recorded as tracked but missing
> # rely on file deletion outside of this script
> 'deleted': lambda cc:'TOBEDELETED',
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > }
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 > # untracked-X is a version of X where the file is not tracked (? unknown)
> wccontent['untracked-clean'] = wccontent['clean']
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 > wccontent['untracked-revert'] = wccontent['revert']
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 > wccontent['untracked-wc'] = wccontent['wc']
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 >
> # build the combination of possible states
> combination = []
> for ctxkey in ctxcontent:
> for wckey in wccontent:
> filename = "%s_%s" % (ctxkey, wckey)
> combination.append((filename, ctxkey, wckey))
>
> # make sure we have stable output
> combination.sort()
>
> # retrieve the state we must generate
> target = sys.argv[1]
>
> # compute file content
> content = []
> for filename, ctxkey, wckey in combination:
> cc = ctxcontent[ctxkey]
Pierre-Yves David
test-revert: display the list of all generated cases...
r22127 > if target == 'filelist':
> print filename
> elif target == 'base':
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > content.append((filename, cc[0]))
> elif target == 'parent':
> content.append((filename, cc[1]))
> elif target == 'wc':
> content.append((filename, wccontent[wckey](cc)))
> else:
> print >> sys.stderr, "unknown target:", target
> sys.exit(1)
>
> # write actual content
> for filename, data in content:
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 > if data is not None:
> f = open(filename, 'w')
> f.write(data + '\n')
> f.close()
> elif os.path.exists(filename):
> os.remove(filename)
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 > EOF
Pierre-Yves David
test-revert: display the list of all generated cases...
r22127 check list of planned files
$ python gen-revert-cases.py filelist
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 added_wc
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 clean_wc
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137 missing_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 missing_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 missing_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 missing_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 missing_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 missing_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 missing_wc
Pierre-Yves David
test-revert: display the list of all generated cases...
r22127 modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 removed_wc
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
$ python ../gen-revert-cases.py base
$ hg addremove --similarity 0
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 adding clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 adding clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 adding clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 adding clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding clean_wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 adding modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 adding modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 adding modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 adding modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 adding removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 adding removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 adding removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 adding removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding removed_wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 A clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 A clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 A clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 A clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 A clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 A clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 A clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A clean_wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 A modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 A modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 A modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 A modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 A modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 A modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 A modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 A removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 A removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 A removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 A removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 A removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 A removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 A removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A removed_wc
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
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 base clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 base clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 base clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 base clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 base clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 base clean_wc
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 base modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 base modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 base modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 base modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 base modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 base modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 base removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 base removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 base removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 base removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 base removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 base removed_wc
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
$ python ../gen-revert-cases.py parent
$ hg addremove --similarity 0
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 adding added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 adding added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 adding added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 adding added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding added_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 removing removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 removing removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 removing removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 removing removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 removing removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 removing removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 removing removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 removing removed_wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
M modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 M modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 M modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 M modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 M modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 M modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 M modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 M modified_wc
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 A added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 A added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 A added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 A added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 A added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 A added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 A added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A added_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 R removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 R removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 R removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 R removed_wc
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
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 parent added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 parent added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 parent added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 parent added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 parent added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 parent added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 parent added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 parent added_wc
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 base clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 base clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 base clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 base clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 base clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 base clean_wc
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 parent modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 parent modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 parent modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 parent modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 parent modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 parent modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 parent modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 parent modified_wc
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
$ python ../gen-revert-cases.py wc | cat
$ hg addremove --similarity 0
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 removing added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 removing added_revert
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 removing added_untracked-revert
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 removing clean_removed
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding missing_deleted
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding missing_wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 removing modified_removed
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 adding removed_deleted
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 adding removed_revert
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 adding removed_wc
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 $ hg forget *untracked*
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 $ rm *deleted*
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 $ hg status
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 M added_wc
M clean_wc
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 M modified_revert
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 M modified_wc
A missing_wc
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 A removed_revert
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A removed_wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 R added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R added_untracked-wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R clean_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R clean_untracked-wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R modified_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R modified_untracked-wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ! added_deleted
! clean_deleted
! missing_deleted
! modified_deleted
! removed_deleted
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ? missing_untracked-wc
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ? removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ? removed_untracked-wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124
$ hg status --rev 'desc("base")'
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 M clean_wc
Pierre-Yves David
test-revert: prepare methodical testing of revert cases...
r22124 M modified_clean
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 M modified_wc
M removed_wc
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 A added_clean
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 A added_wc
A missing_wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R clean_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R clean_untracked-wc
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R modified_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R modified_untracked-wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 R removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 R removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 R removed_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 R removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 R removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 R removed_untracked-wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ! added_deleted
! clean_deleted
! missing_deleted
! modified_deleted
! removed_deleted
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ? missing_untracked-wc
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
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 parent added_clean
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 parent added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 wc added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 wc added_wc
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 base clean_clean
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 base clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 wc clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 wc clean_wc
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 wc missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 wc missing_wc
Pierre-Yves David
test-revert: also create a text version of the snapshot...
r22126 parent modified_clean
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 parent modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 wc modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 wc modified_wc
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 base removed_revert
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 base removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 wc removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 wc removed_wc
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
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 undeleting added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 undeleting added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 undeleting added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 undeleting added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 undeleting added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting added_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 undeleting clean_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 undeleting clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 undeleting clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 undeleting clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting clean_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 forgetting missing_deleted
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 forgetting missing_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 undeleting modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 reverting modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 undeleting modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 undeleting modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 undeleting modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting modified_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 forgetting removed_deleted
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 forgetting removed_revert
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 forgetting removed_wc
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 _
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc added_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc added_wc.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc clean_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc clean_wc.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc missing_wc
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 +base modified_revert.orig
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 +base modified_untracked-revert.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc modified_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc modified_wc.orig
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 +base removed_revert
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 +base removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc removed_wc
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)'
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 removing added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 removing added_deleted
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 removing added_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 undeleting clean_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 undeleting clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 undeleting clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 undeleting clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting clean_wc
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 forgetting missing_deleted
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 forgetting missing_wc
Pierre-Yves David
test-revert: add methodical revert to "base"...
r22129 reverting modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 undeleting modified_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 undeleting modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 undeleting modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 undeleting modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 adding removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 reverting removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 adding removed_removed
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 adding removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 adding removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 adding removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 reverting removed_wc
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.
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 Misbehavior:
- no backup for
| - added_wc (DATA LOSS)
Pierre-Yves David
test-revert: add methodical revert to "base"...
r22129 $ python ../dircontent.py > ../content-base-all.txt
$ cd ..
$ diff -U 0 -- content-base.txt content-base-all.txt | grep _
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 +parent added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc added_untracked-wc
+wc clean_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc clean_wc.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc missing_wc
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 +parent modified_untracked-clean.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc modified_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc modified_wc.orig
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 +wc removed_untracked-wc.orig
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 +wc removed_wc.orig
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)
$ for file in `python ../gen-revert-cases.py filelist`; do
> echo '### revert for:' $file;
> hg revert $file;
> echo
> done
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 ### revert for: added_clean
no changes needed to added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: added_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: added_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: added_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: added_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: added_wc
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 ### revert for: clean_clean
no changes needed to clean_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: clean_revert
no changes needed to clean_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: clean_wc
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137 ### revert for: missing_clean
missing_clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: missing_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: missing_removed
missing_removed: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: missing_revert
missing_revert: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: missing_untracked-clean
missing_untracked-clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: missing_untracked-revert
missing_untracked-revert: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: missing_untracked-wc
file not managed: missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: missing_wc
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130 ### revert for: modified_clean
no changes needed to modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: modified_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 ### revert for: removed_clean
removed_clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: removed_removed
removed_removed: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: removed_revert
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: removed_untracked-clean
removed_untracked-clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: removed_untracked-revert
file not managed: removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: removed_untracked-wc
file not managed: removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: removed_wc
Pierre-Yves David
test-revert: add methodical revert with explicit file path...
r22130
check resulting directory againt the --all run
(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)
$ for file in `python ../gen-revert-cases.py filelist`; do
> echo '### revert for:' $file;
> hg revert $file --rev 'desc(base)';
> echo
> done
Pierre-Yves David
test-revert: add case where file is added between "base" and "parent"
r22133 ### revert for: added_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: added_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: added_removed
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to added_removed
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: added_revert
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to added_revert
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: added_untracked-clean
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to added_untracked-clean
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: added_untracked-revert
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to added_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: added_untracked-wc
Pierre-Yves David
revert: issue "no changes needed" message for files missing on both side...
r22156 no changes needed to added_untracked-wc
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: added_wc
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135 ### revert for: clean_clean
Pierre-Yves David
revert: also track clean files...
r22186 no changes needed to clean_clean
Pierre-Yves David
test-revert: add case where file is unchanged between "base" and "parent"...
r22135
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: clean_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: clean_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: clean_revert
Pierre-Yves David
revert: also track clean files...
r22186 no changes needed to clean_revert
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: clean_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: clean_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: clean_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: clean_wc
Pierre-Yves David
test-revert: add case where file exists neither in "base" nor in "parent"
r22137 ### revert for: missing_clean
missing_clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: missing_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: missing_removed
missing_removed: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: missing_revert
missing_revert: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: missing_untracked-clean
missing_untracked-clean: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: missing_untracked-revert
missing_untracked-revert: no such file in rev * (glob)
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: missing_untracked-wc
file not managed: missing_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: missing_wc
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131 ### revert for: modified_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: modified_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: modified_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: modified_revert
Pierre-Yves David
revert: use modified information from both statuses...
r22190 no changes needed to modified_revert
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: modified_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: modified_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: modified_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: modified_wc
Pierre-Yves David
test-revert: add case where the file is removed between "base" and "parent"
r22136 ### revert for: removed_clean
Pierre-Yves David
test-revert: add case where file is tracked but deleted in working directory
r22144 ### revert for: removed_deleted
Pierre-Yves David
test-revert: add case where the file is marked as removed in the wc...
r22140 ### revert for: removed_removed
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138 ### revert for: removed_revert
Pierre-Yves David
revert: simplify handling of `added` files...
r22208 no changes needed to removed_revert
Pierre-Yves David
test-revert: add case where wc content is already reverted to base content...
r22138
Pierre-Yves David
test-revert: add case where file exists but is untracked in working directory...
r22141 ### revert for: removed_untracked-clean
Pierre-Yves David
test-revert: add case with untracked files with reverted content...
r22142 ### revert for: removed_untracked-revert
Pierre-Yves David
test-revert: add case with untracked files with unique content...
r22143 ### revert for: removed_untracked-wc
Pierre-Yves David
test-revert: add case where wc content is different from "base" and "parent"...
r22139 ### revert for: removed_wc
Pierre-Yves David
test-revert: add methodical revert to "base" with explicit file path...
r22131
check resulting directory againt the --all run
(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]