##// END OF EJS Templates
merge with stable
Matt Mackall -
r16253:17f17980 merge default
parent child Browse files
Show More
@@ -71,7 +71,7 b' editor = notepad'
71 ;cmd.bc3diff = C:\Program Files\Beyond Compare 3\BCompare.exe
71 ;cmd.bc3diff = C:\Program Files\Beyond Compare 3\BCompare.exe
72 ;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe
72 ;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe
73 ;cmd.vimdiff = gvim.exe
73 ;cmd.vimdiff = gvim.exe
74 ;opts.vimdiff = -f '+next' '+execute "DirDiff ".argv(0)." ".argv(1)'
74 ;opts.vimdiff = -f "+next" "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
75
75
76
76
77 [hgk]
77 [hgk]
@@ -33,7 +33,8 b' you do not need to type :hg:`extdiff -p '
33 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
33 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
34 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
34 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
35 # your .vimrc
35 # your .vimrc
36 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)'
36 vimdiff = gvim -f "+next" \\
37 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
37
38
38 Tool arguments can include variables that are expanded at runtime::
39 Tool arguments can include variables that are expanded at runtime::
39
40
@@ -1043,8 +1043,7 b' class queue(object):'
1043 hg.clean(repo, urev)
1043 hg.clean(repo, urev)
1044 repo.dirstate.write()
1044 repo.dirstate.write()
1045
1045
1046 for rev in revs:
1046 repair.strip(self.ui, repo, revs, backup)
1047 repair.strip(self.ui, repo, rev, backup)
1048 finally:
1047 finally:
1049 release(lock, wlock)
1048 release(lock, wlock)
1050
1049
@@ -14,7 +14,7 b' Each changeset in a repository is in one'
14 These phases are ordered (public < draft < secret) and no changeset
14 These phases are ordered (public < draft < secret) and no changeset
15 can be in a lower phase than its ancestors. For instance, if a
15 can be in a lower phase than its ancestors. For instance, if a
16 changeset is public, all its ancestors are also public. Lastly,
16 changeset is public, all its ancestors are also public. Lastly,
17 changeset phases only be changed towards the public phase.
17 changeset phases should only be changed towards the public phase.
18
18
19 How are phases managed?
19 How are phases managed?
20 -----------------------
20 -----------------------
@@ -781,11 +781,12 b' class localrepository(repo.repository):'
781 self.opener.write("journal.desc",
781 self.opener.write("journal.desc",
782 "%d\n%s\n" % (len(self), desc))
782 "%d\n%s\n" % (len(self), desc))
783
783
784 bkname = self.join('bookmarks')
784 try:
785 if os.path.exists(bkname):
785 bk = self.opener.read("bookmarks")
786 util.copyfile(bkname, self.join('journal.bookmarks'))
786 except IOError:
787 else:
787 bk = ""
788 self.opener.write('journal.bookmarks', '')
788 self.opener.write("journal.bookmarks", bk)
789
789 phasesname = self.sjoin('phaseroots')
790 phasesname = self.sjoin('phaseroots')
790 if os.path.exists(phasesname):
791 if os.path.exists(phasesname):
791 util.copyfile(phasesname, self.sjoin('journal.phaseroots'))
792 util.copyfile(phasesname, self.sjoin('journal.phaseroots'))
@@ -54,10 +54,13 b' def _collectbrokencsets(repo, files, str'
54
54
55 return s
55 return s
56
56
57 def strip(ui, repo, node, backup="all"):
57 def strip(ui, repo, nodelist, backup="all"):
58 cl = repo.changelog
58 cl = repo.changelog
59 # TODO handle undo of merge sets
59 # TODO handle undo of merge sets
60 striprev = cl.rev(node)
60 if isinstance(nodelist, str):
61 nodelist = [nodelist]
62 striplist = [cl.rev(node) for node in nodelist]
63 striprev = min(striplist)
61
64
62 keeppartialbundle = backup == 'strip'
65 keeppartialbundle = backup == 'strip'
63
66
@@ -68,8 +71,10 b' def strip(ui, repo, node, backup="all"):'
68 # the list of heads and bases of the set of interesting revisions.
71 # the list of heads and bases of the set of interesting revisions.
69 # (head = revision in the set that has no descendant in the set;
72 # (head = revision in the set that has no descendant in the set;
70 # base = revision in the set that has no ancestor in the set)
73 # base = revision in the set that has no ancestor in the set)
71 tostrip = set(cl.descendants(striprev))
74 tostrip = set(striplist)
72 tostrip.add(striprev)
75 for rev in striplist:
76 for desc in cl.descendants(rev):
77 tostrip.add(desc)
73
78
74 files = _collectfiles(repo, striprev)
79 files = _collectfiles(repo, striprev)
75 saverevs = _collectbrokencsets(repo, files, striprev)
80 saverevs = _collectbrokencsets(repo, files, striprev)
@@ -88,6 +93,7 b' def strip(ui, repo, node, backup="all"):'
88 descendants = set(cl.descendants(*saverevs))
93 descendants = set(cl.descendants(*saverevs))
89 saverevs.difference_update(descendants)
94 saverevs.difference_update(descendants)
90 savebases = [cl.node(r) for r in saverevs]
95 savebases = [cl.node(r) for r in saverevs]
96 stripbases = [cl.node(r) for r in tostrip]
91
97
92 bm = repo._bookmarks
98 bm = repo._bookmarks
93 updatebm = []
99 updatebm = []
@@ -99,7 +105,7 b' def strip(ui, repo, node, backup="all"):'
99 # create a changegroup for all the branches we need to keep
105 # create a changegroup for all the branches we need to keep
100 backupfile = None
106 backupfile = None
101 if backup == "all":
107 if backup == "all":
102 backupfile = _bundle(repo, [node], cl.heads(), node, 'backup')
108 backupfile = _bundle(repo, stripbases, cl.heads(), node, 'backup')
103 repo.ui.status(_("saved backup bundle to %s\n") % backupfile)
109 repo.ui.status(_("saved backup bundle to %s\n") % backupfile)
104 if saveheads or savebases:
110 if saveheads or savebases:
105 # do not compress partial bundle if we remove it from disk later
111 # do not compress partial bundle if we remove it from disk later
@@ -301,7 +301,8 b' Extension module help vs command help:'
301 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
301 # (see http://www.vim.org/scripts/script.php?script_id=102) Non
302 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
302 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
303 # your .vimrc
303 # your .vimrc
304 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)'
304 vimdiff = gvim -f "+next" \
305 "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
305
306
306 Tool arguments can include variables that are expanded at runtime:
307 Tool arguments can include variables that are expanded at runtime:
307
308
@@ -311,7 +311,6 b' 2 different branches: 2 strips'
311 $ hg strip 2 4
311 $ hg strip 2 4
312 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
312 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
313 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
313 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
314 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
315 $ hg glog
314 $ hg glog
316 @ changeset: 2:65bd5f99a4a3
315 @ changeset: 2:65bd5f99a4a3
317 | tag: tip
316 | tag: tip
@@ -421,3 +420,13 b' Verify strip protects against stripping '
421 $ hg status
420 $ hg status
422 M bar
421 M bar
423 ? b
422 ? b
423 $ cd ..
424
425 stripping many nodes on a complex graph (issue3299)
426
427 $ hg init issue3299
428 $ cd issue3299
429 $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
430 $ hg strip 'not ancestors(x)'
431 saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
432
General Comments 0
You need to be logged in to leave comments. Login now