##// END OF EJS Templates
merge with stable
Matt Mackall -
r15534:80ec6309 merge default
parent child Browse files
Show More
@@ -1,7 +1,7 b''
1 1 Valid URLs are of the form::
2 2
3 3 local/filesystem/path[#revision]
4 file://localhost/filesystem/path[#revision]
4 file://local/filesystem/path[#revision]
5 5 http://[user[:pass]@]host[:port]/[path][#revision]
6 6 https://[user[:pass]@]host[:port]/[path][#revision]
7 7 ssh://[user@]host[:port]/[path][#revision]
@@ -434,7 +434,10 b' def follow(repo, subset, x):'
434 434 p = repo['.'].rev()
435 435 if l:
436 436 x = getstring(l[0], _("follow expected a filename"))
437 s = set(ctx.rev() for ctx in repo['.'][x].ancestors())
437 if x in repo['.']:
438 s = set(ctx.rev() for ctx in repo['.'][x].ancestors())
439 else:
440 return []
438 441 else:
439 442 s = set(repo.changelog.ancestors(p))
440 443
@@ -823,6 +823,12 b' class gitsubrepo(abstractsubrepo):'
823 823 def _gitisbare(self):
824 824 return self._gitcommand(['config', '--bool', 'core.bare']) == 'true'
825 825
826 def _gitupdatestat(self):
827 """This must be run before git diff-index.
828 diff-index only looks at changes to file stat;
829 this command looks at file contents and updates the stat."""
830 self._gitcommand(['update-index', '-q', '--refresh'])
831
826 832 def _gitbranchmap(self):
827 833 '''returns 2 things:
828 834 a map from git branch to revision
@@ -892,6 +898,7 b' class gitsubrepo(abstractsubrepo):'
892 898 # different version checked out
893 899 return True
894 900 # check for staged changes or modified files; ignore untracked files
901 self._gitupdatestat()
895 902 out, code = self._gitdir(['diff-index', '--quiet', 'HEAD'])
896 903 return code == 1
897 904
@@ -999,6 +1006,7 b' class gitsubrepo(abstractsubrepo):'
999 1006 source, revision, kind = state
1000 1007 self._fetch(source, revision)
1001 1008 base = self._gitcommand(['merge-base', revision, self._state[1]])
1009 self._gitupdatestat()
1002 1010 out, code = self._gitdir(['diff-index', '--quiet', 'HEAD'])
1003 1011
1004 1012 def mergefunc():
@@ -1106,6 +1114,7 b' class gitsubrepo(abstractsubrepo):'
1106 1114 # if the repo is missing, return no results
1107 1115 return [], [], [], [], [], [], []
1108 1116 modified, added, removed = [], [], []
1117 self._gitupdatestat()
1109 1118 if rev2:
1110 1119 command = ['diff-tree', rev1, rev2]
1111 1120 else:
@@ -361,6 +361,15 b" Don't crash if the .hgsubstate entry is "
361 361 $ hg update -qC nosubstate
362 362 $ ls s
363 363
364 issue3109: false positives in git diff-index
365
366 $ hg update -q
367 $ touch -t 200001010000 s/g
368 $ hg status --subrepos
369 $ touch -t 200001010000 s/g
370 $ hg sum | grep commit
371 commit: (clean)
372
364 373 Check hg update --clean
365 374 $ cd $TESTTMP/ta
366 375 $ echo > s/g
General Comments 0
You need to be logged in to leave comments. Login now