Bill_Barry avatar Bill_Barry committed 9b746dd

fixing tests

Comments (0)

Files changed (8)

tests/test-current.bat

 cd .hg
 echo [extensions] >tmp
 echo hgattic=%atticdir%\attic.py >>tmp
+
+rem now that attic shelves hg format patches all the time a user needs to be
+rem configured for tests and datetime information must be provided for the
+rem shelve command
+echo [ui] >>tmp
+echo username=Fred Widget ^<fred@example.com^>>>tmp
+echo [defaults] >>tmp
+echo attic-shelve = -d "0 0" >>tmp
 move tmp hgrc
 cd ..
 
 call hg shelve -r -q -m "another message" -u "test user <asdf@asdf.com>"
 echo ### call hg attic -c
 call hg attic -c
-echo ### call hg shelve -r -q -d "0 0"
-call hg shelve -r -q -d "0 0"
+echo ### call hg shelve -r -q -d "1 0"
+call hg shelve -r -q -d "1 0"
 echo ### call hg attic -c
 call hg attic -c
 echo ### call hg shelve

tests/test-current.out

 ### call hg unshelve -q
 ### call hg attic -c
 active patch: a
-user: None
-date: None
+user: Fred Widget <fred@example.com>
+date: 0 0
+parent: None
 message: None
 ### call hg shelve -r -q -m "commit message"
 ### call hg attic -c
 active patch: a
-user: None
-date: None
+user: Fred Widget <fred@example.com>
+date: 0 0
+parent: None
 message: 
 commit message
 ### call hg shelve -r -q -m "another message" -u "test user <asdf@asdf.com>"
 ### call hg attic -c
 active patch: a
 user: test user <asdf@asdf.com>
-date: None
+date: 0 0
+parent: None
 message: 
 another message
-### call hg shelve -r -q -d "0 0"
+### call hg shelve -r -q -d "1 0"
 ### call hg attic -c
 active patch: a
 user: test user <asdf@asdf.com>
-date: 0 0
+date: 1 0
+parent: None
 message: 
 another message
 ### call hg shelve
 ### call hg attic -i a
 user: test user <asdf@asdf.com>
 date: 0 0
+parent: None
 message: 
 another message
 ### call hg attic -i b
-user: None
-date: None
+user: Fred Widget <fred@example.com>
+date: 0 0
+parent: None
 message: 
 new message

tests/test-rebuild.bat

 cd .hg
 echo [extensions] >tmp
 echo hgattic=%atticdir%\attic.py >>tmp
+
+rem now that attic shelves hg format patches all the time a user needs to be
+rem configured for tests and datetime information must be provided for the
+rem shelve command
+echo [ui] >>tmp
+echo username=Fred Widget ^<fred@example.com^>>>tmp
+echo [defaults] >>tmp
+echo attic-shelve = -d "0 0" >>tmp
 move tmp hgrc
 cd ..
 

tests/test-rebuild.out

- ### echo a > a.txt
-### call hg addrem
+ ### echo a > a.txt
+### call hg addrem
 adding a.txt
-### call hg st
+### call hg st
 A a.txt
-### call hg shelve --git -q a
-### call hg unshelve -q
-### type .hg\attic\a
+### call hg shelve --git -q a
+### call hg unshelve -q
+### type .hg\attic\a
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 +++ b/a.txt
 @@ -0,0 +1,1 @@
-+a 
-### echo b >> a.txt
-### call hg shelve --refresh
++a 
+### echo b >> a.txt
+### call hg shelve --refresh
 patch a refreshed
-### type .hg\attic\a
+### type .hg\attic\a
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 +++ b/a.txt
 @@ -0,0 +1,2 @@
-+a 
-+b 
-### call hg shelve -r -m test
++a 
++b 
+### call hg shelve -r -m test
 patch a refreshed
-### type .hg\attic\a
+### type .hg\attic\a
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 test
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 +++ b/a.txt
 @@ -0,0 +1,2 @@
-+a 
-+b 
-### call hg shelve -r b
++a 
++b 
+### call hg shelve -r b
 abort: a different patch is active
-### call hg shelve -r -f b
+### call hg shelve -r -f b
 patch b refreshed

