##// END OF EJS Templates
merge with stable
Matt Mackall -
r29237:ee935a6e merge default
parent child Browse files
Show More
@@ -240,15 +240,16 b' def _oldheadssummary(repo, remoteheads, '
240
240
241 def _nowarnheads(pushop):
241 def _nowarnheads(pushop):
242 # Compute newly pushed bookmarks. We don't warn about bookmarked heads.
242 # Compute newly pushed bookmarks. We don't warn about bookmarked heads.
243
244 # internal config: bookmarks.pushing
245 newbookmarks = pushop.ui.configlist('bookmarks', 'pushing')
246
247 repo = pushop.repo.unfiltered()
243 repo = pushop.repo.unfiltered()
248 remote = pushop.remote
244 remote = pushop.remote
249 localbookmarks = repo._bookmarks
245 localbookmarks = repo._bookmarks
250 remotebookmarks = remote.listkeys('bookmarks')
246 remotebookmarks = remote.listkeys('bookmarks')
251 bookmarkedheads = set()
247 bookmarkedheads = set()
248
249 # internal config: bookmarks.pushing
250 newbookmarks = [localbookmarks.expandname(b)
251 for b in pushop.ui.configlist('bookmarks', 'pushing')]
252
252 for bm in localbookmarks:
253 for bm in localbookmarks:
253 rnode = remotebookmarks.get(bm)
254 rnode = remotebookmarks.get(bm)
254 if rnode and rnode in repo:
255 if rnode and rnode in repo:
@@ -1388,6 +1388,8 b' class localrepository(object):'
1388 node = fctx.filenode()
1388 node = fctx.filenode()
1389 if node in [fparent1, fparent2]:
1389 if node in [fparent1, fparent2]:
1390 self.ui.debug('reusing %s filelog entry\n' % fname)
1390 self.ui.debug('reusing %s filelog entry\n' % fname)
1391 if manifest1.flags(fname) != fctx.flags():
1392 changelist.append(fname)
1391 return node
1393 return node
1392
1394
1393 flog = self.file(fname)
1395 flog = self.file(fname)
@@ -194,6 +194,7 b' def strip(ui, repo, nodelist, backup=Tru'
194 if not repo.ui.verbose:
194 if not repo.ui.verbose:
195 repo.ui.popbuffer()
195 repo.ui.popbuffer()
196 f.close()
196 f.close()
197 repo._phasecache.invalidate()
197
198
198 for m in updatebm:
199 for m in updatebm:
199 bm[m] = repo[newbmtarget].node()
200 bm[m] = repo[newbmtarget].node()
@@ -690,7 +690,7 b' pushing a new bookmark on a new head doe'
690 $ echo c5 > f2
690 $ echo c5 > f2
691 $ hg ci -Am5
691 $ hg ci -Am5
692 created new head
692 created new head
693 $ hg push -B W
693 $ hg push -B .
694 pushing to http://localhost:$HGPORT/
694 pushing to http://localhost:$HGPORT/
695 searching for changes
695 searching for changes
696 remote: adding changesets
696 remote: adding changesets
@@ -1156,3 +1156,21 b' directory)'
1156 rev offset length delta linkrev nodeid p1 p2
1156 rev offset length delta linkrev nodeid p1 p2
1157 0 0 88 -1 3 34a4d536c0c0 000000000000 000000000000
1157 0 0 88 -1 3 34a4d536c0c0 000000000000 000000000000
1158
1158
1159 Test if amend preserves executable bit changes
1160 $ chmod +x newdirname/commonfile.py
1161 $ hg ci -m chmod
1162 $ hg ci --amend -m "chmod amended"
1163 $ hg ci --amend -m "chmod amended second time"
1164 $ hg log -p --git -r .
1165 changeset: 8:b1326f52dddf
1166 branch: newdirname
1167 tag: tip
1168 parent: 5:7fd235f7cb2f
1169 user: test
1170 date: Thu Jan 01 00:00:00 1970 +0000
1171 summary: chmod amended second time
1172
1173 diff --git a/newdirname/commonfile.py b/newdirname/commonfile.py
1174 old mode 100644
1175 new mode 100755
1176
@@ -895,11 +895,24 b' This tests that translated help message '
895 $ LANGUAGE=ja
895 $ LANGUAGE=ja
896 $ export LANGUAGE
896 $ export LANGUAGE
897
897
898 $ hg commit -i --encoding cp932 2>&1 <<EOF | grep '^y - '
898 $ cat > $TESTTMP/escape.py <<EOF
899 > from __future__ import absolute_import
900 > import sys
901 > def escape(c):
902 > o = ord(c)
903 > if o < 0x80:
904 > return c
905 > else:
906 > return r'\x%02x' % o # escape char setting MSB
907 > for l in sys.stdin:
908 > sys.stdout.write(''.join(escape(c) for c in l))
909 > EOF
910
911 $ hg commit -i --encoding cp932 2>&1 <<EOF | python $TESTTMP/escape.py | grep '^y - '
899 > ?
912 > ?
900 > q
913 > q
901 > EOF
914 > EOF
902 y - \x82\xb1\x82\xcc\x95\xcf\x8dX\x82\xf0\x8bL\x98^(yes) (esc)
915 y - \x82\xb1\x82\xcc\x95\xcf\x8dX\x82\xf0\x8bL\x98^(yes)
903
916
904 $ LANGUAGE=
917 $ LANGUAGE=
905 #endif
918 #endif
@@ -838,6 +838,41 b' strip backup content'
838 date: Thu Jan 01 00:00:00 1970 +0000
838 date: Thu Jan 01 00:00:00 1970 +0000
839 summary: mergeCD
839 summary: mergeCD
840
840
841 Check that the phase cache is properly invalidated after a strip with bookmark.
842
843 $ cat > ../stripstalephasecache.py << EOF
844 > from mercurial import extensions, localrepo
845 > def transactioncallback(orig, repo, desc, *args, **kwargs):
846 > def test(transaction):
847 > # observe cache inconsistency
848 > try:
849 > [repo.changelog.node(r) for r in repo.revs("not public()")]
850 > except IndexError:
851 > repo.ui.status("Index error!\n")
852 > transaction = orig(repo, desc, *args, **kwargs)
853 > # warm up the phase cache
854 > list(repo.revs("not public()"))
855 > if desc != 'strip':
856 > transaction.addpostclose("phase invalidation test", test)
857 > return transaction
858 > def extsetup(ui):
859 > extensions.wrapfunction(localrepo.localrepository, "transaction",
860 > transactioncallback)
861 > EOF
862 $ hg up -C 2
863 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
864 $ echo k > k
865 $ hg add k
866 $ hg commit -m commitK
867 $ echo l > l
868 $ hg add l
869 $ hg commit -m commitL
870 $ hg book -r tip blah
871 $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py
872 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
873 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg (glob)
874 $ hg up -C 1
875 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
841
876
842 Error during post-close callback of the strip transaction
877 Error during post-close callback of the strip transaction
843 (They should be gracefully handled and reported)
878 (They should be gracefully handled and reported)
General Comments 0
You need to be logged in to leave comments. Login now