##// END OF EJS Templates
rollback: clarifies the message about the reverted state (issue2628)...
Gilles Moris -
r13446:1e497df5 stable
parent child Browse files
Show More
@@ -713,11 +713,12 b' class localrepository(repo.repository):'
713 713 try:
714 714 args = self.opener("undo.desc", "r").read().splitlines()
715 715 if len(args) >= 3 and self.ui.verbose:
716 desc = _("rolling back to revision %s"
716 desc = _("repository tip rolled back to revision %s"
717 717 " (undo %s: %s)\n") % (
718 718 int(args[0]) - 1, args[1], args[2])
719 719 elif len(args) >= 2:
720 desc = _("rolling back to revision %s (undo %s)\n") % (
720 desc = _("repository tip rolled back to revision %s"
721 " (undo %s)\n") % (
721 722 int(args[0]) - 1, args[1])
722 723 except IOError:
723 724 desc = _("rolling back unknown transaction\n")
@@ -740,6 +741,9 b' class localrepository(repo.repository):'
740 741 self.invalidate()
741 742 self.dirstate.invalidate()
742 743 self.destroyed()
744 self.ui.status(_("working directory now based on "
745 "revision %s\n") % (
746 _(' and ').join(str(p.rev()) for p in self.parents())))
743 747 else:
744 748 self.ui.warn(_("no rollback information available\n"))
745 749 return 1
@@ -142,7 +142,8 b' Extension disabled for lack of a hook'
142 142 added 3 changesets with 3 changes to 3 files
143 143 updating the branch cache
144 144 checking for updated bookmarks
145 rolling back to revision 0 (undo push)
145 repository tip rolled back to revision 0 (undo push)
146 working directory now based on revision 0
146 147 0:6675d58eff77
147 148
148 149
@@ -221,7 +222,8 b' Extension disabled for lack of acl.sourc'
221 222 acl: changes have source "push" - skipping
222 223 updating the branch cache
223 224 checking for updated bookmarks
224 rolling back to revision 0 (undo push)
225 repository tip rolled back to revision 0 (undo push)
226 working directory now based on revision 0
225 227 0:6675d58eff77
226 228
227 229
@@ -310,7 +312,8 b' No [acl.allow]/[acl.deny]'
310 312 acl: allowing changeset 911600dab2ae
311 313 updating the branch cache
312 314 checking for updated bookmarks
313 rolling back to revision 0 (undo push)
315 repository tip rolled back to revision 0 (undo push)
316 working directory now based on revision 0
314 317 0:6675d58eff77
315 318
316 319
@@ -945,7 +948,8 b' barney is allowed everywhere'
945 948 acl: allowing changeset 911600dab2ae
946 949 updating the branch cache
947 950 checking for updated bookmarks
948 rolling back to revision 0 (undo push)
951 repository tip rolled back to revision 0 (undo push)
952 working directory now based on revision 0
949 953 0:6675d58eff77
950 954
951 955
@@ -1341,7 +1345,8 b' acl.config can set only [acl.allow]/[acl'
1341 1345 acl: allowing changeset 911600dab2ae
1342 1346 updating the branch cache
1343 1347 checking for updated bookmarks
1344 rolling back to revision 0 (undo push)
1348 repository tip rolled back to revision 0 (undo push)
1349 working directory now based on revision 0
1345 1350 0:6675d58eff77
1346 1351
1347 1352
@@ -1438,7 +1443,8 b' fred is always allowed'
1438 1443 acl: allowing changeset 911600dab2ae
1439 1444 updating the branch cache
1440 1445 checking for updated bookmarks
1441 rolling back to revision 0 (undo push)
1446 repository tip rolled back to revision 0 (undo push)
1447 working directory now based on revision 0
1442 1448 0:6675d58eff77
1443 1449
1444 1450
@@ -1628,7 +1634,8 b' OS-level groups'
1628 1634 acl: allowing changeset 911600dab2ae
1629 1635 updating the branch cache
1630 1636 checking for updated bookmarks
1631 rolling back to revision 0 (undo push)
1637 repository tip rolled back to revision 0 (undo push)
1638 working directory now based on revision 0
1632 1639 0:6675d58eff77
1633 1640
1634 1641
@@ -204,7 +204,8 b' backout with valid parent should be ok'
204 204 changeset 5:10e5328c8435 backs out changeset 4:b2f3bb92043e
205 205
206 206 $ hg rollback
207 rolling back to revision 4 (undo commit)
207 repository tip rolled back to revision 4 (undo commit)
208 working directory now based on revision 4
208 209 $ hg update -C
209 210 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 211
@@ -77,7 +77,8 b' immediate rollback and reentrancy issue'
77 77 adding b
78 78 $ hg bookmarks markb
79 79 $ hg rollback
80 rolling back to revision 0 (undo commit)
80 repository tip rolled back to revision 0 (undo commit)
81 working directory now based on revision 0
81 82
82 83 are you there?
83 84
@@ -200,7 +200,8 b''
200 200 checking files
201 201 4 files, 9 changesets, 7 total revisions
202 202 $ hg rollback
203 rolling back to revision 4 (undo pull)
203 repository tip rolled back to revision 4 (undo pull)
204 working directory now based on revision -1
204 205 $ cd ..
205 206
206 207 should fail
@@ -276,7 +277,8 b' revision 8'
276 277 checking files
277 278 4 files, 9 changesets, 7 total revisions
278 279 $ hg rollback
279 rolling back to revision 2 (undo unbundle)
280 repository tip rolled back to revision 2 (undo unbundle)
281 working directory now based on revision 2
280 282
281 283 revision 2
282 284
@@ -300,7 +302,8 b' revision 4'
300 302 checking files
301 303 2 files, 5 changesets, 5 total revisions
302 304 $ hg rollback
303 rolling back to revision 2 (undo unbundle)
305 repository tip rolled back to revision 2 (undo unbundle)
306 working directory now based on revision 2
304 307 $ hg unbundle ../test-bundle-branch2.hg
305 308 adding changesets
306 309 adding manifests
@@ -319,7 +322,8 b' revision 6'
319 322 checking files
320 323 3 files, 7 changesets, 6 total revisions
321 324 $ hg rollback
322 rolling back to revision 2 (undo unbundle)
325 repository tip rolled back to revision 2 (undo unbundle)
326 working directory now based on revision 2
323 327 $ hg unbundle ../test-bundle-cset-7.hg
324 328 adding changesets
325 329 adding manifests
@@ -89,7 +89,8 b' Pull full.hg into empty (using --cwd)'
89 89 Rollback empty
90 90
91 91 $ hg -R empty rollback
92 rolling back to revision -1 (undo pull)
92 repository tip rolled back to revision -1 (undo pull)
93 working directory now based on revision -1
93 94
94 95 Pull full.hg into empty again (using --cwd)
95 96
@@ -119,7 +120,8 b' Pull full.hg into empty (using -R)'
119 120 Rollback empty
120 121
121 122 $ hg -R empty rollback
122 rolling back to revision -1 (undo pull)
123 repository tip rolled back to revision -1 (undo pull)
124 working directory now based on revision -1
123 125
124 126 Pull full.hg into empty again (using -R)
125 127
@@ -216,7 +218,8 b' hg -R bundle://../full.hg verify'
216 218 Rollback empty
217 219
218 220 $ hg rollback
219 rolling back to revision -1 (undo pull)
221 repository tip rolled back to revision -1 (undo pull)
222 working directory now based on revision -1
220 223 $ cd ..
221 224
222 225 Log -R bundle:empty+full.hg
@@ -111,7 +111,8 b' convert fresh repo with --filemap'
111 111 2 Initial revision
112 112 1 import
113 113 filtering out empty revision
114 rolling back to revision 0 (undo commit)
114 repository tip rolled back to revision 0 (undo commit)
115 working directory now based on revision -1
115 116 0 ci0
116 117 updating tags
117 118 $ hgcat b/c
@@ -97,7 +97,8 b' record'
97 97 $ echo "[extensions]" >> $HGRCPATH
98 98 $ echo "mq=" >> $HGRCPATH
99 99 $ hg rollback
100 rolling back to revision 0 (undo commit)
100 repository tip rolled back to revision 0 (undo commit)
101 working directory now based on revision 0
101 102
102 103 qrecord
103 104
@@ -221,7 +221,8 b' outgoing hooks can see env vars'
221 221 added 1 changesets with 1 changes to 1 files
222 222 (run 'hg update' to get a working copy)
223 223 $ hg rollback
224 rolling back to revision 3 (undo pull)
224 repository tip rolled back to revision 3 (undo pull)
225 working directory now based on revision 0
225 226
226 227 preoutgoing hook can prevent outgoing changes
227 228
@@ -364,7 +364,8 b' patches: import patch1 patch2; rollback'
364 364 applying ../patch2
365 365 applied 1d4bd90af0e4
366 366 $ hg --cwd b rollback
367 rolling back to revision 1 (undo commit)
367 repository tip rolled back to revision 1 (undo commit)
368 working directory now based on revision 1
368 369 $ hg --cwd b parents --template 'parent: {rev}\n'
369 370 parent: 1
370 371 $ rm -r b
@@ -352,7 +352,8 b' Diff remaining chunk'
352 352 +bar
353 353
354 354 $ hg rollback
355 rolling back to revision 2 (undo commit)
355 repository tip rolled back to revision 2 (undo commit)
356 working directory now based on revision 2
356 357
357 358 Record all chunks in file a
358 359
@@ -394,7 +395,8 b' rollback and revert expansion'
394 395 xxx $
395 396 bar
396 397 $ hg --verbose rollback
397 rolling back to revision 2 (undo commit)
398 repository tip rolled back to revision 2 (undo commit)
399 working directory now based on revision 2
398 400 overwriting a expanding keywords
399 401 $ hg status a
400 402 M a
@@ -411,7 +413,8 b' rollback and revert expansion'
411 413 $ cat z
412 414 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
413 415 $ hg --verbose rollback
414 rolling back to revision 2 (undo commit)
416 repository tip rolled back to revision 2 (undo commit)
417 working directory now based on revision 2
415 418 overwriting z shrinking keywords
416 419
417 420 Only z should be overwritten
@@ -437,7 +440,8 b' record added file alone'
437 440 committed changeset 3:899491280810
438 441 overwriting r expanding keywords
439 442 $ hg --verbose rollback
440 rolling back to revision 2 (undo commit)
443 repository tip rolled back to revision 2 (undo commit)
444 working directory now based on revision 2
441 445 overwriting r shrinking keywords
442 446 $ hg forget r
443 447 $ rm msg r
@@ -601,7 +605,8 b' Diff specific revision'
601 605 Status after rollback:
602 606
603 607 $ hg rollback
604 rolling back to revision 1 (undo commit)
608 repository tip rolled back to revision 1 (undo commit)
609 working directory now based on revision 1
605 610 $ hg status
606 611 A c
607 612 $ hg update --clean
@@ -622,7 +627,8 b' cp symlink file; hg cp -A symlink file ('
622 627 $ rm x
623 628
624 629 $ hg rollback
625 rolling back to revision 1 (undo commit)
630 repository tip rolled back to revision 1 (undo commit)
631 working directory now based on revision 1
626 632 $ hg update --clean
627 633 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
628 634 $ rm i symignored
@@ -735,7 +741,8 b' remove with status checks'
735 741 Rollback, revert, and check expansion
736 742
737 743 $ hg rollback
738 rolling back to revision 2 (undo commit)
744 repository tip rolled back to revision 2 (undo commit)
745 working directory now based on revision 2
739 746 $ hg status
740 747 R a
741 748 ? c
@@ -811,7 +818,8 b' Imported patch should not be rejected'
811 818 ignore $Id$
812 819
813 820 $ hg rollback
814 rolling back to revision 2 (undo commit)
821 repository tip rolled back to revision 2 (undo commit)
822 working directory now based on revision 2
815 823 $ hg update --clean
816 824 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
817 825
@@ -105,7 +105,8 b' There should be only one default branch '
105 105 Test for invalid branch cache:
106 106
107 107 $ hg rollback
108 rolling back to revision 4 (undo commit)
108 repository tip rolled back to revision 4 (undo commit)
109 working directory now based on revision 4 and 3
109 110
110 111 $ cp $branchcache .hg/bc-invalid
111 112
@@ -152,7 +152,8 b' pull (minimal config)'
152 152 fail for config file is missing
153 153
154 154 $ hg --cwd b rollback
155 rolling back to revision 0 (undo pull)
155 repository tip rolled back to revision 0 (undo pull)
156 working directory now based on revision 0
156 157 $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
157 158 pull failed
158 159 $ touch ".notify.conf"
@@ -160,7 +161,8 b' fail for config file is missing'
160 161 pull
161 162
162 163 $ hg --cwd b rollback
163 rolling back to revision 0 (undo pull)
164 repository tip rolled back to revision 0 (undo pull)
165 working directory now based on revision 0
164 166 $ hg --traceback --cwd b pull ../a | \
165 167 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
166 168 pulling from ../a
@@ -204,7 +206,8 b' pull'
204 206 pull
205 207
206 208 $ hg --cwd b rollback
207 rolling back to revision 0 (undo pull)
209 repository tip rolled back to revision 0 (undo pull)
210 working directory now based on revision 0
208 211 $ hg --traceback --cwd b pull ../a | \
209 212 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
210 213 pulling from ../a
@@ -42,7 +42,8 b' Pull multiple revisions with update:'
42 42 $ hg -q parents
43 43 0:bbd179dfa0a7
44 44 $ hg rollback
45 rolling back to revision -1 (undo pull)
45 repository tip rolled back to revision -1 (undo pull)
46 working directory now based on revision -1
46 47
47 48 $ hg pull -qr 0 ../repo
48 49 $ hg log
@@ -49,7 +49,7 b''
49 49 no changes found
50 50
51 51 $ hg rollback --dry-run --verbose
52 rolling back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
52 repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
53 53
54 54 Issue622: hg init && hg pull -u URL doesn't checkout default branch
55 55
@@ -63,7 +63,8 b' expect success'
63 63 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
64 64 % serve errors
65 65 $ hg rollback
66 rolling back to revision 0 (undo serve)
66 repository tip rolled back to revision 0 (undo serve)
67 working directory now based on revision 0
67 68
68 69 expect authorization error: all users denied
69 70
@@ -97,7 +97,8 b' Commit issue 1476:'
97 97 copies: c2 (c1)
98 98
99 99 $ hg rollback
100 rolling back to revision 2 (undo commit)
100 repository tip rolled back to revision 2 (undo commit)
101 working directory now based on revision 2 and 1
101 102
102 103 $ hg up -C .
103 104 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
@@ -20,7 +20,8 b''
20 20
21 21 $ hg status
22 22 $ hg rollback
23 rolling back to revision -1 (undo commit)
23 repository tip rolled back to revision -1 (undo commit)
24 working directory now based on revision -1
24 25 $ hg verify
25 26 checking changesets
26 27 checking manifests
@@ -37,7 +38,8 b' Test issue 902'
37 38 $ hg branch test
38 39 marked working directory as branch test
39 40 $ hg rollback
40 rolling back to revision -1 (undo commit)
41 repository tip rolled back to revision -1 (undo commit)
42 working directory now based on revision -1
41 43 $ hg branch
42 44 default
43 45
@@ -54,8 +56,9 b' Test rollback of hg before issue 902 was'
54 56 marked working directory as branch test
55 57 $ rm .hg/undo.branch
56 58 $ hg rollback
57 rolling back to revision -1 (undo commit)
59 repository tip rolled back to revision -1 (undo commit)
58 60 Named branch could not be reset, current branch still is: test
61 working directory now based on revision -1
59 62 $ hg branch
60 63 test
61 64
@@ -227,7 +227,8 b' local tag with .hgtags modified'
227 227
228 228 $ hg tag hgtags-modified
229 229 $ hg rollback
230 rolling back to revision 13 (undo commit)
230 repository tip rolled back to revision 13 (undo commit)
231 working directory now based on revision 13
231 232 $ hg st
232 233 M .hgtags
233 234 ? .hgtags.orig
@@ -265,7 +265,8 b' Remove nonexistent tag:'
265 265 Undo a tag with rollback:
266 266
267 267 $ hg rollback # destroy rev 5 (restore bar)
268 rolling back to revision 4 (undo commit)
268 repository tip rolled back to revision 4 (undo commit)
269 working directory now based on revision 4
269 270 $ hg tags
270 271 tip 4:0c192d7d5e6b
271 272 bar 1:78391a272241
@@ -101,7 +101,8 b' Changing original repo:'
101 101
102 102 $ cd clone
103 103 $ hg rollback
104 rolling back to revision 1 (undo push)
104 repository tip rolled back to revision 1 (undo push)
105 working directory now based on revision 1
105 106
106 107 $ hg -q incoming
107 108 2:faba9097cad4
@@ -145,7 +146,8 b' No new revs, no update:'
145 146 0:1f0dee641bb7
146 147
147 148 $ hg rollback
148 rolling back to revision 1 (undo pull)
149 repository tip rolled back to revision 1 (undo pull)
150 working directory now based on revision 1
149 151
150 152 $ hg up -C 0
151 153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -166,7 +168,8 b' Pull -u takes us back to branch foo:'
166 168 summary: new head of branch foo
167 169
168 170 $ hg rollback
169 rolling back to revision 1 (undo pull)
171 repository tip rolled back to revision 1 (undo pull)
172 working directory now based on revision 0
170 173
171 174 $ hg up -C 0
172 175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now