Show More
@@ -253,12 +253,11 b' def createcmd(ui, repo, pats, opts):' | |||
|
253 | 253 | |
|
254 | 254 | name = opts['name'] |
|
255 | 255 | |
|
256 |
wlock = lock = tr = |
|
|
256 | wlock = lock = tr = None | |
|
257 | 257 | try: |
|
258 | 258 | wlock = repo.wlock() |
|
259 | 259 | lock = repo.lock() |
|
260 | 260 | |
|
261 | bms = repo._bookmarks.copy() | |
|
262 | 261 | # use an uncommitted transaction to generate the bundle to avoid |
|
263 | 262 | # pull races. ensure we don't print the abort message to stderr. |
|
264 | 263 | tr = repo.transaction('commit', report=lambda x: None) |
@@ -313,10 +312,6 b' def createcmd(ui, repo, pats, opts):' | |||
|
313 | 312 | ui.status(_('shelved as %s\n') % name) |
|
314 | 313 | hg.update(repo, parent.node()) |
|
315 | 314 | finally: |
|
316 | if bms: | |
|
317 | # restore old bookmarks | |
|
318 | repo._bookmarks.update(bms) | |
|
319 | repo._bookmarks.write() | |
|
320 | 315 | if tr: |
|
321 | 316 | tr.abort() |
|
322 | 317 | lockmod.release(lock, wlock) |
@@ -95,6 +95,14 b' class bmstore(dict):' | |||
|
95 | 95 | l = repo._wlockref and repo._wlockref() |
|
96 | 96 | if l is None or not l.held: |
|
97 | 97 | repo.ui.develwarn('bookmarks write with no wlock') |
|
98 | ||
|
99 | tr = repo.currenttransaction() | |
|
100 | if tr: | |
|
101 | self.recordchange(tr) | |
|
102 | # invalidatevolatilesets() is omitted because this doesn't | |
|
103 | # write changes out actually | |
|
104 | return | |
|
105 | ||
|
98 | 106 | self._writerepo(repo) |
|
99 | 107 | repo.invalidatevolatilesets() |
|
100 | 108 |
@@ -534,8 +534,12 b' shelve should still work even if mq is d' | |||
|
534 | 534 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
535 | 535 | $ hg --config extensions.mq=! shelve --list |
|
536 | 536 | test (*) changes to 'create conflict' (glob) |
|
537 | $ hg bookmark | |
|
538 | * test 4:33f7f61e6c5e | |
|
537 | 539 |
$ |
|
538 | 540 | unshelving change 'test' |
|
541 | $ hg bookmark | |
|
542 | * test 4:33f7f61e6c5e | |
|
539 | 543 | |
|
540 | 544 | shelve should leave dirstate clean (issue4055) |
|
541 | 545 | |
@@ -796,6 +800,8 b' Recreate some conflict again' | |||
|
796 | 800 | $ hg up test |
|
797 | 801 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
798 | 802 | (activating bookmark test) |
|
803 | $ hg bookmark | |
|
804 | * test 4:33f7f61e6c5e | |
|
799 | 805 | $ hg unshelve |
|
800 | 806 | unshelving change 'default' |
|
801 | 807 | rebasing shelved changes |
@@ -805,6 +811,8 b' Recreate some conflict again' | |||
|
805 | 811 | merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
806 | 812 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
807 | 813 | [1] |
|
814 | $ hg bookmark | |
|
815 | test 4:33f7f61e6c5e | |
|
808 | 816 | |
|
809 | 817 | Test that resolving all conflicts in one direction (so that the rebase |
|
810 | 818 | is a no-op), works (issue4398) |
@@ -817,6 +825,8 b' is a no-op), works (issue4398)' | |||
|
817 | 825 | rebasing 5:4b555fdb4e96 "changes to 'second'" (tip) |
|
818 | 826 | note: rebase of 5:4b555fdb4e96 created no changes to commit |
|
819 | 827 | unshelve of 'default' complete |
|
828 | $ hg bookmark | |
|
829 | * test 4:33f7f61e6c5e | |
|
820 | 830 | $ hg diff |
|
821 | 831 | $ hg status |
|
822 | 832 | ? a/a.orig |
@@ -900,12 +910,16 b' Test interactive shelve' | |||
|
900 | 910 | $ hg st |
|
901 | 911 | M a/a |
|
902 | 912 | ? foo/foo |
|
913 | $ hg bookmark | |
|
914 | * test 4:33f7f61e6c5e | |
|
903 | 915 | $ hg unshelve |
|
904 | 916 | unshelving change 'test' |
|
905 | 917 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
906 | 918 | rebasing shelved changes |
|
907 | 919 | rebasing 6:65b5d1c34c34 "changes to 'create conflict'" (tip) |
|
908 | 920 | merging a/a |
|
921 | $ hg bookmark | |
|
922 | * test 4:33f7f61e6c5e | |
|
909 | 923 | $ cat a/a |
|
910 | 924 | a |
|
911 | 925 | a |
@@ -917,6 +931,7 b' shelve --patch and shelve --stat should ' | |||
|
917 | 931 | |
|
918 | 932 | $ hg up --clean . |
|
919 | 933 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
934 | (leaving bookmark test) | |
|
920 | 935 | $ hg shelve --list |
|
921 | 936 | $ echo 'patch a' > shelf-patch-a |
|
922 | 937 | $ hg add shelf-patch-a |
General Comments 0
You need to be logged in to leave comments.
Login now