##// END OF EJS Templates
merge with stable
Matt Mackall -
r25427:d0c7ffc4 merge default
parent child Browse files
Show More
@@ -5138,7 +5138,13 b' def pull(ui, repo, source="default", **o'
5138 # When 'rev' is a bookmark name, we cannot guarantee that it
5138 # When 'rev' is a bookmark name, we cannot guarantee that it
5139 # will be updated with that name because of a race condition
5139 # will be updated with that name because of a race condition
5140 # server side. (See issue 4689 for details)
5140 # server side. (See issue 4689 for details)
5141 revs = [other.lookup(rev) for rev in revs]
5141 oldrevs = revs
5142 revs = [] # actually, nodes
5143 for r in oldrevs:
5144 node = other.lookup(r)
5145 revs.append(node)
5146 if r == checkout:
5147 checkout = node
5142 except error.CapabilityError:
5148 except error.CapabilityError:
5143 err = _("other repository doesn't support revision lookup, "
5149 err = _("other repository doesn't support revision lookup, "
5144 "so a rev cannot be specified.")
5150 "so a rev cannot be specified.")
@@ -5148,7 +5154,7 b' def pull(ui, repo, source="default", **o'
5148 force=opts.get('force'),
5154 force=opts.get('force'),
5149 bookmarks=opts.get('bookmark', ())).cgresult
5155 bookmarks=opts.get('bookmark', ())).cgresult
5150 if checkout:
5156 if checkout:
5151 checkout = str(repo.changelog.rev(other.lookup(checkout)))
5157 checkout = str(repo.changelog.rev(checkout))
5152 repo._subtoppath = source
5158 repo._subtoppath = source
5153 try:
5159 try:
5154 ret = postincoming(ui, repo, modheads, opts.get('update'), checkout)
5160 ret = postincoming(ui, repo, modheads, opts.get('update'), checkout)
@@ -291,6 +291,12 b' class hgwebdir(object):'
291 # remove name parts plus accompanying slash
291 # remove name parts plus accompanying slash
292 path = path[:-len(discarded) - 1]
292 path = path[:-len(discarded) - 1]
293
293
294 try:
295 r = hg.repository(self.ui, path)
296 directory = False
297 except (IOError, error.RepoError):
298 pass
299
294 parts = [name]
300 parts = [name]
295 if 'PATH_INFO' in req.env:
301 if 'PATH_INFO' in req.env:
296 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
302 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
@@ -944,6 +944,25 b' Test collapse = True'
944
944
945 Test intermediate directories
945 Test intermediate directories
946
946
947 Hide the subrepo parent
948
949 $ cp $root/notrepo/f/.hg/hgrc $root/notrepo/f/.hg/hgrc.bak
950 $ cat >> $root/notrepo/f/.hg/hgrc << EOF
951 > [web]
952 > hidden = True
953 > EOF
954
955 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
956 200 Script output follows
957
958
959 /rcoll/notrepo/e/
960 /rcoll/notrepo/e/e2/
961
962
963 Subrepo parent not hidden
964 $ mv $root/notrepo/f/.hg/hgrc.bak $root/notrepo/f/.hg/hgrc
965
947 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
966 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
948 200 Script output follows
967 200 Script output follows
949
968
@@ -101,4 +101,44 b' This used to abort: received changelog g'
101
101
102 $ hg pull -qr 1 ../repo
102 $ hg pull -qr 1 ../repo
103
103
104 Test race condition with -r and -U (issue4707)
105
106 We pull '-U -r <name>' and the name change right after/during the changegroup emission.
107 We use http because http is better is our racy-est option.
108
109
110 $ echo babar > ../repo/jungle
111 $ cat <<EOF > ../repo/.hg/hgrc
112 > [hooks]
113 > outgoing.makecommit = hg ci -Am 'racy commit'; echo committed in pull-race
114 > EOF
115 $ hg -R ../repo serve -p $HGPORT2 -d --pid-file=../repo.pid
116 $ cat ../repo.pid >> $DAEMON_PIDS
117 $ hg pull --rev default --update http://localhost:$HGPORT2/
118 pulling from http://localhost:$HGPORT2/
119 searching for changes
120 adding changesets
121 adding manifests
122 adding file changes
123 added 1 changesets with 1 changes to 1 files (+1 heads)
124 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 $ hg log -G
126 @ changeset: 2:effea6de0384
127 | tag: tip
128 | parent: 0:bbd179dfa0a7
129 | user: test
130 | date: Thu Jan 01 00:00:00 1970 +0000
131 | summary: add bar
132 |
133 | o changeset: 1:ed1b79f46b9a
134 |/ user: test
135 | date: Thu Jan 01 00:00:00 1970 +0000
136 | summary: change foo
137 |
138 o changeset: 0:bbd179dfa0a7
139 user: test
140 date: Thu Jan 01 00:00:00 1970 +0000
141 summary: add foo
142
143
104 $ cd ..
144 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now