##// END OF EJS Templates
archive: look for first visible revision to build repo identity (issue4591)...
Yuya Nishihara -
r24681:33ab99a6 default
parent child Browse files
Show More
@@ -1,316 +1,322
1 # archival.py - revision archival for mercurial
1 # archival.py - revision archival for mercurial
2 #
2 #
3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
3 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from i18n import _
8 from i18n import _
9 import match as matchmod
9 import match as matchmod
10 import cmdutil
10 import cmdutil
11 import scmutil, util, encoding
11 import scmutil, util, encoding
12 import cStringIO, os, tarfile, time, zipfile
12 import cStringIO, os, tarfile, time, zipfile
13 import zlib, gzip
13 import zlib, gzip
14 import struct
14 import struct
15 import error
15 import error
16
16
17 # from unzip source code:
17 # from unzip source code:
18 _UNX_IFREG = 0x8000
18 _UNX_IFREG = 0x8000
19 _UNX_IFLNK = 0xa000
19 _UNX_IFLNK = 0xa000
20
20
21 def tidyprefix(dest, kind, prefix):
21 def tidyprefix(dest, kind, prefix):
22 '''choose prefix to use for names in archive. make sure prefix is
22 '''choose prefix to use for names in archive. make sure prefix is
23 safe for consumers.'''
23 safe for consumers.'''
24
24
25 if prefix:
25 if prefix:
26 prefix = util.normpath(prefix)
26 prefix = util.normpath(prefix)
27 else:
27 else:
28 if not isinstance(dest, str):
28 if not isinstance(dest, str):
29 raise ValueError('dest must be string if no prefix')
29 raise ValueError('dest must be string if no prefix')
30 prefix = os.path.basename(dest)
30 prefix = os.path.basename(dest)
31 lower = prefix.lower()
31 lower = prefix.lower()
32 for sfx in exts.get(kind, []):
32 for sfx in exts.get(kind, []):
33 if lower.endswith(sfx):
33 if lower.endswith(sfx):
34 prefix = prefix[:-len(sfx)]
34 prefix = prefix[:-len(sfx)]
35 break
35 break
36 lpfx = os.path.normpath(util.localpath(prefix))
36 lpfx = os.path.normpath(util.localpath(prefix))
37 prefix = util.pconvert(lpfx)
37 prefix = util.pconvert(lpfx)
38 if not prefix.endswith('/'):
38 if not prefix.endswith('/'):
39 prefix += '/'
39 prefix += '/'
40 if prefix.startswith('../') or os.path.isabs(lpfx) or '/../' in prefix:
40 if prefix.startswith('../') or os.path.isabs(lpfx) or '/../' in prefix:
41 raise util.Abort(_('archive prefix contains illegal components'))
41 raise util.Abort(_('archive prefix contains illegal components'))
42 return prefix
42 return prefix
43
43
44 exts = {
44 exts = {
45 'tar': ['.tar'],
45 'tar': ['.tar'],
46 'tbz2': ['.tbz2', '.tar.bz2'],
46 'tbz2': ['.tbz2', '.tar.bz2'],
47 'tgz': ['.tgz', '.tar.gz'],
47 'tgz': ['.tgz', '.tar.gz'],
48 'zip': ['.zip'],
48 'zip': ['.zip'],
49 }
49 }
50
50
51 def guesskind(dest):
51 def guesskind(dest):
52 for kind, extensions in exts.iteritems():
52 for kind, extensions in exts.iteritems():
53 if util.any(dest.endswith(ext) for ext in extensions):
53 if util.any(dest.endswith(ext) for ext in extensions):
54 return kind
54 return kind
55 return None
55 return None
56
56
57 def _rootctx(repo):
58 # repo[0] may be hidden
59 for rev in repo:
60 return repo[rev]
61 return repo['null']
62
57 def buildmetadata(ctx):
63 def buildmetadata(ctx):
58 '''build content of .hg_archival.txt'''
64 '''build content of .hg_archival.txt'''
59 repo = ctx.repo()
65 repo = ctx.repo()
60 base = 'repo: %s\nnode: %s\nbranch: %s\n' % (
66 base = 'repo: %s\nnode: %s\nbranch: %s\n' % (
61 repo[0].hex(), ctx.hex(), encoding.fromlocal(ctx.branch()))
67 _rootctx(repo).hex(), ctx.hex(), encoding.fromlocal(ctx.branch()))
62
68
63 tags = ''.join('tag: %s\n' % t for t in ctx.tags()
69 tags = ''.join('tag: %s\n' % t for t in ctx.tags()
64 if repo.tagtype(t) == 'global')
70 if repo.tagtype(t) == 'global')
65 if not tags:
71 if not tags:
66 repo.ui.pushbuffer()
72 repo.ui.pushbuffer()
67 opts = {'template': '{latesttag}\n{latesttagdistance}',
73 opts = {'template': '{latesttag}\n{latesttagdistance}',
68 'style': '', 'patch': None, 'git': None}
74 'style': '', 'patch': None, 'git': None}
69 cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
75 cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
70 ltags, dist = repo.ui.popbuffer().split('\n')
76 ltags, dist = repo.ui.popbuffer().split('\n')
71 ltags = ltags.split(':')
77 ltags = ltags.split(':')
72 changessince = len(repo.revs('only(.,%s)', ltags[0]))
78 changessince = len(repo.revs('only(.,%s)', ltags[0]))
73 tags = ''.join('latesttag: %s\n' % t for t in ltags)
79 tags = ''.join('latesttag: %s\n' % t for t in ltags)
74 tags += 'latesttagdistance: %s\n' % dist
80 tags += 'latesttagdistance: %s\n' % dist
75 tags += 'changessincelatesttag: %s\n' % changessince
81 tags += 'changessincelatesttag: %s\n' % changessince
76
82
77 return base + tags
83 return base + tags
78
84
79 class tarit(object):
85 class tarit(object):
80 '''write archive to tar file or stream. can write uncompressed,
86 '''write archive to tar file or stream. can write uncompressed,
81 or compress with gzip or bzip2.'''
87 or compress with gzip or bzip2.'''
82
88
83 class GzipFileWithTime(gzip.GzipFile):
89 class GzipFileWithTime(gzip.GzipFile):
84
90
85 def __init__(self, *args, **kw):
91 def __init__(self, *args, **kw):
86 timestamp = None
92 timestamp = None
87 if 'timestamp' in kw:
93 if 'timestamp' in kw:
88 timestamp = kw.pop('timestamp')
94 timestamp = kw.pop('timestamp')
89 if timestamp is None:
95 if timestamp is None:
90 self.timestamp = time.time()
96 self.timestamp = time.time()
91 else:
97 else:
92 self.timestamp = timestamp
98 self.timestamp = timestamp
93 gzip.GzipFile.__init__(self, *args, **kw)
99 gzip.GzipFile.__init__(self, *args, **kw)
94
100
95 def _write_gzip_header(self):
101 def _write_gzip_header(self):
96 self.fileobj.write('\037\213') # magic header
102 self.fileobj.write('\037\213') # magic header
97 self.fileobj.write('\010') # compression method
103 self.fileobj.write('\010') # compression method
98 # Python 2.6 introduced self.name and deprecated self.filename
104 # Python 2.6 introduced self.name and deprecated self.filename
99 try:
105 try:
100 fname = self.name
106 fname = self.name
101 except AttributeError:
107 except AttributeError:
102 fname = self.filename
108 fname = self.filename
103 if fname and fname.endswith('.gz'):
109 if fname and fname.endswith('.gz'):
104 fname = fname[:-3]
110 fname = fname[:-3]
105 flags = 0
111 flags = 0
106 if fname:
112 if fname:
107 flags = gzip.FNAME
113 flags = gzip.FNAME
108 self.fileobj.write(chr(flags))
114 self.fileobj.write(chr(flags))
109 gzip.write32u(self.fileobj, long(self.timestamp))
115 gzip.write32u(self.fileobj, long(self.timestamp))
110 self.fileobj.write('\002')
116 self.fileobj.write('\002')
111 self.fileobj.write('\377')
117 self.fileobj.write('\377')
112 if fname:
118 if fname:
113 self.fileobj.write(fname + '\000')
119 self.fileobj.write(fname + '\000')
114
120
115 def __init__(self, dest, mtime, kind=''):
121 def __init__(self, dest, mtime, kind=''):
116 self.mtime = mtime
122 self.mtime = mtime
117 self.fileobj = None
123 self.fileobj = None
118
124
119 def taropen(name, mode, fileobj=None):
125 def taropen(name, mode, fileobj=None):
120 if kind == 'gz':
126 if kind == 'gz':
121 mode = mode[0]
127 mode = mode[0]
122 if not fileobj:
128 if not fileobj:
123 fileobj = open(name, mode + 'b')
129 fileobj = open(name, mode + 'b')
124 gzfileobj = self.GzipFileWithTime(name, mode + 'b',
130 gzfileobj = self.GzipFileWithTime(name, mode + 'b',
125 zlib.Z_BEST_COMPRESSION,
131 zlib.Z_BEST_COMPRESSION,
126 fileobj, timestamp=mtime)
132 fileobj, timestamp=mtime)
127 self.fileobj = gzfileobj
133 self.fileobj = gzfileobj
128 return tarfile.TarFile.taropen(name, mode, gzfileobj)
134 return tarfile.TarFile.taropen(name, mode, gzfileobj)
129 else:
135 else:
130 return tarfile.open(name, mode + kind, fileobj)
136 return tarfile.open(name, mode + kind, fileobj)
131
137
132 if isinstance(dest, str):
138 if isinstance(dest, str):
133 self.z = taropen(dest, mode='w:')
139 self.z = taropen(dest, mode='w:')
134 else:
140 else:
135 # Python 2.5-2.5.1 have a regression that requires a name arg
141 # Python 2.5-2.5.1 have a regression that requires a name arg
136 self.z = taropen(name='', mode='w|', fileobj=dest)
142 self.z = taropen(name='', mode='w|', fileobj=dest)
137
143
138 def addfile(self, name, mode, islink, data):
144 def addfile(self, name, mode, islink, data):
139 i = tarfile.TarInfo(name)
145 i = tarfile.TarInfo(name)
140 i.mtime = self.mtime
146 i.mtime = self.mtime
141 i.size = len(data)
147 i.size = len(data)
142 if islink:
148 if islink:
143 i.type = tarfile.SYMTYPE
149 i.type = tarfile.SYMTYPE
144 i.mode = 0777
150 i.mode = 0777
145 i.linkname = data
151 i.linkname = data
146 data = None
152 data = None
147 i.size = 0
153 i.size = 0
148 else:
154 else:
149 i.mode = mode
155 i.mode = mode
150 data = cStringIO.StringIO(data)
156 data = cStringIO.StringIO(data)
151 self.z.addfile(i, data)
157 self.z.addfile(i, data)
152
158
153 def done(self):
159 def done(self):
154 self.z.close()
160 self.z.close()
155 if self.fileobj:
161 if self.fileobj:
156 self.fileobj.close()
162 self.fileobj.close()
157
163
158 class tellable(object):
164 class tellable(object):
159 '''provide tell method for zipfile.ZipFile when writing to http
165 '''provide tell method for zipfile.ZipFile when writing to http
160 response file object.'''
166 response file object.'''
161
167
162 def __init__(self, fp):
168 def __init__(self, fp):
163 self.fp = fp
169 self.fp = fp
164 self.offset = 0
170 self.offset = 0
165
171
166 def __getattr__(self, key):
172 def __getattr__(self, key):
167 return getattr(self.fp, key)
173 return getattr(self.fp, key)
168
174
169 def write(self, s):
175 def write(self, s):
170 self.fp.write(s)
176 self.fp.write(s)
171 self.offset += len(s)
177 self.offset += len(s)
172
178
173 def tell(self):
179 def tell(self):
174 return self.offset
180 return self.offset
175
181
176 class zipit(object):
182 class zipit(object):
177 '''write archive to zip file or stream. can write uncompressed,
183 '''write archive to zip file or stream. can write uncompressed,
178 or compressed with deflate.'''
184 or compressed with deflate.'''
179
185
180 def __init__(self, dest, mtime, compress=True):
186 def __init__(self, dest, mtime, compress=True):
181 if not isinstance(dest, str):
187 if not isinstance(dest, str):
182 try:
188 try:
183 dest.tell()
189 dest.tell()
184 except (AttributeError, IOError):
190 except (AttributeError, IOError):
185 dest = tellable(dest)
191 dest = tellable(dest)
186 self.z = zipfile.ZipFile(dest, 'w',
192 self.z = zipfile.ZipFile(dest, 'w',
187 compress and zipfile.ZIP_DEFLATED or
193 compress and zipfile.ZIP_DEFLATED or
188 zipfile.ZIP_STORED)
194 zipfile.ZIP_STORED)
189
195
190 # Python's zipfile module emits deprecation warnings if we try
196 # Python's zipfile module emits deprecation warnings if we try
191 # to store files with a date before 1980.
197 # to store files with a date before 1980.
192 epoch = 315532800 # calendar.timegm((1980, 1, 1, 0, 0, 0, 1, 1, 0))
198 epoch = 315532800 # calendar.timegm((1980, 1, 1, 0, 0, 0, 1, 1, 0))
193 if mtime < epoch:
199 if mtime < epoch:
194 mtime = epoch
200 mtime = epoch
195
201
196 self.mtime = mtime
202 self.mtime = mtime
197 self.date_time = time.gmtime(mtime)[:6]
203 self.date_time = time.gmtime(mtime)[:6]
198
204
199 def addfile(self, name, mode, islink, data):
205 def addfile(self, name, mode, islink, data):
200 i = zipfile.ZipInfo(name, self.date_time)
206 i = zipfile.ZipInfo(name, self.date_time)
201 i.compress_type = self.z.compression
207 i.compress_type = self.z.compression
202 # unzip will not honor unix file modes unless file creator is
208 # unzip will not honor unix file modes unless file creator is
203 # set to unix (id 3).
209 # set to unix (id 3).
204 i.create_system = 3
210 i.create_system = 3
205 ftype = _UNX_IFREG
211 ftype = _UNX_IFREG
206 if islink:
212 if islink:
207 mode = 0777
213 mode = 0777
208 ftype = _UNX_IFLNK
214 ftype = _UNX_IFLNK
209 i.external_attr = (mode | ftype) << 16L
215 i.external_attr = (mode | ftype) << 16L
210 # add "extended-timestamp" extra block, because zip archives
216 # add "extended-timestamp" extra block, because zip archives
211 # without this will be extracted with unexpected timestamp,
217 # without this will be extracted with unexpected timestamp,
212 # if TZ is not configured as GMT
218 # if TZ is not configured as GMT
213 i.extra += struct.pack('<hhBl',
219 i.extra += struct.pack('<hhBl',
214 0x5455, # block type: "extended-timestamp"
220 0x5455, # block type: "extended-timestamp"
215 1 + 4, # size of this block
221 1 + 4, # size of this block
216 1, # "modification time is present"
222 1, # "modification time is present"
217 int(self.mtime)) # last modification (UTC)
223 int(self.mtime)) # last modification (UTC)
218 self.z.writestr(i, data)
224 self.z.writestr(i, data)
219
225
220 def done(self):
226 def done(self):
221 self.z.close()
227 self.z.close()
222
228
223 class fileit(object):
229 class fileit(object):
224 '''write archive as files in directory.'''
230 '''write archive as files in directory.'''
225
231
226 def __init__(self, name, mtime):
232 def __init__(self, name, mtime):
227 self.basedir = name
233 self.basedir = name
228 self.opener = scmutil.opener(self.basedir)
234 self.opener = scmutil.opener(self.basedir)
229
235
230 def addfile(self, name, mode, islink, data):
236 def addfile(self, name, mode, islink, data):
231 if islink:
237 if islink:
232 self.opener.symlink(data, name)
238 self.opener.symlink(data, name)
233 return
239 return
234 f = self.opener(name, "w", atomictemp=True)
240 f = self.opener(name, "w", atomictemp=True)
235 f.write(data)
241 f.write(data)
236 f.close()
242 f.close()
237 destfile = os.path.join(self.basedir, name)
243 destfile = os.path.join(self.basedir, name)
238 os.chmod(destfile, mode)
244 os.chmod(destfile, mode)
239
245
240 def done(self):
246 def done(self):
241 pass
247 pass
242
248
243 archivers = {
249 archivers = {
244 'files': fileit,
250 'files': fileit,
245 'tar': tarit,
251 'tar': tarit,
246 'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'),
252 'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'),
247 'tgz': lambda name, mtime: tarit(name, mtime, 'gz'),
253 'tgz': lambda name, mtime: tarit(name, mtime, 'gz'),
248 'uzip': lambda name, mtime: zipit(name, mtime, False),
254 'uzip': lambda name, mtime: zipit(name, mtime, False),
249 'zip': zipit,
255 'zip': zipit,
250 }
256 }
251
257
252 def archive(repo, dest, node, kind, decode=True, matchfn=None,
258 def archive(repo, dest, node, kind, decode=True, matchfn=None,
253 prefix='', mtime=None, subrepos=False):
259 prefix='', mtime=None, subrepos=False):
254 '''create archive of repo as it was at node.
260 '''create archive of repo as it was at node.
255
261
256 dest can be name of directory, name of archive file, or file
262 dest can be name of directory, name of archive file, or file
257 object to write archive to.
263 object to write archive to.
258
264
259 kind is type of archive to create.
265 kind is type of archive to create.
260
266
261 decode tells whether to put files through decode filters from
267 decode tells whether to put files through decode filters from
262 hgrc.
268 hgrc.
263
269
264 matchfn is function to filter names of files to write to archive.
270 matchfn is function to filter names of files to write to archive.
265
271
266 prefix is name of path to put before every archive member.'''
272 prefix is name of path to put before every archive member.'''
267
273
268 if kind == 'files':
274 if kind == 'files':
269 if prefix:
275 if prefix:
270 raise util.Abort(_('cannot give prefix when archiving to files'))
276 raise util.Abort(_('cannot give prefix when archiving to files'))
271 else:
277 else:
272 prefix = tidyprefix(dest, kind, prefix)
278 prefix = tidyprefix(dest, kind, prefix)
273
279
274 def write(name, mode, islink, getdata):
280 def write(name, mode, islink, getdata):
275 data = getdata()
281 data = getdata()
276 if decode:
282 if decode:
277 data = repo.wwritedata(name, data)
283 data = repo.wwritedata(name, data)
278 archiver.addfile(prefix + name, mode, islink, data)
284 archiver.addfile(prefix + name, mode, islink, data)
279
285
280 if kind not in archivers:
286 if kind not in archivers:
281 raise util.Abort(_("unknown archive type '%s'") % kind)
287 raise util.Abort(_("unknown archive type '%s'") % kind)
282
288
283 ctx = repo[node]
289 ctx = repo[node]
284 archiver = archivers[kind](dest, mtime or ctx.date()[0])
290 archiver = archivers[kind](dest, mtime or ctx.date()[0])
285
291
286 if repo.ui.configbool("ui", "archivemeta", True):
292 if repo.ui.configbool("ui", "archivemeta", True):
287 name = '.hg_archival.txt'
293 name = '.hg_archival.txt'
288 if not matchfn or matchfn(name):
294 if not matchfn or matchfn(name):
289 write(name, 0644, False, lambda: buildmetadata(ctx))
295 write(name, 0644, False, lambda: buildmetadata(ctx))
290
296
291 if matchfn:
297 if matchfn:
292 files = [f for f in ctx.manifest().keys() if matchfn(f)]
298 files = [f for f in ctx.manifest().keys() if matchfn(f)]
293 else:
299 else:
294 files = ctx.manifest().keys()
300 files = ctx.manifest().keys()
295 total = len(files)
301 total = len(files)
296 if total:
302 if total:
297 files.sort()
303 files.sort()
298 repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
304 repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
299 for i, f in enumerate(files):
305 for i, f in enumerate(files):
300 ff = ctx.flags(f)
306 ff = ctx.flags(f)
301 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
307 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
302 repo.ui.progress(_('archiving'), i + 1, item=f,
308 repo.ui.progress(_('archiving'), i + 1, item=f,
303 unit=_('files'), total=total)
309 unit=_('files'), total=total)
304 repo.ui.progress(_('archiving'), None)
310 repo.ui.progress(_('archiving'), None)
305
311
306 if subrepos:
312 if subrepos:
307 for subpath in sorted(ctx.substate):
313 for subpath in sorted(ctx.substate):
308 sub = ctx.sub(subpath)
314 sub = ctx.sub(subpath)
309 submatch = matchmod.narrowmatcher(subpath, matchfn)
315 submatch = matchmod.narrowmatcher(subpath, matchfn)
310 total += sub.archive(archiver, prefix, submatch)
316 total += sub.archive(archiver, prefix, submatch)
311
317
312 if total == 0:
318 if total == 0:
313 raise error.Abort(_('no files match the archive pattern'))
319 raise error.Abort(_('no files match the archive pattern'))
314
320
315 archiver.done()
321 archiver.done()
316 return total
322 return total
@@ -1,797 +1,821
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [phases]
2 > [phases]
3 > # public changeset are not obsolete
3 > # public changeset are not obsolete
4 > publish=false
4 > publish=false
5 > [ui]
5 > [ui]
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
7 > EOF
7 > EOF
8 $ mkcommit() {
8 $ mkcommit() {
9 > echo "$1" > "$1"
9 > echo "$1" > "$1"
10 > hg add "$1"
10 > hg add "$1"
11 > hg ci -m "add $1"
11 > hg ci -m "add $1"
12 > }
12 > }
13 $ getid() {
13 $ getid() {
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
15 > }
15 > }
16
16
17 $ cat > debugkeys.py <<EOF
17 $ cat > debugkeys.py <<EOF
18 > def reposetup(ui, repo):
18 > def reposetup(ui, repo):
19 > class debugkeysrepo(repo.__class__):
19 > class debugkeysrepo(repo.__class__):
20 > def listkeys(self, namespace):
20 > def listkeys(self, namespace):
21 > ui.write('listkeys %s\n' % (namespace,))
21 > ui.write('listkeys %s\n' % (namespace,))
22 > return super(debugkeysrepo, self).listkeys(namespace)
22 > return super(debugkeysrepo, self).listkeys(namespace)
23 >
23 >
24 > if repo.local():
24 > if repo.local():
25 > repo.__class__ = debugkeysrepo
25 > repo.__class__ = debugkeysrepo
26 > EOF
26 > EOF
27
27
28 $ hg init tmpa
28 $ hg init tmpa
29 $ cd tmpa
29 $ cd tmpa
30 $ mkcommit kill_me
30 $ mkcommit kill_me
31
31
32 Checking that the feature is properly disabled
32 Checking that the feature is properly disabled
33
33
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
35 abort: creating obsolete markers is not enabled on this repo
35 abort: creating obsolete markers is not enabled on this repo
36 [255]
36 [255]
37
37
38 Enabling it
38 Enabling it
39
39
40 $ cat >> $HGRCPATH << EOF
40 $ cat >> $HGRCPATH << EOF
41 > [experimental]
41 > [experimental]
42 > evolution=createmarkers,exchange
42 > evolution=createmarkers,exchange
43 > EOF
43 > EOF
44
44
45 Killing a single changeset without replacement
45 Killing a single changeset without replacement
46
46
47 $ hg debugobsolete 0
47 $ hg debugobsolete 0
48 abort: changeset references must be full hexadecimal node identifiers
48 abort: changeset references must be full hexadecimal node identifiers
49 [255]
49 [255]
50 $ hg debugobsolete '00'
50 $ hg debugobsolete '00'
51 abort: changeset references must be full hexadecimal node identifiers
51 abort: changeset references must be full hexadecimal node identifiers
52 [255]
52 [255]
53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
54 $ hg debugobsolete
54 $ hg debugobsolete
55 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
55 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
56
56
57 (test that mercurial is not confused)
57 (test that mercurial is not confused)
58
58
59 $ hg up null --quiet # having 0 as parent prevents it to be hidden
59 $ hg up null --quiet # having 0 as parent prevents it to be hidden
60 $ hg tip
60 $ hg tip
61 -1:000000000000 (public) [tip ]
61 -1:000000000000 (public) [tip ]
62 $ hg up --hidden tip --quiet
62 $ hg up --hidden tip --quiet
63
63
64 Killing a single changeset with itself should fail
64 Killing a single changeset with itself should fail
65 (simple local safeguard)
65 (simple local safeguard)
66
66
67 $ hg debugobsolete `getid kill_me` `getid kill_me`
67 $ hg debugobsolete `getid kill_me` `getid kill_me`
68 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
68 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
69 [255]
69 [255]
70
70
71 $ cd ..
71 $ cd ..
72
72
73 Killing a single changeset with replacement
73 Killing a single changeset with replacement
74 (and testing the format option)
74 (and testing the format option)
75
75
76 $ hg init tmpb
76 $ hg init tmpb
77 $ cd tmpb
77 $ cd tmpb
78 $ mkcommit a
78 $ mkcommit a
79 $ mkcommit b
79 $ mkcommit b
80 $ mkcommit original_c
80 $ mkcommit original_c
81 $ hg up "desc('b')"
81 $ hg up "desc('b')"
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
83 $ mkcommit new_c
83 $ mkcommit new_c
84 created new head
84 created new head
85 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
85 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
86 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
86 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
87 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
87 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
88 2:245bde4270cd add original_c
88 2:245bde4270cd add original_c
89 $ hg debugrevlog -cd
89 $ hg debugrevlog -cd
90 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
90 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
91 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
91 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
92 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
92 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
93 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
93 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
94 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
94 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
95 $ hg debugobsolete
95 $ hg debugobsolete
96 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
96 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
97
97
98 (check for version number of the obsstore)
98 (check for version number of the obsstore)
99
99
100 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
100 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
101 \x00 (no-eol) (esc)
101 \x00 (no-eol) (esc)
102
102
103 do it again (it read the obsstore before adding new changeset)
103 do it again (it read the obsstore before adding new changeset)
104
104
105 $ hg up '.^'
105 $ hg up '.^'
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
107 $ mkcommit new_2_c
107 $ mkcommit new_2_c
108 created new head
108 created new head
109 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
109 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
110 $ hg debugobsolete
110 $ hg debugobsolete
111 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
111 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
112 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
112 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
113
113
114 Register two markers with a missing node
114 Register two markers with a missing node
115
115
116 $ hg up '.^'
116 $ hg up '.^'
117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
118 $ mkcommit new_3_c
118 $ mkcommit new_3_c
119 created new head
119 created new head
120 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
120 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
121 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
121 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
122 $ hg debugobsolete
122 $ hg debugobsolete
123 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
123 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
124 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
124 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
125 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
125 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
126 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
126 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
127
127
128 Refuse pathological nullid successors
128 Refuse pathological nullid successors
129 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
129 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
130 transaction abort!
130 transaction abort!
131 rollback completed
131 rollback completed
132 abort: bad obsolescence marker detected: invalid successors nullid
132 abort: bad obsolescence marker detected: invalid successors nullid
133 [255]
133 [255]
134
134
135 Check that graphlog detect that a changeset is obsolete:
135 Check that graphlog detect that a changeset is obsolete:
136
136
137 $ hg log -G
137 $ hg log -G
138 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
138 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
139 |
139 |
140 o 1:7c3bad9141dc (draft) [ ] add b
140 o 1:7c3bad9141dc (draft) [ ] add b
141 |
141 |
142 o 0:1f0dee641bb7 (draft) [ ] add a
142 o 0:1f0dee641bb7 (draft) [ ] add a
143
143
144
144
145 check that heads does not report them
145 check that heads does not report them
146
146
147 $ hg heads
147 $ hg heads
148 5:5601fb93a350 (draft) [tip ] add new_3_c
148 5:5601fb93a350 (draft) [tip ] add new_3_c
149 $ hg heads --hidden
149 $ hg heads --hidden
150 5:5601fb93a350 (draft) [tip ] add new_3_c
150 5:5601fb93a350 (draft) [tip ] add new_3_c
151 4:ca819180edb9 (draft) [ ] add new_2_c
151 4:ca819180edb9 (draft) [ ] add new_2_c
152 3:cdbce2fbb163 (draft) [ ] add new_c
152 3:cdbce2fbb163 (draft) [ ] add new_c
153 2:245bde4270cd (draft) [ ] add original_c
153 2:245bde4270cd (draft) [ ] add original_c
154
154
155
155
156 check that summary does not report them
156 check that summary does not report them
157
157
158 $ hg init ../sink
158 $ hg init ../sink
159 $ echo '[paths]' >> .hg/hgrc
159 $ echo '[paths]' >> .hg/hgrc
160 $ echo 'default=../sink' >> .hg/hgrc
160 $ echo 'default=../sink' >> .hg/hgrc
161 $ hg summary --remote
161 $ hg summary --remote
162 parent: 5:5601fb93a350 tip
162 parent: 5:5601fb93a350 tip
163 add new_3_c
163 add new_3_c
164 branch: default
164 branch: default
165 commit: (clean)
165 commit: (clean)
166 update: (current)
166 update: (current)
167 remote: 3 outgoing
167 remote: 3 outgoing
168
168
169 $ hg summary --remote --hidden
169 $ hg summary --remote --hidden
170 parent: 5:5601fb93a350 tip
170 parent: 5:5601fb93a350 tip
171 add new_3_c
171 add new_3_c
172 branch: default
172 branch: default
173 commit: (clean)
173 commit: (clean)
174 update: 3 new changesets, 4 branch heads (merge)
174 update: 3 new changesets, 4 branch heads (merge)
175 remote: 3 outgoing
175 remote: 3 outgoing
176
176
177 check that various commands work well with filtering
177 check that various commands work well with filtering
178
178
179 $ hg tip
179 $ hg tip
180 5:5601fb93a350 (draft) [tip ] add new_3_c
180 5:5601fb93a350 (draft) [tip ] add new_3_c
181 $ hg log -r 6
181 $ hg log -r 6
182 abort: unknown revision '6'!
182 abort: unknown revision '6'!
183 [255]
183 [255]
184 $ hg log -r 4
184 $ hg log -r 4
185 abort: hidden revision '4'!
185 abort: hidden revision '4'!
186 (use --hidden to access hidden revisions)
186 (use --hidden to access hidden revisions)
187 [255]
187 [255]
188 $ hg debugrevspec 'rev(6)'
188 $ hg debugrevspec 'rev(6)'
189 $ hg debugrevspec 'rev(4)'
189 $ hg debugrevspec 'rev(4)'
190 $ hg debugrevspec 'null'
190 $ hg debugrevspec 'null'
191 -1
191 -1
192
192
193 Check that public changeset are not accounted as obsolete:
193 Check that public changeset are not accounted as obsolete:
194
194
195 $ hg --hidden phase --public 2
195 $ hg --hidden phase --public 2
196 $ hg log -G
196 $ hg log -G
197 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
197 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
198 |
198 |
199 | o 2:245bde4270cd (public) [ ] add original_c
199 | o 2:245bde4270cd (public) [ ] add original_c
200 |/
200 |/
201 o 1:7c3bad9141dc (public) [ ] add b
201 o 1:7c3bad9141dc (public) [ ] add b
202 |
202 |
203 o 0:1f0dee641bb7 (public) [ ] add a
203 o 0:1f0dee641bb7 (public) [ ] add a
204
204
205
205
206 And that bumped changeset are detected
206 And that bumped changeset are detected
207 --------------------------------------
207 --------------------------------------
208
208
209 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
209 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
210 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
210 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
211 the public changeset
211 the public changeset
212
212
213 $ hg log --hidden -r 'bumped()'
213 $ hg log --hidden -r 'bumped()'
214 5:5601fb93a350 (draft) [tip ] add new_3_c
214 5:5601fb93a350 (draft) [tip ] add new_3_c
215
215
216 And that we can't push bumped changeset
216 And that we can't push bumped changeset
217
217
218 $ hg push ../tmpa -r 0 --force #(make repo related)
218 $ hg push ../tmpa -r 0 --force #(make repo related)
219 pushing to ../tmpa
219 pushing to ../tmpa
220 searching for changes
220 searching for changes
221 warning: repository is unrelated
221 warning: repository is unrelated
222 adding changesets
222 adding changesets
223 adding manifests
223 adding manifests
224 adding file changes
224 adding file changes
225 added 1 changesets with 1 changes to 1 files (+1 heads)
225 added 1 changesets with 1 changes to 1 files (+1 heads)
226 $ hg push ../tmpa
226 $ hg push ../tmpa
227 pushing to ../tmpa
227 pushing to ../tmpa
228 searching for changes
228 searching for changes
229 abort: push includes bumped changeset: 5601fb93a350!
229 abort: push includes bumped changeset: 5601fb93a350!
230 [255]
230 [255]
231
231
232 Fixing "bumped" situation
232 Fixing "bumped" situation
233 We need to create a clone of 5 and add a special marker with a flag
233 We need to create a clone of 5 and add a special marker with a flag
234
234
235 $ hg up '5^'
235 $ hg up '5^'
236 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
236 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
237 $ hg revert -ar 5
237 $ hg revert -ar 5
238 adding new_3_c
238 adding new_3_c
239 $ hg ci -m 'add n3w_3_c'
239 $ hg ci -m 'add n3w_3_c'
240 created new head
240 created new head
241 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
241 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
242 $ hg log -r 'bumped()'
242 $ hg log -r 'bumped()'
243 $ hg log -G
243 $ hg log -G
244 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
244 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
245 |
245 |
246 | o 2:245bde4270cd (public) [ ] add original_c
246 | o 2:245bde4270cd (public) [ ] add original_c
247 |/
247 |/
248 o 1:7c3bad9141dc (public) [ ] add b
248 o 1:7c3bad9141dc (public) [ ] add b
249 |
249 |
250 o 0:1f0dee641bb7 (public) [ ] add a
250 o 0:1f0dee641bb7 (public) [ ] add a
251
251
252
252
253 $ cd ..
254
255 Revision 0 is hidden
256 --------------------
257
258 $ hg init rev0hidden
259 $ cd rev0hidden
260
261 $ mkcommit kill0
262 $ hg up -q null
263 $ hg debugobsolete `getid kill0`
264 $ mkcommit a
265 $ mkcommit b
266
267 Should pick the first visible revision as "repo" node
268
269 $ hg archive ../archive-null
270 $ cat ../archive-null/.hg_archival.txt
271 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
272 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
273 branch: default
274 latesttag: null
275 latesttagdistance: 2
276 changessincelatesttag: 2
253
277
254
278
255 $ cd ..
279 $ cd ..
256
280
257 Exchange Test
281 Exchange Test
258 ============================
282 ============================
259
283
260 Destination repo does not have any data
284 Destination repo does not have any data
261 ---------------------------------------
285 ---------------------------------------
262
286
263 Simple incoming test
287 Simple incoming test
264
288
265 $ hg init tmpc
289 $ hg init tmpc
266 $ cd tmpc
290 $ cd tmpc
267 $ hg incoming ../tmpb
291 $ hg incoming ../tmpb
268 comparing with ../tmpb
292 comparing with ../tmpb
269 0:1f0dee641bb7 (public) [ ] add a
293 0:1f0dee641bb7 (public) [ ] add a
270 1:7c3bad9141dc (public) [ ] add b
294 1:7c3bad9141dc (public) [ ] add b
271 2:245bde4270cd (public) [ ] add original_c
295 2:245bde4270cd (public) [ ] add original_c
272 6:6f9641995072 (draft) [tip ] add n3w_3_c
296 6:6f9641995072 (draft) [tip ] add n3w_3_c
273
297
274 Try to pull markers
298 Try to pull markers
275 (extinct changeset are excluded but marker are pushed)
299 (extinct changeset are excluded but marker are pushed)
276
300
277 $ hg pull ../tmpb
301 $ hg pull ../tmpb
278 pulling from ../tmpb
302 pulling from ../tmpb
279 requesting all changes
303 requesting all changes
280 adding changesets
304 adding changesets
281 adding manifests
305 adding manifests
282 adding file changes
306 adding file changes
283 added 4 changesets with 4 changes to 4 files (+1 heads)
307 added 4 changesets with 4 changes to 4 files (+1 heads)
284 (run 'hg heads' to see heads, 'hg merge' to merge)
308 (run 'hg heads' to see heads, 'hg merge' to merge)
285 $ hg debugobsolete
309 $ hg debugobsolete
286 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
310 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
287 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
311 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
288 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
312 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
289 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
313 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
290 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
314 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
291
315
292 Rollback//Transaction support
316 Rollback//Transaction support
293
317
294 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
318 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
295 $ hg debugobsolete
319 $ hg debugobsolete
296 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
320 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
297 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
321 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
298 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
322 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
299 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
323 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
300 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
324 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
301 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
325 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
302 $ hg rollback -n
326 $ hg rollback -n
303 repository tip rolled back to revision 3 (undo debugobsolete)
327 repository tip rolled back to revision 3 (undo debugobsolete)
304 $ hg rollback
328 $ hg rollback
305 repository tip rolled back to revision 3 (undo debugobsolete)
329 repository tip rolled back to revision 3 (undo debugobsolete)
306 $ hg debugobsolete
330 $ hg debugobsolete
307 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
331 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
308 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
332 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
309 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
333 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
310 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
334 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
311 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
335 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
312
336
313 $ cd ..
337 $ cd ..
314
338
315 Try to push markers
339 Try to push markers
316
340
317 $ hg init tmpd
341 $ hg init tmpd
318 $ hg -R tmpb push tmpd
342 $ hg -R tmpb push tmpd
319 pushing to tmpd
343 pushing to tmpd
320 searching for changes
344 searching for changes
321 adding changesets
345 adding changesets
322 adding manifests
346 adding manifests
323 adding file changes
347 adding file changes
324 added 4 changesets with 4 changes to 4 files (+1 heads)
348 added 4 changesets with 4 changes to 4 files (+1 heads)
325 $ hg -R tmpd debugobsolete | sort
349 $ hg -R tmpd debugobsolete | sort
326 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
350 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
327 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
351 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
328 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
352 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
329 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
353 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
330 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
354 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
331
355
332 Check obsolete keys are exchanged only if source has an obsolete store
356 Check obsolete keys are exchanged only if source has an obsolete store
333
357
334 $ hg init empty
358 $ hg init empty
335 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
359 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
336 pushing to tmpd
360 pushing to tmpd
337 listkeys phases
361 listkeys phases
338 listkeys bookmarks
362 listkeys bookmarks
339 no changes found
363 no changes found
340 listkeys phases
364 listkeys phases
341 [1]
365 [1]
342
366
343 clone support
367 clone support
344 (markers are copied and extinct changesets are included to allow hardlinks)
368 (markers are copied and extinct changesets are included to allow hardlinks)
345
369
346 $ hg clone tmpb clone-dest
370 $ hg clone tmpb clone-dest
347 updating to branch default
371 updating to branch default
348 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
372 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
349 $ hg -R clone-dest log -G --hidden
373 $ hg -R clone-dest log -G --hidden
350 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
374 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
351 |
375 |
352 | x 5:5601fb93a350 (draft) [ ] add new_3_c
376 | x 5:5601fb93a350 (draft) [ ] add new_3_c
353 |/
377 |/
354 | x 4:ca819180edb9 (draft) [ ] add new_2_c
378 | x 4:ca819180edb9 (draft) [ ] add new_2_c
355 |/
379 |/
356 | x 3:cdbce2fbb163 (draft) [ ] add new_c
380 | x 3:cdbce2fbb163 (draft) [ ] add new_c
357 |/
381 |/
358 | o 2:245bde4270cd (public) [ ] add original_c
382 | o 2:245bde4270cd (public) [ ] add original_c
359 |/
383 |/
360 o 1:7c3bad9141dc (public) [ ] add b
384 o 1:7c3bad9141dc (public) [ ] add b
361 |
385 |
362 o 0:1f0dee641bb7 (public) [ ] add a
386 o 0:1f0dee641bb7 (public) [ ] add a
363
387
364 $ hg -R clone-dest debugobsolete
388 $ hg -R clone-dest debugobsolete
365 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
389 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
366 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
390 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
367 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
391 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
368 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
392 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
369 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
393 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
370
394
371
395
372 Destination repo have existing data
396 Destination repo have existing data
373 ---------------------------------------
397 ---------------------------------------
374
398
375 On pull
399 On pull
376
400
377 $ hg init tmpe
401 $ hg init tmpe
378 $ cd tmpe
402 $ cd tmpe
379 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
403 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
380 $ hg pull ../tmpb
404 $ hg pull ../tmpb
381 pulling from ../tmpb
405 pulling from ../tmpb
382 requesting all changes
406 requesting all changes
383 adding changesets
407 adding changesets
384 adding manifests
408 adding manifests
385 adding file changes
409 adding file changes
386 added 4 changesets with 4 changes to 4 files (+1 heads)
410 added 4 changesets with 4 changes to 4 files (+1 heads)
387 (run 'hg heads' to see heads, 'hg merge' to merge)
411 (run 'hg heads' to see heads, 'hg merge' to merge)
388 $ hg debugobsolete
412 $ hg debugobsolete
389 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
413 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
390 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
414 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
391 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
415 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
392 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
416 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
393 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
417 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
394 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
418 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
395
419
396
420
397 On push
421 On push
398
422
399 $ hg push ../tmpc
423 $ hg push ../tmpc
400 pushing to ../tmpc
424 pushing to ../tmpc
401 searching for changes
425 searching for changes
402 no changes found
426 no changes found
403 [1]
427 [1]
404 $ hg -R ../tmpc debugobsolete
428 $ hg -R ../tmpc debugobsolete
405 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
429 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
406 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
430 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
407 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
431 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
408 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
432 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
409 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
433 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
410 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
434 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
411
435
412 detect outgoing obsolete and unstable
436 detect outgoing obsolete and unstable
413 ---------------------------------------
437 ---------------------------------------
414
438
415
439
416 $ hg log -G
440 $ hg log -G
417 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
441 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
418 |
442 |
419 | o 2:245bde4270cd (public) [ ] add original_c
443 | o 2:245bde4270cd (public) [ ] add original_c
420 |/
444 |/
421 o 1:7c3bad9141dc (public) [ ] add b
445 o 1:7c3bad9141dc (public) [ ] add b
422 |
446 |
423 o 0:1f0dee641bb7 (public) [ ] add a
447 o 0:1f0dee641bb7 (public) [ ] add a
424
448
425 $ hg up 'desc("n3w_3_c")'
449 $ hg up 'desc("n3w_3_c")'
426 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
450 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
427 $ mkcommit original_d
451 $ mkcommit original_d
428 $ mkcommit original_e
452 $ mkcommit original_e
429 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
453 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
430 $ hg debugobsolete | grep `getid original_d`
454 $ hg debugobsolete | grep `getid original_d`
431 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
455 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
432 $ hg log -r 'obsolete()'
456 $ hg log -r 'obsolete()'
433 4:94b33453f93b (draft) [ ] add original_d
457 4:94b33453f93b (draft) [ ] add original_d
434 $ hg log -G -r '::unstable()'
458 $ hg log -G -r '::unstable()'
435 @ 5:cda648ca50f5 (draft) [tip ] add original_e
459 @ 5:cda648ca50f5 (draft) [tip ] add original_e
436 |
460 |
437 x 4:94b33453f93b (draft) [ ] add original_d
461 x 4:94b33453f93b (draft) [ ] add original_d
438 |
462 |
439 o 3:6f9641995072 (draft) [ ] add n3w_3_c
463 o 3:6f9641995072 (draft) [ ] add n3w_3_c
440 |
464 |
441 o 1:7c3bad9141dc (public) [ ] add b
465 o 1:7c3bad9141dc (public) [ ] add b
442 |
466 |
443 o 0:1f0dee641bb7 (public) [ ] add a
467 o 0:1f0dee641bb7 (public) [ ] add a
444
468
445
469
446 refuse to push obsolete changeset
470 refuse to push obsolete changeset
447
471
448 $ hg push ../tmpc/ -r 'desc("original_d")'
472 $ hg push ../tmpc/ -r 'desc("original_d")'
449 pushing to ../tmpc/
473 pushing to ../tmpc/
450 searching for changes
474 searching for changes
451 abort: push includes obsolete changeset: 94b33453f93b!
475 abort: push includes obsolete changeset: 94b33453f93b!
452 [255]
476 [255]
453
477
454 refuse to push unstable changeset
478 refuse to push unstable changeset
455
479
456 $ hg push ../tmpc/
480 $ hg push ../tmpc/
457 pushing to ../tmpc/
481 pushing to ../tmpc/
458 searching for changes
482 searching for changes
459 abort: push includes unstable changeset: cda648ca50f5!
483 abort: push includes unstable changeset: cda648ca50f5!
460 [255]
484 [255]
461
485
462 Test that extinct changeset are properly detected
486 Test that extinct changeset are properly detected
463
487
464 $ hg log -r 'extinct()'
488 $ hg log -r 'extinct()'
465
489
466 Don't try to push extinct changeset
490 Don't try to push extinct changeset
467
491
468 $ hg init ../tmpf
492 $ hg init ../tmpf
469 $ hg out ../tmpf
493 $ hg out ../tmpf
470 comparing with ../tmpf
494 comparing with ../tmpf
471 searching for changes
495 searching for changes
472 0:1f0dee641bb7 (public) [ ] add a
496 0:1f0dee641bb7 (public) [ ] add a
473 1:7c3bad9141dc (public) [ ] add b
497 1:7c3bad9141dc (public) [ ] add b
474 2:245bde4270cd (public) [ ] add original_c
498 2:245bde4270cd (public) [ ] add original_c
475 3:6f9641995072 (draft) [ ] add n3w_3_c
499 3:6f9641995072 (draft) [ ] add n3w_3_c
476 4:94b33453f93b (draft) [ ] add original_d
500 4:94b33453f93b (draft) [ ] add original_d
477 5:cda648ca50f5 (draft) [tip ] add original_e
501 5:cda648ca50f5 (draft) [tip ] add original_e
478 $ hg push ../tmpf -f # -f because be push unstable too
502 $ hg push ../tmpf -f # -f because be push unstable too
479 pushing to ../tmpf
503 pushing to ../tmpf
480 searching for changes
504 searching for changes
481 adding changesets
505 adding changesets
482 adding manifests
506 adding manifests
483 adding file changes
507 adding file changes
484 added 6 changesets with 6 changes to 6 files (+1 heads)
508 added 6 changesets with 6 changes to 6 files (+1 heads)
485
509
486 no warning displayed
510 no warning displayed
487
511
488 $ hg push ../tmpf
512 $ hg push ../tmpf
489 pushing to ../tmpf
513 pushing to ../tmpf
490 searching for changes
514 searching for changes
491 no changes found
515 no changes found
492 [1]
516 [1]
493
517
494 Do not warn about new head when the new head is a successors of a remote one
518 Do not warn about new head when the new head is a successors of a remote one
495
519
496 $ hg log -G
520 $ hg log -G
497 @ 5:cda648ca50f5 (draft) [tip ] add original_e
521 @ 5:cda648ca50f5 (draft) [tip ] add original_e
498 |
522 |
499 x 4:94b33453f93b (draft) [ ] add original_d
523 x 4:94b33453f93b (draft) [ ] add original_d
500 |
524 |
501 o 3:6f9641995072 (draft) [ ] add n3w_3_c
525 o 3:6f9641995072 (draft) [ ] add n3w_3_c
502 |
526 |
503 | o 2:245bde4270cd (public) [ ] add original_c
527 | o 2:245bde4270cd (public) [ ] add original_c
504 |/
528 |/
505 o 1:7c3bad9141dc (public) [ ] add b
529 o 1:7c3bad9141dc (public) [ ] add b
506 |
530 |
507 o 0:1f0dee641bb7 (public) [ ] add a
531 o 0:1f0dee641bb7 (public) [ ] add a
508
532
509 $ hg up -q 'desc(n3w_3_c)'
533 $ hg up -q 'desc(n3w_3_c)'
510 $ mkcommit obsolete_e
534 $ mkcommit obsolete_e
511 created new head
535 created new head
512 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
536 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
513 $ hg outgoing ../tmpf # parasite hg outgoing testin
537 $ hg outgoing ../tmpf # parasite hg outgoing testin
514 comparing with ../tmpf
538 comparing with ../tmpf
515 searching for changes
539 searching for changes
516 6:3de5eca88c00 (draft) [tip ] add obsolete_e
540 6:3de5eca88c00 (draft) [tip ] add obsolete_e
517 $ hg push ../tmpf
541 $ hg push ../tmpf
518 pushing to ../tmpf
542 pushing to ../tmpf
519 searching for changes
543 searching for changes
520 adding changesets
544 adding changesets
521 adding manifests
545 adding manifests
522 adding file changes
546 adding file changes
523 added 1 changesets with 1 changes to 1 files (+1 heads)
547 added 1 changesets with 1 changes to 1 files (+1 heads)
524
548
525 test relevance computation
549 test relevance computation
526 ---------------------------------------
550 ---------------------------------------
527
551
528 Checking simple case of "marker relevance".
552 Checking simple case of "marker relevance".
529
553
530
554
531 Reminder of the repo situation
555 Reminder of the repo situation
532
556
533 $ hg log --hidden --graph
557 $ hg log --hidden --graph
534 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
558 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
535 |
559 |
536 | x 5:cda648ca50f5 (draft) [ ] add original_e
560 | x 5:cda648ca50f5 (draft) [ ] add original_e
537 | |
561 | |
538 | x 4:94b33453f93b (draft) [ ] add original_d
562 | x 4:94b33453f93b (draft) [ ] add original_d
539 |/
563 |/
540 o 3:6f9641995072 (draft) [ ] add n3w_3_c
564 o 3:6f9641995072 (draft) [ ] add n3w_3_c
541 |
565 |
542 | o 2:245bde4270cd (public) [ ] add original_c
566 | o 2:245bde4270cd (public) [ ] add original_c
543 |/
567 |/
544 o 1:7c3bad9141dc (public) [ ] add b
568 o 1:7c3bad9141dc (public) [ ] add b
545 |
569 |
546 o 0:1f0dee641bb7 (public) [ ] add a
570 o 0:1f0dee641bb7 (public) [ ] add a
547
571
548
572
549 List of all markers
573 List of all markers
550
574
551 $ hg debugobsolete
575 $ hg debugobsolete
552 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
576 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
553 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
577 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
554 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
578 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
555 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
579 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
556 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
580 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
557 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
581 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
558 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
582 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
559 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
583 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
560
584
561 List of changesets with no chain
585 List of changesets with no chain
562
586
563 $ hg debugobsolete --hidden --rev ::2
587 $ hg debugobsolete --hidden --rev ::2
564
588
565 List of changesets that are included on marker chain
589 List of changesets that are included on marker chain
566
590
567 $ hg debugobsolete --hidden --rev 6
591 $ hg debugobsolete --hidden --rev 6
568 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
592 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
569
593
570 List of changesets with a longer chain, (including a pruned children)
594 List of changesets with a longer chain, (including a pruned children)
571
595
572 $ hg debugobsolete --hidden --rev 3
596 $ hg debugobsolete --hidden --rev 3
573 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
597 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
574 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
598 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
575 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
599 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
576 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
600 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
577 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
601 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
578 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
602 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
579 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
603 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
580
604
581 List of both
605 List of both
582
606
583 $ hg debugobsolete --hidden --rev 3::6
607 $ hg debugobsolete --hidden --rev 3::6
584 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
608 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
585 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
609 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
586 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
610 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
587 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
611 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
588 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
612 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
589 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
613 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
590 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
614 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
591 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
615 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
592
616
593 #if serve
617 #if serve
594
618
595 check hgweb does not explode
619 check hgweb does not explode
596 ====================================
620 ====================================
597
621
598 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
622 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
599 adding changesets
623 adding changesets
600 adding manifests
624 adding manifests
601 adding file changes
625 adding file changes
602 added 62 changesets with 63 changes to 9 files (+60 heads)
626 added 62 changesets with 63 changes to 9 files (+60 heads)
603 (run 'hg heads .' to see heads, 'hg merge' to merge)
627 (run 'hg heads .' to see heads, 'hg merge' to merge)
604 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
628 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
605 > do
629 > do
606 > hg debugobsolete $node
630 > hg debugobsolete $node
607 > done
631 > done
608 $ hg up tip
632 $ hg up tip
609 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
633 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
610
634
611 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
635 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
612 $ cat hg.pid >> $DAEMON_PIDS
636 $ cat hg.pid >> $DAEMON_PIDS
613
637
614 check changelog view
638 check changelog view
615
639
616 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/'
640 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/'
617 200 Script output follows
641 200 Script output follows
618
642
619 check graph view
643 check graph view
620
644
621 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph'
645 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph'
622 200 Script output follows
646 200 Script output follows
623
647
624 check filelog view
648 check filelog view
625
649
626 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
650 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
627 200 Script output follows
651 200 Script output follows
628
652
629 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'
653 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'
630 200 Script output follows
654 200 Script output follows
631 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
655 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
632 404 Not Found
656 404 Not Found
633 [1]
657 [1]
634
658
635 check that web.view config option:
659 check that web.view config option:
636
660
637 $ "$TESTDIR/killdaemons.py" hg.pid
661 $ "$TESTDIR/killdaemons.py" hg.pid
638 $ cat >> .hg/hgrc << EOF
662 $ cat >> .hg/hgrc << EOF
639 > [web]
663 > [web]
640 > view=all
664 > view=all
641 > EOF
665 > EOF
642 $ wait
666 $ wait
643 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
667 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
644 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
668 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
645 200 Script output follows
669 200 Script output follows
646 $ "$TESTDIR/killdaemons.py" hg.pid
670 $ "$TESTDIR/killdaemons.py" hg.pid
647
671
648 Checking _enable=False warning if obsolete marker exists
672 Checking _enable=False warning if obsolete marker exists
649
673
650 $ echo '[experimental]' >> $HGRCPATH
674 $ echo '[experimental]' >> $HGRCPATH
651 $ echo "evolution=" >> $HGRCPATH
675 $ echo "evolution=" >> $HGRCPATH
652 $ hg log -r tip
676 $ hg log -r tip
653 obsolete feature not enabled but 68 markers found!
677 obsolete feature not enabled but 68 markers found!
654 68:c15e9edfca13 (draft) [tip ] add celestine
678 68:c15e9edfca13 (draft) [tip ] add celestine
655
679
656 reenable for later test
680 reenable for later test
657
681
658 $ echo '[experimental]' >> $HGRCPATH
682 $ echo '[experimental]' >> $HGRCPATH
659 $ echo "evolution=createmarkers,exchange" >> $HGRCPATH
683 $ echo "evolution=createmarkers,exchange" >> $HGRCPATH
660
684
661 #endif
685 #endif
662
686
663 Test incoming/outcoming with changesets obsoleted remotely, known locally
687 Test incoming/outcoming with changesets obsoleted remotely, known locally
664 ===============================================================================
688 ===============================================================================
665
689
666 This test issue 3805
690 This test issue 3805
667
691
668 $ hg init repo-issue3805
692 $ hg init repo-issue3805
669 $ cd repo-issue3805
693 $ cd repo-issue3805
670 $ echo "foo" > foo
694 $ echo "foo" > foo
671 $ hg ci -Am "A"
695 $ hg ci -Am "A"
672 adding foo
696 adding foo
673 $ hg clone . ../other-issue3805
697 $ hg clone . ../other-issue3805
674 updating to branch default
698 updating to branch default
675 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
699 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
676 $ echo "bar" >> foo
700 $ echo "bar" >> foo
677 $ hg ci --amend
701 $ hg ci --amend
678 $ cd ../other-issue3805
702 $ cd ../other-issue3805
679 $ hg log -G
703 $ hg log -G
680 @ 0:193e9254ce7e (draft) [tip ] A
704 @ 0:193e9254ce7e (draft) [tip ] A
681
705
682 $ hg log -G -R ../repo-issue3805
706 $ hg log -G -R ../repo-issue3805
683 @ 2:3816541e5485 (draft) [tip ] A
707 @ 2:3816541e5485 (draft) [tip ] A
684
708
685 $ hg incoming
709 $ hg incoming
686 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
710 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
687 searching for changes
711 searching for changes
688 2:3816541e5485 (draft) [tip ] A
712 2:3816541e5485 (draft) [tip ] A
689 $ hg incoming --bundle ../issue3805.hg
713 $ hg incoming --bundle ../issue3805.hg
690 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
714 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
691 searching for changes
715 searching for changes
692 2:3816541e5485 (draft) [tip ] A
716 2:3816541e5485 (draft) [tip ] A
693 $ hg outgoing
717 $ hg outgoing
694 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
718 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
695 searching for changes
719 searching for changes
696 no changes found
720 no changes found
697 [1]
721 [1]
698
722
699 #if serve
723 #if serve
700
724
701 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
725 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
702 $ cat hg.pid >> $DAEMON_PIDS
726 $ cat hg.pid >> $DAEMON_PIDS
703
727
704 $ hg incoming http://localhost:$HGPORT
728 $ hg incoming http://localhost:$HGPORT
705 comparing with http://localhost:$HGPORT/
729 comparing with http://localhost:$HGPORT/
706 searching for changes
730 searching for changes
707 1:3816541e5485 (draft) [tip ] A
731 1:3816541e5485 (draft) [tip ] A
708 $ hg outgoing http://localhost:$HGPORT
732 $ hg outgoing http://localhost:$HGPORT
709 comparing with http://localhost:$HGPORT/
733 comparing with http://localhost:$HGPORT/
710 searching for changes
734 searching for changes
711 no changes found
735 no changes found
712 [1]
736 [1]
713
737
714 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
738 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
715
739
716 #endif
740 #endif
717
741
718 This test issue 3814
742 This test issue 3814
719
743
720 (nothing to push but locally hidden changeset)
744 (nothing to push but locally hidden changeset)
721
745
722 $ cd ..
746 $ cd ..
723 $ hg init repo-issue3814
747 $ hg init repo-issue3814
724 $ cd repo-issue3805
748 $ cd repo-issue3805
725 $ hg push -r 3816541e5485 ../repo-issue3814
749 $ hg push -r 3816541e5485 ../repo-issue3814
726 pushing to ../repo-issue3814
750 pushing to ../repo-issue3814
727 searching for changes
751 searching for changes
728 adding changesets
752 adding changesets
729 adding manifests
753 adding manifests
730 adding file changes
754 adding file changes
731 added 1 changesets with 1 changes to 1 files
755 added 1 changesets with 1 changes to 1 files
732 $ hg out ../repo-issue3814
756 $ hg out ../repo-issue3814
733 comparing with ../repo-issue3814
757 comparing with ../repo-issue3814
734 searching for changes
758 searching for changes
735 no changes found
759 no changes found
736 [1]
760 [1]
737
761
738 Test that a local tag blocks a changeset from being hidden
762 Test that a local tag blocks a changeset from being hidden
739
763
740 $ hg tag -l visible -r 0 --hidden
764 $ hg tag -l visible -r 0 --hidden
741 $ hg log -G
765 $ hg log -G
742 @ 2:3816541e5485 (draft) [tip ] A
766 @ 2:3816541e5485 (draft) [tip ] A
743
767
744 x 0:193e9254ce7e (draft) [visible ] A
768 x 0:193e9254ce7e (draft) [visible ] A
745
769
746 Test that removing a local tag does not cause some commands to fail
770 Test that removing a local tag does not cause some commands to fail
747
771
748 $ hg tag -l -r tip tiptag
772 $ hg tag -l -r tip tiptag
749 $ hg tags
773 $ hg tags
750 tiptag 2:3816541e5485
774 tiptag 2:3816541e5485
751 tip 2:3816541e5485
775 tip 2:3816541e5485
752 visible 0:193e9254ce7e
776 visible 0:193e9254ce7e
753 $ hg --config extensions.strip= strip -r tip --no-backup
777 $ hg --config extensions.strip= strip -r tip --no-backup
754 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
778 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
755 $ hg tags
779 $ hg tags
756 visible 0:193e9254ce7e
780 visible 0:193e9254ce7e
757 tip 0:193e9254ce7e
781 tip 0:193e9254ce7e
758
782
759 #if serve
783 #if serve
760
784
761 Test issue 4506
785 Test issue 4506
762
786
763 $ cd ..
787 $ cd ..
764 $ hg init repo-issue4506
788 $ hg init repo-issue4506
765 $ cd repo-issue4506
789 $ cd repo-issue4506
766 $ echo "0" > foo
790 $ echo "0" > foo
767 $ hg add foo
791 $ hg add foo
768 $ hg ci -m "content-0"
792 $ hg ci -m "content-0"
769
793
770 $ hg up null
794 $ hg up null
771 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
795 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
772 $ echo "1" > bar
796 $ echo "1" > bar
773 $ hg add bar
797 $ hg add bar
774 $ hg ci -m "content-1"
798 $ hg ci -m "content-1"
775 created new head
799 created new head
776 $ hg up 0
800 $ hg up 0
777 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
801 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
778 $ hg graft 1
802 $ hg graft 1
779 grafting 1:1c9eddb02162 "content-1" (tip)
803 grafting 1:1c9eddb02162 "content-1" (tip)
780
804
781 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
805 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
782
806
783 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
807 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
784 $ cat hg.pid >> $DAEMON_PIDS
808 $ cat hg.pid >> $DAEMON_PIDS
785
809
786 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1'
810 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1'
787 404 Not Found
811 404 Not Found
788 [1]
812 [1]
789 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar'
813 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar'
790 200 Script output follows
814 200 Script output follows
791 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar'
815 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar'
792 200 Script output follows
816 200 Script output follows
793
817
794 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
818 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
795
819
796 #endif
820 #endif
797
821
General Comments 0
You need to be logged in to leave comments. Login now