tests/test-shelve.bat

 cd .hg
 echo [extensions] >tmp
 echo hgattic=%atticdir%\attic.py >>tmp
+
+rem now that attic shelves hg format patches all the time a user needs to be
+rem configured for tests and datetime information must be provided for the
+rem shelve command
+echo [ui] >>tmp
+echo username=Fred Widget ^<fred@example.com^>>>tmp
+echo [defaults] >>tmp
+echo attic-shelve = -d "0 0" >>tmp
+
 move tmp hgrc
 cd ..
 

tests/test-shelve.out

 forgetting asdf.txt
 ### erase asdf.txt
 ### a contents
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 ### end hg st
 patch a shelved
 ### a contents
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 ### end hg st
 patch a shelved
 ### a contents
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 ### end hg st
 patch a shelved
 ### a contents
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 commit message
 diff --git a/a.txt b/a.txt
 new file mode 100644
 ### end hg st
 patch a shelved
 ### a contents
-From: test user <asdf@asdf.com>
-
+# HG changeset patch
+# User test user <asdf@asdf.com>
+# Date 0 0
 another message
 diff --git a/a.txt b/a.txt
 new file mode 100644
 # HG changeset patch
 # User test user <asdf@asdf.com>
 # Date 0 0
-
 another message
 diff --git a/a.txt b/a.txt
 new file mode 100644

tests/test-unshelve.bat

 cd .hg
 echo [extensions] >tmp
 echo hgattic=%atticdir%\attic.py >>tmp
+
+rem now that attic shelves hg format patches all the time a user needs to be
+rem configured for tests and datetime information must be provided for the
+rem shelve command
+echo [ui] >>tmp
+echo username=Fred Widget ^<fred@example.com^>>>tmp
+echo [defaults] >>tmp
+echo attic-shelve = -d "0 0" >>tmp
+
 move tmp hgrc
 cd ..
 

tests/test-unshelve.out

  adding a.txt
 adding b.txt
-### hg st
-### hg unshelve
+### hg st
+### hg unshelve
 patch b unshelved
-### hg st
+### hg st
 A b.txt
-### hg unshelve a
+### hg unshelve a
 patch a unshelved
-### hg st
+### hg st
 A a.txt
-### hg unshelve b (should fail)
+### hg unshelve b (should fail)
 abort: cannot apply a patch over an already active patch
-### hg unshelve -f b (should pass)
+### hg unshelve -f b (should pass)
 patch b unshelved
-### hg st
+### hg st
 A a.txt
 A b.txt
-### current applied patch
-b### hg shelve c (should fail)
+### current applied patch
+b### hg shelve c (should fail)
 abort: a different patch is active
-### hg shelve -f c (should pass)
+### hg shelve -f c (should pass)
 patch c shelved
-### hg st
-### contents of c
+### hg st
+### contents of c
+# HG changeset patch
+# User Fred Widget <fred@example.com>
+# Date 0 0
 diff --git a/a.txt b/a.txt
 new file mode 100644
 --- /dev/null
 +++ b/a.txt
 @@ -0,0 +1,1 @@
-+a 
++a 
 diff --git a/b.txt b/b.txt
 new file mode 100644
 --- /dev/null
 +++ b/b.txt
 @@ -0,0 +1,1 @@
-+b 
-### files in attic
-.hg\attic\.applied
-.hg\attic\.current
-.hg\attic\a
-.hg\attic\b
-.hg\attic\c
-### call hg unshelve --delete b
++b 
+### files in attic
+.hg\attic\.applied
+.hg\attic\.current
+.hg\attic\a
+.hg\attic\b
+.hg\attic\c
+### call hg unshelve --delete b
 patch b unshelved
 patch removed
-### call hg unshelve --delete a (should fail)
+### call hg unshelve --delete a (should fail)
 abort: local changes found
-### call hg unshelve --delete -f a
+### call hg unshelve --delete -f a
 patch a unshelved
 patch removed
-### files in attic
-.hg\attic\.applied
-.hg\attic\.current
-.hg\attic\c
+### files in attic
+.hg\attic\.applied
+.hg\attic\.current
+.hg\attic\c
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.