##// END OF EJS Templates
merge: better error messages to lead users to hg update --clean to abandon merges....
Augie Fackler -
r7821:9fe7e6ac default
parent child Browse files
Show More
@@ -1,288 +1,289 b''
1 # hg.py - repository classes for mercurial
1 # hg.py - repository classes for mercurial
2 #
2 #
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
4 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
5 #
5 #
6 # This software may be used and distributed according to the terms
6 # This software may be used and distributed according to the terms
7 # of the GNU General Public License, incorporated herein by reference.
7 # of the GNU General Public License, incorporated herein by reference.
8
8
9 from i18n import _
9 from i18n import _
10 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
10 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
11 import errno, lock, os, shutil, util, extensions, error
11 import errno, lock, os, shutil, util, extensions, error
12 import merge as _merge
12 import merge as _merge
13 import verify as _verify
13 import verify as _verify
14
14
15 def _local(path):
15 def _local(path):
16 return (os.path.isfile(util.drop_scheme('file', path)) and
16 return (os.path.isfile(util.drop_scheme('file', path)) and
17 bundlerepo or localrepo)
17 bundlerepo or localrepo)
18
18
19 def parseurl(url, revs=[]):
19 def parseurl(url, revs=[]):
20 '''parse url#branch, returning url, branch + revs'''
20 '''parse url#branch, returning url, branch + revs'''
21
21
22 if '#' not in url:
22 if '#' not in url:
23 return url, (revs or None), revs and revs[-1] or None
23 return url, (revs or None), revs and revs[-1] or None
24
24
25 url, branch = url.split('#', 1)
25 url, branch = url.split('#', 1)
26 checkout = revs and revs[-1] or branch
26 checkout = revs and revs[-1] or branch
27 return url, revs + [branch], checkout
27 return url, revs + [branch], checkout
28
28
29 schemes = {
29 schemes = {
30 'bundle': bundlerepo,
30 'bundle': bundlerepo,
31 'file': _local,
31 'file': _local,
32 'http': httprepo,
32 'http': httprepo,
33 'https': httprepo,
33 'https': httprepo,
34 'ssh': sshrepo,
34 'ssh': sshrepo,
35 'static-http': statichttprepo,
35 'static-http': statichttprepo,
36 }
36 }
37
37
38 def _lookup(path):
38 def _lookup(path):
39 scheme = 'file'
39 scheme = 'file'
40 if path:
40 if path:
41 c = path.find(':')
41 c = path.find(':')
42 if c > 0:
42 if c > 0:
43 scheme = path[:c]
43 scheme = path[:c]
44 thing = schemes.get(scheme) or schemes['file']
44 thing = schemes.get(scheme) or schemes['file']
45 try:
45 try:
46 return thing(path)
46 return thing(path)
47 except TypeError:
47 except TypeError:
48 return thing
48 return thing
49
49
50 def islocal(repo):
50 def islocal(repo):
51 '''return true if repo or path is local'''
51 '''return true if repo or path is local'''
52 if isinstance(repo, str):
52 if isinstance(repo, str):
53 try:
53 try:
54 return _lookup(repo).islocal(repo)
54 return _lookup(repo).islocal(repo)
55 except AttributeError:
55 except AttributeError:
56 return False
56 return False
57 return repo.local()
57 return repo.local()
58
58
59 def repository(ui, path='', create=False):
59 def repository(ui, path='', create=False):
60 """return a repository object for the specified path"""
60 """return a repository object for the specified path"""
61 repo = _lookup(path).instance(ui, path, create)
61 repo = _lookup(path).instance(ui, path, create)
62 ui = getattr(repo, "ui", ui)
62 ui = getattr(repo, "ui", ui)
63 for name, module in extensions.extensions():
63 for name, module in extensions.extensions():
64 hook = getattr(module, 'reposetup', None)
64 hook = getattr(module, 'reposetup', None)
65 if hook:
65 if hook:
66 hook(ui, repo)
66 hook(ui, repo)
67 return repo
67 return repo
68
68
69 def defaultdest(source):
69 def defaultdest(source):
70 '''return default destination of clone if none is given'''
70 '''return default destination of clone if none is given'''
71 return os.path.basename(os.path.normpath(source))
71 return os.path.basename(os.path.normpath(source))
72
72
73 def localpath(path):
73 def localpath(path):
74 if path.startswith('file://localhost/'):
74 if path.startswith('file://localhost/'):
75 return path[16:]
75 return path[16:]
76 if path.startswith('file://'):
76 if path.startswith('file://'):
77 return path[7:]
77 return path[7:]
78 if path.startswith('file:'):
78 if path.startswith('file:'):
79 return path[5:]
79 return path[5:]
80 return path
80 return path
81
81
82 def clone(ui, source, dest=None, pull=False, rev=None, update=True,
82 def clone(ui, source, dest=None, pull=False, rev=None, update=True,
83 stream=False):
83 stream=False):
84 """Make a copy of an existing repository.
84 """Make a copy of an existing repository.
85
85
86 Create a copy of an existing repository in a new directory. The
86 Create a copy of an existing repository in a new directory. The
87 source and destination are URLs, as passed to the repository
87 source and destination are URLs, as passed to the repository
88 function. Returns a pair of repository objects, the source and
88 function. Returns a pair of repository objects, the source and
89 newly created destination.
89 newly created destination.
90
90
91 The location of the source is added to the new repository's
91 The location of the source is added to the new repository's
92 .hg/hgrc file, as the default to be used for future pulls and
92 .hg/hgrc file, as the default to be used for future pulls and
93 pushes.
93 pushes.
94
94
95 If an exception is raised, the partly cloned/updated destination
95 If an exception is raised, the partly cloned/updated destination
96 repository will be deleted.
96 repository will be deleted.
97
97
98 Arguments:
98 Arguments:
99
99
100 source: repository object or URL
100 source: repository object or URL
101
101
102 dest: URL of destination repository to create (defaults to base
102 dest: URL of destination repository to create (defaults to base
103 name of source repository)
103 name of source repository)
104
104
105 pull: always pull from source repository, even in local case
105 pull: always pull from source repository, even in local case
106
106
107 stream: stream raw data uncompressed from repository (fast over
107 stream: stream raw data uncompressed from repository (fast over
108 LAN, slow over WAN)
108 LAN, slow over WAN)
109
109
110 rev: revision to clone up to (implies pull=True)
110 rev: revision to clone up to (implies pull=True)
111
111
112 update: update working directory after clone completes, if
112 update: update working directory after clone completes, if
113 destination is local repository (True means update to default rev,
113 destination is local repository (True means update to default rev,
114 anything else is treated as a revision)
114 anything else is treated as a revision)
115 """
115 """
116
116
117 if isinstance(source, str):
117 if isinstance(source, str):
118 origsource = ui.expandpath(source)
118 origsource = ui.expandpath(source)
119 source, rev, checkout = parseurl(origsource, rev)
119 source, rev, checkout = parseurl(origsource, rev)
120 src_repo = repository(ui, source)
120 src_repo = repository(ui, source)
121 else:
121 else:
122 src_repo = source
122 src_repo = source
123 origsource = source = src_repo.url()
123 origsource = source = src_repo.url()
124 checkout = rev and rev[-1] or None
124 checkout = rev and rev[-1] or None
125
125
126 if dest is None:
126 if dest is None:
127 dest = defaultdest(source)
127 dest = defaultdest(source)
128 ui.status(_("destination directory: %s\n") % dest)
128 ui.status(_("destination directory: %s\n") % dest)
129
129
130 dest = localpath(dest)
130 dest = localpath(dest)
131 source = localpath(source)
131 source = localpath(source)
132
132
133 if os.path.exists(dest):
133 if os.path.exists(dest):
134 raise util.Abort(_("destination '%s' already exists") % dest)
134 raise util.Abort(_("destination '%s' already exists") % dest)
135
135
136 class DirCleanup(object):
136 class DirCleanup(object):
137 def __init__(self, dir_):
137 def __init__(self, dir_):
138 self.rmtree = shutil.rmtree
138 self.rmtree = shutil.rmtree
139 self.dir_ = dir_
139 self.dir_ = dir_
140 def close(self):
140 def close(self):
141 self.dir_ = None
141 self.dir_ = None
142 def __del__(self):
142 def __del__(self):
143 if self.dir_:
143 if self.dir_:
144 self.rmtree(self.dir_, True)
144 self.rmtree(self.dir_, True)
145
145
146 src_lock = dest_lock = dir_cleanup = None
146 src_lock = dest_lock = dir_cleanup = None
147 try:
147 try:
148 if islocal(dest):
148 if islocal(dest):
149 dir_cleanup = DirCleanup(dest)
149 dir_cleanup = DirCleanup(dest)
150
150
151 abspath = origsource
151 abspath = origsource
152 copy = False
152 copy = False
153 if src_repo.cancopy() and islocal(dest):
153 if src_repo.cancopy() and islocal(dest):
154 abspath = os.path.abspath(util.drop_scheme('file', origsource))
154 abspath = os.path.abspath(util.drop_scheme('file', origsource))
155 copy = not pull and not rev
155 copy = not pull and not rev
156
156
157 if copy:
157 if copy:
158 try:
158 try:
159 # we use a lock here because if we race with commit, we
159 # we use a lock here because if we race with commit, we
160 # can end up with extra data in the cloned revlogs that's
160 # can end up with extra data in the cloned revlogs that's
161 # not pointed to by changesets, thus causing verify to
161 # not pointed to by changesets, thus causing verify to
162 # fail
162 # fail
163 src_lock = src_repo.lock()
163 src_lock = src_repo.lock()
164 except error.LockError:
164 except error.LockError:
165 copy = False
165 copy = False
166
166
167 if copy:
167 if copy:
168 if not os.path.exists(dest):
168 if not os.path.exists(dest):
169 os.mkdir(dest)
169 os.mkdir(dest)
170 try:
170 try:
171 dest_path = os.path.realpath(os.path.join(dest, ".hg"))
171 dest_path = os.path.realpath(os.path.join(dest, ".hg"))
172 os.mkdir(dest_path)
172 os.mkdir(dest_path)
173 except OSError, inst:
173 except OSError, inst:
174 if inst.errno == errno.EEXIST:
174 if inst.errno == errno.EEXIST:
175 dir_cleanup.close()
175 dir_cleanup.close()
176 raise util.Abort(_("destination '%s' already exists")
176 raise util.Abort(_("destination '%s' already exists")
177 % dest)
177 % dest)
178 raise
178 raise
179
179
180 for f in src_repo.store.copylist():
180 for f in src_repo.store.copylist():
181 src = os.path.join(src_repo.path, f)
181 src = os.path.join(src_repo.path, f)
182 dst = os.path.join(dest_path, f)
182 dst = os.path.join(dest_path, f)
183 dstbase = os.path.dirname(dst)
183 dstbase = os.path.dirname(dst)
184 if dstbase and not os.path.exists(dstbase):
184 if dstbase and not os.path.exists(dstbase):
185 os.mkdir(dstbase)
185 os.mkdir(dstbase)
186 if os.path.exists(src):
186 if os.path.exists(src):
187 if dst.endswith('data'):
187 if dst.endswith('data'):
188 # lock to avoid premature writing to the target
188 # lock to avoid premature writing to the target
189 dest_lock = lock.lock(os.path.join(dstbase, "lock"))
189 dest_lock = lock.lock(os.path.join(dstbase, "lock"))
190 util.copyfiles(src, dst)
190 util.copyfiles(src, dst)
191
191
192 # we need to re-init the repo after manually copying the data
192 # we need to re-init the repo after manually copying the data
193 # into it
193 # into it
194 dest_repo = repository(ui, dest)
194 dest_repo = repository(ui, dest)
195
195
196 else:
196 else:
197 try:
197 try:
198 dest_repo = repository(ui, dest, create=True)
198 dest_repo = repository(ui, dest, create=True)
199 except OSError, inst:
199 except OSError, inst:
200 if inst.errno == errno.EEXIST:
200 if inst.errno == errno.EEXIST:
201 dir_cleanup.close()
201 dir_cleanup.close()
202 raise util.Abort(_("destination '%s' already exists")
202 raise util.Abort(_("destination '%s' already exists")
203 % dest)
203 % dest)
204 raise
204 raise
205
205
206 revs = None
206 revs = None
207 if rev:
207 if rev:
208 if 'lookup' not in src_repo.capabilities:
208 if 'lookup' not in src_repo.capabilities:
209 raise util.Abort(_("src repository does not support revision "
209 raise util.Abort(_("src repository does not support revision "
210 "lookup and so doesn't support clone by "
210 "lookup and so doesn't support clone by "
211 "revision"))
211 "revision"))
212 revs = [src_repo.lookup(r) for r in rev]
212 revs = [src_repo.lookup(r) for r in rev]
213
213
214 if dest_repo.local():
214 if dest_repo.local():
215 dest_repo.clone(src_repo, heads=revs, stream=stream)
215 dest_repo.clone(src_repo, heads=revs, stream=stream)
216 elif src_repo.local():
216 elif src_repo.local():
217 src_repo.push(dest_repo, revs=revs)
217 src_repo.push(dest_repo, revs=revs)
218 else:
218 else:
219 raise util.Abort(_("clone from remote to remote not supported"))
219 raise util.Abort(_("clone from remote to remote not supported"))
220
220
221 if dir_cleanup:
221 if dir_cleanup:
222 dir_cleanup.close()
222 dir_cleanup.close()
223
223
224 if dest_repo.local():
224 if dest_repo.local():
225 fp = dest_repo.opener("hgrc", "w", text=True)
225 fp = dest_repo.opener("hgrc", "w", text=True)
226 fp.write("[paths]\n")
226 fp.write("[paths]\n")
227 # percent needs to be escaped for ConfigParser
227 # percent needs to be escaped for ConfigParser
228 fp.write("default = %s\n" % abspath.replace('%', '%%'))
228 fp.write("default = %s\n" % abspath.replace('%', '%%'))
229 fp.close()
229 fp.close()
230
230
231 if update:
231 if update:
232 dest_repo.ui.status(_("updating working directory\n"))
232 dest_repo.ui.status(_("updating working directory\n"))
233 if update is not True:
233 if update is not True:
234 checkout = update
234 checkout = update
235 for test in (checkout, 'default', 'tip'):
235 for test in (checkout, 'default', 'tip'):
236 try:
236 try:
237 uprev = dest_repo.lookup(test)
237 uprev = dest_repo.lookup(test)
238 break
238 break
239 except:
239 except:
240 continue
240 continue
241 _update(dest_repo, uprev)
241 _update(dest_repo, uprev)
242
242
243 return src_repo, dest_repo
243 return src_repo, dest_repo
244 finally:
244 finally:
245 del src_lock, dest_lock, dir_cleanup
245 del src_lock, dest_lock, dir_cleanup
246
246
247 def _showstats(repo, stats):
247 def _showstats(repo, stats):
248 stats = ((stats[0], _("updated")),
248 stats = ((stats[0], _("updated")),
249 (stats[1], _("merged")),
249 (stats[1], _("merged")),
250 (stats[2], _("removed")),
250 (stats[2], _("removed")),
251 (stats[3], _("unresolved")))
251 (stats[3], _("unresolved")))
252 note = ", ".join([_("%d files %s") % s for s in stats])
252 note = ", ".join([_("%d files %s") % s for s in stats])
253 repo.ui.status("%s\n" % note)
253 repo.ui.status("%s\n" % note)
254
254
255 def update(repo, node):
255 def update(repo, node):
256 """update the working directory to node, merging linear changes"""
256 """update the working directory to node, merging linear changes"""
257 stats = _merge.update(repo, node, False, False, None)
257 stats = _merge.update(repo, node, False, False, None)
258 _showstats(repo, stats)
258 _showstats(repo, stats)
259 if stats[3]:
259 if stats[3]:
260 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n"))
260 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n"))
261 return stats[3] > 0
261 return stats[3] > 0
262
262
263 # naming conflict in clone()
263 # naming conflict in clone()
264 _update = update
264 _update = update
265
265
266 def clean(repo, node, show_stats=True):
266 def clean(repo, node, show_stats=True):
267 """forcibly switch the working directory to node, clobbering changes"""
267 """forcibly switch the working directory to node, clobbering changes"""
268 stats = _merge.update(repo, node, False, True, None)
268 stats = _merge.update(repo, node, False, True, None)
269 if show_stats: _showstats(repo, stats)
269 if show_stats: _showstats(repo, stats)
270 return stats[3] > 0
270 return stats[3] > 0
271
271
272 def merge(repo, node, force=None, remind=True):
272 def merge(repo, node, force=None, remind=True):
273 """branch merge with node, resolving changes"""
273 """branch merge with node, resolving changes"""
274 stats = _merge.update(repo, node, True, force, False)
274 stats = _merge.update(repo, node, True, force, False)
275 _showstats(repo, stats)
275 _showstats(repo, stats)
276 if stats[3]:
276 if stats[3]:
277 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n"))
277 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
278 "or 'hg up --clean' to abandon\n"))
278 elif remind:
279 elif remind:
279 repo.ui.status(_("(branch merge, don't forget to commit)\n"))
280 repo.ui.status(_("(branch merge, don't forget to commit)\n"))
280 return stats[3] > 0
281 return stats[3] > 0
281
282
282 def revert(repo, node, choose):
283 def revert(repo, node, choose):
283 """revert changes to revision in node without updating dirstate"""
284 """revert changes to revision in node without updating dirstate"""
284 return _merge.update(repo, node, False, True, choose)[3] > 0
285 return _merge.update(repo, node, False, True, choose)[3] > 0
285
286
286 def verify(repo):
287 def verify(repo):
287 """verify the consistency of a repository"""
288 """verify the consistency of a repository"""
288 return _verify.verify(repo)
289 return _verify.verify(repo)
@@ -1,37 +1,37 b''
1 adding a
1 adding a
2 ? a
2 ? a
3 adding a
3 adding a
4 A a
4 A a
5 A a
5 A a
6 ? b
6 ? b
7 A a
7 A a
8 A b
8 A b
9 % should fail
9 % should fail
10 b already tracked!
10 b already tracked!
11 A a
11 A a
12 A b
12 A b
13 % should fail
13 % should fail
14 a already tracked!
14 a already tracked!
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 created new head
16 created new head
17 merging a
17 merging a
18 warning: conflicts during merge.
18 warning: conflicts during merge.
19 merging a failed!
19 merging a failed!
20 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
20 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
21 use 'hg resolve' to retry unresolved file merges
21 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
22 M a
22 M a
23 ? a.orig
23 ? a.orig
24 % should fail
24 % should fail
25 a already tracked!
25 a already tracked!
26 M a
26 M a
27 ? a.orig
27 ? a.orig
28 % issue683
28 % issue683
29 R a
29 R a
30 ? a.orig
30 ? a.orig
31 M a
31 M a
32 ? a.orig
32 ? a.orig
33 c does not exist!
33 c does not exist!
34 d does not exist!
34 d does not exist!
35 M a
35 M a
36 A c
36 A c
37 ? a.orig
37 ? a.orig
@@ -1,14 +1,14 b''
1 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
2 created new head
2 created new head
3
3
4 % Merging a conflict araises
4 % Merging a conflict araises
5 merging A
5 merging A
6 warning: conflicts during merge.
6 warning: conflicts during merge.
7 merging A failed!
7 merging A failed!
8 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
8 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
9 use 'hg resolve' to retry unresolved file merges
9 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
10
10
11 % Correct the conflict without marking the file as resolved
11 % Correct the conflict without marking the file as resolved
12 abort: unresolved merge conflicts (see hg resolve)
12 abort: unresolved merge conflicts (see hg resolve)
13
13
14 % Mark the conflict as resolved and commit
14 % Mark the conflict as resolved and commit
@@ -1,15 +1,15 b''
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 created new head
2 created new head
3 merging a
3 merging a
4 warning: conflicts during merge.
4 warning: conflicts during merge.
5 merging a failed!
5 merging a failed!
6 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
6 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
7 use 'hg resolve' to retry unresolved file merges
7 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
8 e7fe8eb3e180+0d24b7662d3e+ tip
8 e7fe8eb3e180+0d24b7662d3e+ tip
9 <<<<<<< local
9 <<<<<<< local
10 something else
10 something else
11 =======
11 =======
12 something
12 something
13 >>>>>>> other
13 >>>>>>> other
14 M a
14 M a
15 ? a.orig
15 ? a.orig
@@ -1,337 +1,337 b''
1 % add
1 % add
2 adding a
2 adding a
3 adding d1/d2/b
3 adding d1/d2/b
4 % modify
4 % modify
5 1:e0e2b8a9156b
5 1:e0e2b8a9156b
6 assuming destination a-hg
6 assuming destination a-hg
7 initializing svn repo 'a-hg'
7 initializing svn repo 'a-hg'
8 initializing svn wc 'a-hg-wc'
8 initializing svn wc 'a-hg-wc'
9 scanning source...
9 scanning source...
10 sorting...
10 sorting...
11 converting...
11 converting...
12 1 add a file
12 1 add a file
13 0 modify a file
13 0 modify a file
14 At revision 2.
14 At revision 2.
15 2 2 test .
15 2 2 test .
16 2 2 test a
16 2 2 test a
17 2 1 test d1
17 2 1 test d1
18 2 1 test d1/d2
18 2 1 test d1/d2
19 2 1 test d1/d2/b
19 2 1 test d1/d2/b
20 <?xml version="1.0"?>
20 <?xml version="1.0"?>
21 <log>
21 <log>
22 <logentry
22 <logentry
23 revision="2">
23 revision="2">
24 <author>test</author>
24 <author>test</author>
25 <date/>
25 <date/>
26 <paths>
26 <paths>
27 <path
27 <path
28 action="M">/a</path>
28 action="M">/a</path>
29 </paths>
29 </paths>
30 <msg>modify a file</msg>
30 <msg>modify a file</msg>
31 </logentry>
31 </logentry>
32 <logentry
32 <logentry
33 revision="1">
33 revision="1">
34 <author>test</author>
34 <author>test</author>
35 <date/>
35 <date/>
36 <paths>
36 <paths>
37 <path
37 <path
38 action="A">/a</path>
38 action="A">/a</path>
39 <path
39 <path
40 action="A">/d1</path>
40 action="A">/d1</path>
41 <path
41 <path
42 action="A">/d1/d2</path>
42 action="A">/d1/d2</path>
43 <path
43 <path
44 action="A">/d1/d2/b</path>
44 action="A">/d1/d2/b</path>
45 </paths>
45 </paths>
46 <msg>add a file</msg>
46 <msg>add a file</msg>
47 </logentry>
47 </logentry>
48 </log>
48 </log>
49 a:
49 a:
50 a
50 a
51 d1
51 d1
52
52
53 a-hg-wc:
53 a-hg-wc:
54 a
54 a
55 d1
55 d1
56 same
56 same
57 % rename
57 % rename
58 2:7009fc4efb34
58 2:7009fc4efb34
59 assuming destination a-hg
59 assuming destination a-hg
60 initializing svn wc 'a-hg-wc'
60 initializing svn wc 'a-hg-wc'
61 scanning source...
61 scanning source...
62 sorting...
62 sorting...
63 converting...
63 converting...
64 0 rename a file
64 0 rename a file
65 At revision 3.
65 At revision 3.
66 3 3 test .
66 3 3 test .
67 3 3 test b
67 3 3 test b
68 3 1 test d1
68 3 1 test d1
69 3 1 test d1/d2
69 3 1 test d1/d2
70 3 1 test d1/d2/b
70 3 1 test d1/d2/b
71 <?xml version="1.0"?>
71 <?xml version="1.0"?>
72 <log>
72 <log>
73 <logentry
73 <logentry
74 revision="3">
74 revision="3">
75 <author>test</author>
75 <author>test</author>
76 <date/>
76 <date/>
77 <paths>
77 <paths>
78 <path
78 <path
79 action="D">/a</path>
79 action="D">/a</path>
80 <path
80 <path
81 copyfrom-path="/a"
81 copyfrom-path="/a"
82 copyfrom-rev="2"
82 copyfrom-rev="2"
83 action="A">/b</path>
83 action="A">/b</path>
84 </paths>
84 </paths>
85 <msg>rename a file</msg>
85 <msg>rename a file</msg>
86 </logentry>
86 </logentry>
87 </log>
87 </log>
88 a:
88 a:
89 b
89 b
90 d1
90 d1
91
91
92 a-hg-wc:
92 a-hg-wc:
93 b
93 b
94 d1
94 d1
95 % copy
95 % copy
96 3:56c519973ce6
96 3:56c519973ce6
97 assuming destination a-hg
97 assuming destination a-hg
98 initializing svn wc 'a-hg-wc'
98 initializing svn wc 'a-hg-wc'
99 scanning source...
99 scanning source...
100 sorting...
100 sorting...
101 converting...
101 converting...
102 0 copy a file
102 0 copy a file
103 At revision 4.
103 At revision 4.
104 4 4 test .
104 4 4 test .
105 4 3 test b
105 4 3 test b
106 4 4 test c
106 4 4 test c
107 4 1 test d1
107 4 1 test d1
108 4 1 test d1/d2
108 4 1 test d1/d2
109 4 1 test d1/d2/b
109 4 1 test d1/d2/b
110 <?xml version="1.0"?>
110 <?xml version="1.0"?>
111 <log>
111 <log>
112 <logentry
112 <logentry
113 revision="4">
113 revision="4">
114 <author>test</author>
114 <author>test</author>
115 <date/>
115 <date/>
116 <paths>
116 <paths>
117 <path
117 <path
118 copyfrom-path="/b"
118 copyfrom-path="/b"
119 copyfrom-rev="3"
119 copyfrom-rev="3"
120 action="A">/c</path>
120 action="A">/c</path>
121 </paths>
121 </paths>
122 <msg>copy a file</msg>
122 <msg>copy a file</msg>
123 </logentry>
123 </logentry>
124 </log>
124 </log>
125 a:
125 a:
126 b
126 b
127 c
127 c
128 d1
128 d1
129
129
130 a-hg-wc:
130 a-hg-wc:
131 b
131 b
132 c
132 c
133 d1
133 d1
134 % remove
134 % remove
135 4:ed4dc9a6f585
135 4:ed4dc9a6f585
136 assuming destination a-hg
136 assuming destination a-hg
137 initializing svn wc 'a-hg-wc'
137 initializing svn wc 'a-hg-wc'
138 scanning source...
138 scanning source...
139 sorting...
139 sorting...
140 converting...
140 converting...
141 0 remove a file
141 0 remove a file
142 At revision 5.
142 At revision 5.
143 5 5 test .
143 5 5 test .
144 5 4 test c
144 5 4 test c
145 5 1 test d1
145 5 1 test d1
146 5 1 test d1/d2
146 5 1 test d1/d2
147 5 1 test d1/d2/b
147 5 1 test d1/d2/b
148 <?xml version="1.0"?>
148 <?xml version="1.0"?>
149 <log>
149 <log>
150 <logentry
150 <logentry
151 revision="5">
151 revision="5">
152 <author>test</author>
152 <author>test</author>
153 <date/>
153 <date/>
154 <paths>
154 <paths>
155 <path
155 <path
156 action="D">/b</path>
156 action="D">/b</path>
157 </paths>
157 </paths>
158 <msg>remove a file</msg>
158 <msg>remove a file</msg>
159 </logentry>
159 </logentry>
160 </log>
160 </log>
161 a:
161 a:
162 c
162 c
163 d1
163 d1
164
164
165 a-hg-wc:
165 a-hg-wc:
166 c
166 c
167 d1
167 d1
168 % executable
168 % executable
169 5:f205b3636d77
169 5:f205b3636d77
170 assuming destination a-hg
170 assuming destination a-hg
171 initializing svn wc 'a-hg-wc'
171 initializing svn wc 'a-hg-wc'
172 scanning source...
172 scanning source...
173 sorting...
173 sorting...
174 converting...
174 converting...
175 0 make a file executable
175 0 make a file executable
176 At revision 6.
176 At revision 6.
177 6 6 test .
177 6 6 test .
178 6 6 test c
178 6 6 test c
179 6 1 test d1
179 6 1 test d1
180 6 1 test d1/d2
180 6 1 test d1/d2
181 6 1 test d1/d2/b
181 6 1 test d1/d2/b
182 <?xml version="1.0"?>
182 <?xml version="1.0"?>
183 <log>
183 <log>
184 <logentry
184 <logentry
185 revision="6">
185 revision="6">
186 <author>test</author>
186 <author>test</author>
187 <date/>
187 <date/>
188 <paths>
188 <paths>
189 <path
189 <path
190 action="M">/c</path>
190 action="M">/c</path>
191 </paths>
191 </paths>
192 <msg>make a file executable</msg>
192 <msg>make a file executable</msg>
193 </logentry>
193 </logentry>
194 </log>
194 </log>
195 executable
195 executable
196 % executable in new directory
196 % executable in new directory
197 adding d1/a
197 adding d1/a
198 assuming destination a-hg
198 assuming destination a-hg
199 initializing svn repo 'a-hg'
199 initializing svn repo 'a-hg'
200 initializing svn wc 'a-hg-wc'
200 initializing svn wc 'a-hg-wc'
201 scanning source...
201 scanning source...
202 sorting...
202 sorting...
203 converting...
203 converting...
204 0 add executable file in new directory
204 0 add executable file in new directory
205 At revision 1.
205 At revision 1.
206 1 1 test .
206 1 1 test .
207 1 1 test d1
207 1 1 test d1
208 1 1 test d1/a
208 1 1 test d1/a
209 <?xml version="1.0"?>
209 <?xml version="1.0"?>
210 <log>
210 <log>
211 <logentry
211 <logentry
212 revision="1">
212 revision="1">
213 <author>test</author>
213 <author>test</author>
214 <date/>
214 <date/>
215 <paths>
215 <paths>
216 <path
216 <path
217 action="A">/d1</path>
217 action="A">/d1</path>
218 <path
218 <path
219 action="A">/d1/a</path>
219 action="A">/d1/a</path>
220 </paths>
220 </paths>
221 <msg>add executable file in new directory</msg>
221 <msg>add executable file in new directory</msg>
222 </logentry>
222 </logentry>
223 </log>
223 </log>
224 executable
224 executable
225 % copy to new directory
225 % copy to new directory
226 assuming destination a-hg
226 assuming destination a-hg
227 initializing svn wc 'a-hg-wc'
227 initializing svn wc 'a-hg-wc'
228 scanning source...
228 scanning source...
229 sorting...
229 sorting...
230 converting...
230 converting...
231 0 copy file to new directory
231 0 copy file to new directory
232 At revision 2.
232 At revision 2.
233 2 2 test .
233 2 2 test .
234 2 1 test d1
234 2 1 test d1
235 2 1 test d1/a
235 2 1 test d1/a
236 2 2 test d2
236 2 2 test d2
237 2 2 test d2/a
237 2 2 test d2/a
238 <?xml version="1.0"?>
238 <?xml version="1.0"?>
239 <log>
239 <log>
240 <logentry
240 <logentry
241 revision="2">
241 revision="2">
242 <author>test</author>
242 <author>test</author>
243 <date/>
243 <date/>
244 <paths>
244 <paths>
245 <path
245 <path
246 action="A">/d2</path>
246 action="A">/d2</path>
247 <path
247 <path
248 copyfrom-path="/d1/a"
248 copyfrom-path="/d1/a"
249 copyfrom-rev="1"
249 copyfrom-rev="1"
250 action="A">/d2/a</path>
250 action="A">/d2/a</path>
251 </paths>
251 </paths>
252 <msg>copy file to new directory</msg>
252 <msg>copy file to new directory</msg>
253 </logentry>
253 </logentry>
254 </log>
254 </log>
255 % branchy history
255 % branchy history
256 adding b
256 adding b
257 adding left-1
257 adding left-1
258 adding left-2
258 adding left-2
259 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
259 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
260 adding right-1
260 adding right-1
261 created new head
261 created new head
262 adding right-2
262 adding right-2
263 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
263 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
264 merging b
264 merging b
265 warning: conflicts during merge.
265 warning: conflicts during merge.
266 merging b failed!
266 merging b failed!
267 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
267 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
268 use 'hg resolve' to retry unresolved file merges
268 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
269 assuming destination b-hg
269 assuming destination b-hg
270 initializing svn repo 'b-hg'
270 initializing svn repo 'b-hg'
271 initializing svn wc 'b-hg-wc'
271 initializing svn wc 'b-hg-wc'
272 scanning source...
272 scanning source...
273 sorting...
273 sorting...
274 converting...
274 converting...
275 5 base
275 5 base
276 4 left-1
276 4 left-1
277 3 left-2
277 3 left-2
278 2 right-1
278 2 right-1
279 1 right-2
279 1 right-2
280 0 merge
280 0 merge
281 % expect 4 changes
281 % expect 4 changes
282 At revision 4.
282 At revision 4.
283 4 4 test .
283 4 4 test .
284 4 3 test b
284 4 3 test b
285 4 2 test left-1
285 4 2 test left-1
286 4 3 test left-2
286 4 3 test left-2
287 4 4 test right-1
287 4 4 test right-1
288 4 4 test right-2
288 4 4 test right-2
289 <?xml version="1.0"?>
289 <?xml version="1.0"?>
290 <log>
290 <log>
291 <logentry
291 <logentry
292 revision="4">
292 revision="4">
293 <author>test</author>
293 <author>test</author>
294 <date/>
294 <date/>
295 <paths>
295 <paths>
296 <path
296 <path
297 action="A">/right-1</path>
297 action="A">/right-1</path>
298 <path
298 <path
299 action="A">/right-2</path>
299 action="A">/right-2</path>
300 </paths>
300 </paths>
301 <msg>merge</msg>
301 <msg>merge</msg>
302 </logentry>
302 </logentry>
303 <logentry
303 <logentry
304 revision="3">
304 revision="3">
305 <author>test</author>
305 <author>test</author>
306 <date/>
306 <date/>
307 <paths>
307 <paths>
308 <path
308 <path
309 action="M">/b</path>
309 action="M">/b</path>
310 <path
310 <path
311 action="A">/left-2</path>
311 action="A">/left-2</path>
312 </paths>
312 </paths>
313 <msg>left-2</msg>
313 <msg>left-2</msg>
314 </logentry>
314 </logentry>
315 <logentry
315 <logentry
316 revision="2">
316 revision="2">
317 <author>test</author>
317 <author>test</author>
318 <date/>
318 <date/>
319 <paths>
319 <paths>
320 <path
320 <path
321 action="M">/b</path>
321 action="M">/b</path>
322 <path
322 <path
323 action="A">/left-1</path>
323 action="A">/left-1</path>
324 </paths>
324 </paths>
325 <msg>left-1</msg>
325 <msg>left-1</msg>
326 </logentry>
326 </logentry>
327 <logentry
327 <logentry
328 revision="1">
328 revision="1">
329 <author>test</author>
329 <author>test</author>
330 <date/>
330 <date/>
331 <paths>
331 <paths>
332 <path
332 <path
333 action="A">/b</path>
333 action="A">/b</path>
334 </paths>
334 </paths>
335 <msg>base</msg>
335 <msg>base</msg>
336 </logentry>
336 </logentry>
337 </log>
337 </log>
@@ -1,502 +1,502 b''
1 % help
1 % help
2 keyword extension - keyword expansion in local repositories
2 keyword extension - keyword expansion in local repositories
3
3
4 This extension expands RCS/CVS-like or self-customized $Keywords$
4 This extension expands RCS/CVS-like or self-customized $Keywords$
5 in tracked text files selected by your configuration.
5 in tracked text files selected by your configuration.
6
6
7 Keywords are only expanded in local repositories and not stored in
7 Keywords are only expanded in local repositories and not stored in
8 the change history. The mechanism can be regarded as a convenience
8 the change history. The mechanism can be regarded as a convenience
9 for the current user or for archive distribution.
9 for the current user or for archive distribution.
10
10
11 Configuration is done in the [keyword] and [keywordmaps] sections
11 Configuration is done in the [keyword] and [keywordmaps] sections
12 of hgrc files.
12 of hgrc files.
13
13
14 Example:
14 Example:
15
15
16 [keyword]
16 [keyword]
17 # expand keywords in every python file except those matching "x*"
17 # expand keywords in every python file except those matching "x*"
18 **.py =
18 **.py =
19 x* = ignore
19 x* = ignore
20
20
21 Note: the more specific you are in your filename patterns
21 Note: the more specific you are in your filename patterns
22 the less you lose speed in huge repos.
22 the less you lose speed in huge repos.
23
23
24 For [keywordmaps] template mapping and expansion demonstration and
24 For [keywordmaps] template mapping and expansion demonstration and
25 control run "hg kwdemo".
25 control run "hg kwdemo".
26
26
27 An additional date template filter {date|utcdate} is provided.
27 An additional date template filter {date|utcdate} is provided.
28
28
29 The default template mappings (view with "hg kwdemo -d") can be replaced
29 The default template mappings (view with "hg kwdemo -d") can be replaced
30 with customized keywords and templates.
30 with customized keywords and templates.
31 Again, run "hg kwdemo" to control the results of your config changes.
31 Again, run "hg kwdemo" to control the results of your config changes.
32
32
33 Before changing/disabling active keywords, run "hg kwshrink" to avoid
33 Before changing/disabling active keywords, run "hg kwshrink" to avoid
34 the risk of inadvertedly storing expanded keywords in the change history.
34 the risk of inadvertedly storing expanded keywords in the change history.
35
35
36 To force expansion after enabling it, or a configuration change, run
36 To force expansion after enabling it, or a configuration change, run
37 "hg kwexpand".
37 "hg kwexpand".
38
38
39 Also, when committing with the record extension or using mq's qrecord, be aware
39 Also, when committing with the record extension or using mq's qrecord, be aware
40 that keywords cannot be updated. Again, run "hg kwexpand" on the files in
40 that keywords cannot be updated. Again, run "hg kwexpand" on the files in
41 question to update keyword expansions after all changes have been checked in.
41 question to update keyword expansions after all changes have been checked in.
42
42
43 Expansions spanning more than one line and incremental expansions,
43 Expansions spanning more than one line and incremental expansions,
44 like CVS' $Log$, are not supported. A keyword template map
44 like CVS' $Log$, are not supported. A keyword template map
45 "Log = {desc}" expands to the first line of the changeset description.
45 "Log = {desc}" expands to the first line of the changeset description.
46
46
47 list of commands:
47 list of commands:
48
48
49 kwdemo print [keywordmaps] configuration and an expansion example
49 kwdemo print [keywordmaps] configuration and an expansion example
50 kwexpand expand keywords in working directory
50 kwexpand expand keywords in working directory
51 kwfiles print files currently configured for keyword expansion
51 kwfiles print files currently configured for keyword expansion
52 kwshrink revert expanded keywords in working directory
52 kwshrink revert expanded keywords in working directory
53
53
54 enabled extensions:
54 enabled extensions:
55
55
56 keyword keyword expansion in local repositories
56 keyword keyword expansion in local repositories
57 mq patch management and development
57 mq patch management and development
58 notify hook extension to email notifications on commits/pushes
58 notify hook extension to email notifications on commits/pushes
59
59
60 use "hg -v help keyword" to show aliases and global options
60 use "hg -v help keyword" to show aliases and global options
61 % hg kwdemo
61 % hg kwdemo
62 [extensions]
62 [extensions]
63 hgext.keyword =
63 hgext.keyword =
64 [keyword]
64 [keyword]
65 * =
65 * =
66 b = ignore
66 b = ignore
67 demo.txt =
67 demo.txt =
68 [keywordmaps]
68 [keywordmaps]
69 RCSFile = {file|basename},v
69 RCSFile = {file|basename},v
70 Author = {author|user}
70 Author = {author|user}
71 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
71 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
72 Source = {root}/{file},v
72 Source = {root}/{file},v
73 Date = {date|utcdate}
73 Date = {date|utcdate}
74 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
74 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
75 Revision = {node|short}
75 Revision = {node|short}
76 $RCSFile: demo.txt,v $
76 $RCSFile: demo.txt,v $
77 $Author: test $
77 $Author: test $
78 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
78 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
79 $Source: /TMP/demo.txt,v $
79 $Source: /TMP/demo.txt,v $
80 $Date: 2000/00/00 00:00:00 $
80 $Date: 2000/00/00 00:00:00 $
81 $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
81 $Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
82 $Revision: xxxxxxxxxxxx $
82 $Revision: xxxxxxxxxxxx $
83 [extensions]
83 [extensions]
84 hgext.keyword =
84 hgext.keyword =
85 [keyword]
85 [keyword]
86 * =
86 * =
87 b = ignore
87 b = ignore
88 demo.txt =
88 demo.txt =
89 [keywordmaps]
89 [keywordmaps]
90 Branch = {branches}
90 Branch = {branches}
91 $Branch: demobranch $
91 $Branch: demobranch $
92 % kwshrink should exit silently in empty/invalid repo
92 % kwshrink should exit silently in empty/invalid repo
93 pulling from test-keyword.hg
93 pulling from test-keyword.hg
94 requesting all changes
94 requesting all changes
95 adding changesets
95 adding changesets
96 adding manifests
96 adding manifests
97 adding file changes
97 adding file changes
98 added 1 changesets with 1 changes to 1 files
98 added 1 changesets with 1 changes to 1 files
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 % cat
100 % cat
101 expand $Id$
101 expand $Id$
102 do not process $Id:
102 do not process $Id:
103 xxx $
103 xxx $
104 ignore $Id$
104 ignore $Id$
105 % addremove
105 % addremove
106 adding a
106 adding a
107 adding b
107 adding b
108 % status
108 % status
109 A a
109 A a
110 A b
110 A b
111 % default keyword expansion including commit hook
111 % default keyword expansion including commit hook
112 % interrupted commit should not change state or run commit hook
112 % interrupted commit should not change state or run commit hook
113 a
113 a
114 b
114 b
115 transaction abort!
115 transaction abort!
116 rollback completed
116 rollback completed
117 abort: empty commit message
117 abort: empty commit message
118 % status
118 % status
119 A a
119 A a
120 A b
120 A b
121 % commit
121 % commit
122 a
122 a
123 b
123 b
124 overwriting a expanding keywords
124 overwriting a expanding keywords
125 running hook commit.test: cp a hooktest
125 running hook commit.test: cp a hooktest
126 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
126 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
127 % status
127 % status
128 ? hooktest
128 ? hooktest
129 % identify
129 % identify
130 ef63ca68695b
130 ef63ca68695b
131 % cat
131 % cat
132 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
132 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
133 do not process $Id:
133 do not process $Id:
134 xxx $
134 xxx $
135 ignore $Id$
135 ignore $Id$
136 % hg cat
136 % hg cat
137 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
137 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
138 do not process $Id:
138 do not process $Id:
139 xxx $
139 xxx $
140 ignore $Id$
140 ignore $Id$
141 a
141 a
142 % diff a hooktest
142 % diff a hooktest
143 % removing commit hook from config
143 % removing commit hook from config
144 % bundle
144 % bundle
145 2 changesets found
145 2 changesets found
146 % notify on pull to check whether keywords stay as is in email
146 % notify on pull to check whether keywords stay as is in email
147 % ie. if patch.diff wrapper acts as it should
147 % ie. if patch.diff wrapper acts as it should
148 % pull from bundle
148 % pull from bundle
149 pulling from ../kw.hg
149 pulling from ../kw.hg
150 requesting all changes
150 requesting all changes
151 adding changesets
151 adding changesets
152 adding manifests
152 adding manifests
153 adding file changes
153 adding file changes
154 added 2 changesets with 3 changes to 3 files
154 added 2 changesets with 3 changes to 3 files
155
155
156 diff -r 000000000000 -r a2392c293916 sym
156 diff -r 000000000000 -r a2392c293916 sym
157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
157 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
158 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
158 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
159 @@ -0,0 +1,1 @@
159 @@ -0,0 +1,1 @@
160 +a
160 +a
161 \ No newline at end of file
161 \ No newline at end of file
162
162
163 diff -r a2392c293916 -r ef63ca68695b a
163 diff -r a2392c293916 -r ef63ca68695b a
164 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
164 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
165 +++ b/a Thu Jan 01 00:00:00 1970 +0000
165 +++ b/a Thu Jan 01 00:00:00 1970 +0000
166 @@ -0,0 +1,3 @@
166 @@ -0,0 +1,3 @@
167 +expand $Id$
167 +expand $Id$
168 +do not process $Id:
168 +do not process $Id:
169 +xxx $
169 +xxx $
170 diff -r a2392c293916 -r ef63ca68695b b
170 diff -r a2392c293916 -r ef63ca68695b b
171 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
171 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
172 +++ b/b Thu Jan 01 00:00:00 1970 +0000
172 +++ b/b Thu Jan 01 00:00:00 1970 +0000
173 @@ -0,0 +1,1 @@
173 @@ -0,0 +1,1 @@
174 +ignore $Id$
174 +ignore $Id$
175 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 % remove notify config
176 % remove notify config
177 % touch
177 % touch
178 % status
178 % status
179 % update
179 % update
180 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
180 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 % cat
181 % cat
182 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
182 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
183 do not process $Id:
183 do not process $Id:
184 xxx $
184 xxx $
185 ignore $Id$
185 ignore $Id$
186 % check whether expansion is filewise
186 % check whether expansion is filewise
187 % commit c
187 % commit c
188 adding c
188 adding c
189 % force expansion
189 % force expansion
190 overwriting a expanding keywords
190 overwriting a expanding keywords
191 overwriting c expanding keywords
191 overwriting c expanding keywords
192 % compare changenodes in a c
192 % compare changenodes in a c
193 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
193 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
194 do not process $Id:
194 do not process $Id:
195 xxx $
195 xxx $
196 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
196 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
197 tests for different changenodes
197 tests for different changenodes
198 % qinit -c
198 % qinit -c
199 % qimport
199 % qimport
200 % qcommit
200 % qcommit
201 % keywords should not be expanded in patch
201 % keywords should not be expanded in patch
202 # HG changeset patch
202 # HG changeset patch
203 # User User Name <user@example.com>
203 # User User Name <user@example.com>
204 # Date 1 0
204 # Date 1 0
205 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
205 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
206 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
206 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
207 cndiff
207 cndiff
208
208
209 diff -r ef63ca68695b -r 40a904bbbe4c c
209 diff -r ef63ca68695b -r 40a904bbbe4c c
210 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
210 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
211 +++ b/c Thu Jan 01 00:00:01 1970 +0000
211 +++ b/c Thu Jan 01 00:00:01 1970 +0000
212 @@ -0,0 +1,2 @@
212 @@ -0,0 +1,2 @@
213 +$Id$
213 +$Id$
214 +tests for different changenodes
214 +tests for different changenodes
215 % qpop
215 % qpop
216 patch queue now empty
216 patch queue now empty
217 % qgoto - should imply qpush
217 % qgoto - should imply qpush
218 applying mqtest.diff
218 applying mqtest.diff
219 now at: mqtest.diff
219 now at: mqtest.diff
220 % cat
220 % cat
221 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
221 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
222 tests for different changenodes
222 tests for different changenodes
223 % qpop and move on
223 % qpop and move on
224 patch queue now empty
224 patch queue now empty
225 % copy
225 % copy
226 % kwfiles added
226 % kwfiles added
227 a
227 a
228 c
228 c
229 % commit
229 % commit
230 c
230 c
231 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
231 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
232 overwriting c expanding keywords
232 overwriting c expanding keywords
233 committed changeset 2:e22d299ac0c2bd8897b3df5114374b9e4d4ca62f
233 committed changeset 2:e22d299ac0c2bd8897b3df5114374b9e4d4ca62f
234 % cat a c
234 % cat a c
235 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
235 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
236 do not process $Id:
236 do not process $Id:
237 xxx $
237 xxx $
238 expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $
238 expand $Id: c,v e22d299ac0c2 1970/01/01 00:00:01 user $
239 do not process $Id:
239 do not process $Id:
240 xxx $
240 xxx $
241 % touch copied c
241 % touch copied c
242 % status
242 % status
243 % kwfiles
243 % kwfiles
244 a
244 a
245 c
245 c
246 % diff --rev
246 % diff --rev
247 diff -r ef63ca68695b c
247 diff -r ef63ca68695b c
248 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
248 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
249 @@ -0,0 +1,3 @@
249 @@ -0,0 +1,3 @@
250 +expand $Id$
250 +expand $Id$
251 +do not process $Id:
251 +do not process $Id:
252 +xxx $
252 +xxx $
253 % rollback
253 % rollback
254 rolling back last transaction
254 rolling back last transaction
255 % status
255 % status
256 A c
256 A c
257 % update -C
257 % update -C
258 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
258 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
259 % custom keyword expansion
259 % custom keyword expansion
260 % try with kwdemo
260 % try with kwdemo
261 [extensions]
261 [extensions]
262 hgext.keyword =
262 hgext.keyword =
263 [keyword]
263 [keyword]
264 * =
264 * =
265 b = ignore
265 b = ignore
266 demo.txt =
266 demo.txt =
267 [keywordmaps]
267 [keywordmaps]
268 Xinfo = {author}: {desc}
268 Xinfo = {author}: {desc}
269 $Xinfo: test: hg keyword config and expansion example $
269 $Xinfo: test: hg keyword config and expansion example $
270 % cat
270 % cat
271 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
271 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
272 do not process $Id:
272 do not process $Id:
273 xxx $
273 xxx $
274 ignore $Id$
274 ignore $Id$
275 % hg cat
275 % hg cat
276 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
276 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
277 do not process $Id:
277 do not process $Id:
278 xxx $
278 xxx $
279 ignore $Id$
279 ignore $Id$
280 a
280 a
281 % interrupted commit should not change state
281 % interrupted commit should not change state
282 transaction abort!
282 transaction abort!
283 rollback completed
283 rollback completed
284 abort: empty commit message
284 abort: empty commit message
285 % status
285 % status
286 M a
286 M a
287 ? log
287 ? log
288 % commit
288 % commit
289 a
289 a
290 overwriting a expanding keywords
290 overwriting a expanding keywords
291 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
291 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
292 % status
292 % status
293 % verify
293 % verify
294 checking changesets
294 checking changesets
295 checking manifests
295 checking manifests
296 crosschecking files in changesets and manifests
296 crosschecking files in changesets and manifests
297 checking files
297 checking files
298 3 files, 3 changesets, 4 total revisions
298 3 files, 3 changesets, 4 total revisions
299 % cat
299 % cat
300 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
300 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
301 do not process $Id:
301 do not process $Id:
302 xxx $
302 xxx $
303 $Xinfo: User Name <user@example.com>: firstline $
303 $Xinfo: User Name <user@example.com>: firstline $
304 ignore $Id$
304 ignore $Id$
305 % hg cat
305 % hg cat
306 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
306 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
307 do not process $Id:
307 do not process $Id:
308 xxx $
308 xxx $
309 $Xinfo: User Name <user@example.com>: firstline $
309 $Xinfo: User Name <user@example.com>: firstline $
310 ignore $Id$
310 ignore $Id$
311 a
311 a
312 % annotate
312 % annotate
313 1: expand $Id$
313 1: expand $Id$
314 1: do not process $Id:
314 1: do not process $Id:
315 1: xxx $
315 1: xxx $
316 2: $Xinfo$
316 2: $Xinfo$
317 % remove
317 % remove
318 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
318 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
319 % status
319 % status
320 % rollback
320 % rollback
321 rolling back last transaction
321 rolling back last transaction
322 % status
322 % status
323 R a
323 R a
324 % revert a
324 % revert a
325 % cat a
325 % cat a
326 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
326 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
327 do not process $Id:
327 do not process $Id:
328 xxx $
328 xxx $
329 $Xinfo: User Name <user@example.com>: firstline $
329 $Xinfo: User Name <user@example.com>: firstline $
330 % clone to test incoming
330 % clone to test incoming
331 requesting all changes
331 requesting all changes
332 adding changesets
332 adding changesets
333 adding manifests
333 adding manifests
334 adding file changes
334 adding file changes
335 added 2 changesets with 3 changes to 3 files
335 added 2 changesets with 3 changes to 3 files
336 updating working directory
336 updating working directory
337 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
337 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
338 % incoming
338 % incoming
339 comparing with test-keyword/Test
339 comparing with test-keyword/Test
340 searching for changes
340 searching for changes
341 changeset: 2:bb948857c743
341 changeset: 2:bb948857c743
342 tag: tip
342 tag: tip
343 user: User Name <user@example.com>
343 user: User Name <user@example.com>
344 date: Thu Jan 01 00:00:02 1970 +0000
344 date: Thu Jan 01 00:00:02 1970 +0000
345 summary: firstline
345 summary: firstline
346
346
347 % commit rejecttest
347 % commit rejecttest
348 a
348 a
349 overwriting a expanding keywords
349 overwriting a expanding keywords
350 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
350 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
351 % export
351 % export
352 % import
352 % import
353 applying ../rejecttest.diff
353 applying ../rejecttest.diff
354 % cat
354 % cat
355 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
355 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
356 do not process $Id: rejecttest
356 do not process $Id: rejecttest
357 xxx $
357 xxx $
358 $Xinfo: User Name <user@example.com>: rejects? $
358 $Xinfo: User Name <user@example.com>: rejects? $
359 ignore $Id$
359 ignore $Id$
360
360
361 % rollback
361 % rollback
362 rolling back last transaction
362 rolling back last transaction
363 % clean update
363 % clean update
364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
365 % kwexpand/kwshrink on selected files
365 % kwexpand/kwshrink on selected files
366 % copy a x/a
366 % copy a x/a
367 % kwexpand a
367 % kwexpand a
368 overwriting a expanding keywords
368 overwriting a expanding keywords
369 % kwexpand x/a should abort
369 % kwexpand x/a should abort
370 abort: outstanding uncommitted changes
370 abort: outstanding uncommitted changes
371 x/a
371 x/a
372 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
372 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
373 overwriting x/a expanding keywords
373 overwriting x/a expanding keywords
374 committed changeset 3:cfa68229c1167443337266ebac453c73b1d5d16e
374 committed changeset 3:cfa68229c1167443337266ebac453c73b1d5d16e
375 % cat a
375 % cat a
376 expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $
376 expand $Id: x/a cfa68229c116 Thu, 01 Jan 1970 00:00:03 +0000 user $
377 do not process $Id:
377 do not process $Id:
378 xxx $
378 xxx $
379 $Xinfo: User Name <user@example.com>: xa $
379 $Xinfo: User Name <user@example.com>: xa $
380 % kwshrink a inside directory x
380 % kwshrink a inside directory x
381 overwriting x/a shrinking keywords
381 overwriting x/a shrinking keywords
382 % cat a
382 % cat a
383 expand $Id$
383 expand $Id$
384 do not process $Id:
384 do not process $Id:
385 xxx $
385 xxx $
386 $Xinfo$
386 $Xinfo$
387 % kwexpand nonexistent
387 % kwexpand nonexistent
388 nonexistent:
388 nonexistent:
389 % hg serve
389 % hg serve
390 % expansion
390 % expansion
391 % hgweb file
391 % hgweb file
392 200 Script output follows
392 200 Script output follows
393
393
394 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
394 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
395 do not process $Id:
395 do not process $Id:
396 xxx $
396 xxx $
397 $Xinfo: User Name <user@example.com>: firstline $
397 $Xinfo: User Name <user@example.com>: firstline $
398 % no expansion
398 % no expansion
399 % hgweb annotate
399 % hgweb annotate
400 200 Script output follows
400 200 Script output follows
401
401
402
402
403 user@1: expand $Id$
403 user@1: expand $Id$
404 user@1: do not process $Id:
404 user@1: do not process $Id:
405 user@1: xxx $
405 user@1: xxx $
406 user@2: $Xinfo$
406 user@2: $Xinfo$
407
407
408
408
409
409
410
410
411 % hgweb changeset
411 % hgweb changeset
412 200 Script output follows
412 200 Script output follows
413
413
414
414
415 # HG changeset patch
415 # HG changeset patch
416 # User User Name <user@example.com>
416 # User User Name <user@example.com>
417 # Date 3 0
417 # Date 3 0
418 # Node ID cfa68229c1167443337266ebac453c73b1d5d16e
418 # Node ID cfa68229c1167443337266ebac453c73b1d5d16e
419 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
419 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
420 xa
420 xa
421
421
422 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
422 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
423 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
423 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
424 @@ -0,0 +1,4 @@
424 @@ -0,0 +1,4 @@
425 +expand $Id$
425 +expand $Id$
426 +do not process $Id:
426 +do not process $Id:
427 +xxx $
427 +xxx $
428 +$Xinfo$
428 +$Xinfo$
429
429
430 % hgweb filediff
430 % hgweb filediff
431 200 Script output follows
431 200 Script output follows
432
432
433
433
434 --- a/a Thu Jan 01 00:00:00 1970 +0000
434 --- a/a Thu Jan 01 00:00:00 1970 +0000
435 +++ b/a Thu Jan 01 00:00:02 1970 +0000
435 +++ b/a Thu Jan 01 00:00:02 1970 +0000
436 @@ -1,3 +1,4 @@
436 @@ -1,3 +1,4 @@
437 expand $Id$
437 expand $Id$
438 do not process $Id:
438 do not process $Id:
439 xxx $
439 xxx $
440 +$Xinfo$
440 +$Xinfo$
441
441
442
442
443
443
444
444
445 % errors encountered
445 % errors encountered
446 % merge/resolve
446 % merge/resolve
447 % simplemerge
447 % simplemerge
448 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
448 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
449 created new head
449 created new head
450 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
450 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
451 (branch merge, don't forget to commit)
451 (branch merge, don't forget to commit)
452 $Id: m 8731e1dadc99 Thu, 01 Jan 1970 00:00:00 +0000 test $
452 $Id: m 8731e1dadc99 Thu, 01 Jan 1970 00:00:00 +0000 test $
453 foo
453 foo
454 % conflict
454 % conflict
455 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
456 created new head
456 created new head
457 merging m
457 merging m
458 warning: conflicts during merge.
458 warning: conflicts during merge.
459 merging m failed!
459 merging m failed!
460 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
460 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
461 use 'hg resolve' to retry unresolved file merges
461 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
462 % keyword stays outside conflict zone
462 % keyword stays outside conflict zone
463 $Id$
463 $Id$
464 <<<<<<< local
464 <<<<<<< local
465 bar
465 bar
466 =======
466 =======
467 foo
467 foo
468 >>>>>>> other
468 >>>>>>> other
469 % resolve to local
469 % resolve to local
470 $Id: m 43dfd2854b5b Thu, 01 Jan 1970 00:00:00 +0000 test $
470 $Id: m 43dfd2854b5b Thu, 01 Jan 1970 00:00:00 +0000 test $
471 bar
471 bar
472 % switch off expansion
472 % switch off expansion
473 % kwshrink with unknown file u
473 % kwshrink with unknown file u
474 overwriting a shrinking keywords
474 overwriting a shrinking keywords
475 overwriting m shrinking keywords
475 overwriting m shrinking keywords
476 overwriting x/a shrinking keywords
476 overwriting x/a shrinking keywords
477 % cat
477 % cat
478 expand $Id$
478 expand $Id$
479 do not process $Id:
479 do not process $Id:
480 xxx $
480 xxx $
481 $Xinfo$
481 $Xinfo$
482 ignore $Id$
482 ignore $Id$
483 % hg cat
483 % hg cat
484 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
484 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
485 do not process $Id:
485 do not process $Id:
486 xxx $
486 xxx $
487 $Xinfo: User Name <user@example.com>: firstline $
487 $Xinfo: User Name <user@example.com>: firstline $
488 ignore $Id$
488 ignore $Id$
489 a
489 a
490 % cat
490 % cat
491 expand $Id$
491 expand $Id$
492 do not process $Id:
492 do not process $Id:
493 xxx $
493 xxx $
494 $Xinfo$
494 $Xinfo$
495 ignore $Id$
495 ignore $Id$
496 % hg cat
496 % hg cat
497 expand $Id$
497 expand $Id$
498 do not process $Id:
498 do not process $Id:
499 xxx $
499 xxx $
500 $Xinfo$
500 $Xinfo$
501 ignore $Id$
501 ignore $Id$
502 a
502 a
@@ -1,41 +1,41 b''
1 # initial file contents
1 # initial file contents
2 adding f
2 adding f
3 line 1
3 line 1
4 line 2
4 line 2
5 line 3
5 line 3
6 # branch 1: editing line 1
6 # branch 1: editing line 1
7 # branch 2: editing line 3
7 # branch 2: editing line 3
8 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9 created new head
9 created new head
10 # merge using internal:fail tool
10 # merge using internal:fail tool
11 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
11 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
12 use 'hg resolve' to retry unresolved file merges
12 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
13 line 1
13 line 1
14 line 2
14 line 2
15 third line
15 third line
16 M f
16 M f
17 # merge using internal:local tool
17 # merge using internal:local tool
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
19 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
20 (branch merge, don't forget to commit)
20 (branch merge, don't forget to commit)
21 line 1
21 line 1
22 line 2
22 line 2
23 third line
23 third line
24 M f
24 M f
25 # merge using internal:other tool
25 # merge using internal:other tool
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
27 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
28 (branch merge, don't forget to commit)
28 (branch merge, don't forget to commit)
29 first line
29 first line
30 line 2
30 line 2
31 line 3
31 line 3
32 M f
32 M f
33 # merge using default tool
33 # merge using default tool
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 merging f
35 merging f
36 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
36 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
37 (branch merge, don't forget to commit)
37 (branch merge, don't forget to commit)
38 first line
38 first line
39 line 2
39 line 2
40 third line
40 third line
41 M f
41 M f
@@ -1,395 +1,395 b''
1 # revision 0
1 # revision 0
2 adding f
2 adding f
3 # revision 1
3 # revision 1
4 # revision 2
4 # revision 2
5 created new head
5 created new head
6 # revision 3 - simple to merge
6 # revision 3 - simple to merge
7 created new head
7 created new head
8
8
9
9
10 Tool selection
10 Tool selection
11
11
12 # default is internal merge:
12 # default is internal merge:
13 [merge-tools]
13 [merge-tools]
14 # hg update -C 1
14 # hg update -C 1
15 # hg merge -r 2
15 # hg merge -r 2
16 merging f
16 merging f
17 warning: conflicts during merge.
17 warning: conflicts during merge.
18 merging f failed!
18 merging f failed!
19 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
19 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
20 use 'hg resolve' to retry unresolved file merges
20 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
21 # cat f
21 # cat f
22 <<<<<<< local
22 <<<<<<< local
23 revision 1
23 revision 1
24 =======
24 =======
25 revision 2
25 revision 2
26 >>>>>>> other
26 >>>>>>> other
27 space
27 space
28 # hg stat
28 # hg stat
29 M f
29 M f
30 ? f.orig
30 ? f.orig
31
31
32 # simplest hgrc using false for merge:
32 # simplest hgrc using false for merge:
33 [merge-tools]
33 [merge-tools]
34 false.whatever=
34 false.whatever=
35 # hg update -C 1
35 # hg update -C 1
36 # hg merge -r 2
36 # hg merge -r 2
37 merging f
37 merging f
38 merging f failed!
38 merging f failed!
39 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
39 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
40 use 'hg resolve' to retry unresolved file merges
40 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
41 # cat f
41 # cat f
42 revision 1
42 revision 1
43 space
43 space
44 # hg stat
44 # hg stat
45 M f
45 M f
46 ? f.orig
46 ? f.orig
47
47
48 # true with higher .priority gets precedence:
48 # true with higher .priority gets precedence:
49 [merge-tools]
49 [merge-tools]
50 false.whatever=
50 false.whatever=
51 true.priority=1
51 true.priority=1
52 # hg update -C 1
52 # hg update -C 1
53 # hg merge -r 2
53 # hg merge -r 2
54 merging f
54 merging f
55 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
55 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
56 (branch merge, don't forget to commit)
56 (branch merge, don't forget to commit)
57 # cat f
57 # cat f
58 revision 1
58 revision 1
59 space
59 space
60 # hg stat
60 # hg stat
61 M f
61 M f
62
62
63 # unless lowered on command line:
63 # unless lowered on command line:
64 [merge-tools]
64 [merge-tools]
65 false.whatever=
65 false.whatever=
66 true.priority=1
66 true.priority=1
67 # hg update -C 1
67 # hg update -C 1
68 # hg merge -r 2 --config merge-tools.true.priority=-7
68 # hg merge -r 2 --config merge-tools.true.priority=-7
69 merging f
69 merging f
70 merging f failed!
70 merging f failed!
71 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
71 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
72 use 'hg resolve' to retry unresolved file merges
72 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
73 # cat f
73 # cat f
74 revision 1
74 revision 1
75 space
75 space
76 # hg stat
76 # hg stat
77 M f
77 M f
78 ? f.orig
78 ? f.orig
79
79
80 # or false set higher on command line:
80 # or false set higher on command line:
81 [merge-tools]
81 [merge-tools]
82 false.whatever=
82 false.whatever=
83 true.priority=1
83 true.priority=1
84 # hg update -C 1
84 # hg update -C 1
85 # hg merge -r 2 --config merge-tools.false.priority=117
85 # hg merge -r 2 --config merge-tools.false.priority=117
86 merging f
86 merging f
87 merging f failed!
87 merging f failed!
88 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
88 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
89 use 'hg resolve' to retry unresolved file merges
89 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
90 # cat f
90 # cat f
91 revision 1
91 revision 1
92 space
92 space
93 # hg stat
93 # hg stat
94 M f
94 M f
95 ? f.orig
95 ? f.orig
96
96
97 # or true.executable not found in PATH:
97 # or true.executable not found in PATH:
98 [merge-tools]
98 [merge-tools]
99 false.whatever=
99 false.whatever=
100 true.priority=1
100 true.priority=1
101 # hg update -C 1
101 # hg update -C 1
102 # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
102 # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
103 merging f
103 merging f
104 merging f failed!
104 merging f failed!
105 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
105 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
106 use 'hg resolve' to retry unresolved file merges
106 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
107 # cat f
107 # cat f
108 revision 1
108 revision 1
109 space
109 space
110 # hg stat
110 # hg stat
111 M f
111 M f
112 ? f.orig
112 ? f.orig
113
113
114 # or true.executable with bogus path:
114 # or true.executable with bogus path:
115 [merge-tools]
115 [merge-tools]
116 false.whatever=
116 false.whatever=
117 true.priority=1
117 true.priority=1
118 # hg update -C 1
118 # hg update -C 1
119 # hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool
119 # hg merge -r 2 --config merge-tools.true.executable=/bin/nonexistingmergetool
120 merging f
120 merging f
121 merging f failed!
121 merging f failed!
122 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
122 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
123 use 'hg resolve' to retry unresolved file merges
123 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
124 # cat f
124 # cat f
125 revision 1
125 revision 1
126 space
126 space
127 # hg stat
127 # hg stat
128 M f
128 M f
129 ? f.orig
129 ? f.orig
130
130
131 # but true.executable set to cat found in PATH works:
131 # but true.executable set to cat found in PATH works:
132 [merge-tools]
132 [merge-tools]
133 false.whatever=
133 false.whatever=
134 true.priority=1
134 true.priority=1
135 true.executable=cat
135 true.executable=cat
136 # hg update -C 1
136 # hg update -C 1
137 # hg merge -r 2
137 # hg merge -r 2
138 revision 1
138 revision 1
139 space
139 space
140 revision 0
140 revision 0
141 space
141 space
142 revision 2
142 revision 2
143 space
143 space
144 merging f
144 merging f
145 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
145 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
146 (branch merge, don't forget to commit)
146 (branch merge, don't forget to commit)
147 # cat f
147 # cat f
148 revision 1
148 revision 1
149 space
149 space
150 # hg stat
150 # hg stat
151 M f
151 M f
152
152
153 # and true.executable set to cat with path works:
153 # and true.executable set to cat with path works:
154 [merge-tools]
154 [merge-tools]
155 false.whatever=
155 false.whatever=
156 true.priority=1
156 true.priority=1
157 true.executable=cat
157 true.executable=cat
158 # hg update -C 1
158 # hg update -C 1
159 # hg merge -r 2 --config merge-tools.true.executable=/bin/cat
159 # hg merge -r 2 --config merge-tools.true.executable=/bin/cat
160 revision 1
160 revision 1
161 space
161 space
162 revision 0
162 revision 0
163 space
163 space
164 revision 2
164 revision 2
165 space
165 space
166 merging f
166 merging f
167 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
167 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
168 (branch merge, don't forget to commit)
168 (branch merge, don't forget to commit)
169 # cat f
169 # cat f
170 revision 1
170 revision 1
171 space
171 space
172 # hg stat
172 # hg stat
173 M f
173 M f
174
174
175
175
176 Tool selection and merge-patterns
176 Tool selection and merge-patterns
177
177
178 # merge-patterns specifies new tool false:
178 # merge-patterns specifies new tool false:
179 [merge-tools]
179 [merge-tools]
180 false.whatever=
180 false.whatever=
181 true.priority=1
181 true.priority=1
182 true.executable=cat
182 true.executable=cat
183 # hg update -C 1
183 # hg update -C 1
184 # hg merge -r 2 --config merge-patterns.f=false
184 # hg merge -r 2 --config merge-patterns.f=false
185 merging f
185 merging f
186 merging f failed!
186 merging f failed!
187 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
188 use 'hg resolve' to retry unresolved file merges
188 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
189 # cat f
189 # cat f
190 revision 1
190 revision 1
191 space
191 space
192 # hg stat
192 # hg stat
193 M f
193 M f
194 ? f.orig
194 ? f.orig
195
195
196 # merge-patterns specifies executable not found in PATH and gets warning:
196 # merge-patterns specifies executable not found in PATH and gets warning:
197 [merge-tools]
197 [merge-tools]
198 false.whatever=
198 false.whatever=
199 true.priority=1
199 true.priority=1
200 true.executable=cat
200 true.executable=cat
201 # hg update -C 1
201 # hg update -C 1
202 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
202 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
203 couldn't find merge tool true specified for f
203 couldn't find merge tool true specified for f
204 merging f
204 merging f
205 merging f failed!
205 merging f failed!
206 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
206 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
207 use 'hg resolve' to retry unresolved file merges
207 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
208 # cat f
208 # cat f
209 revision 1
209 revision 1
210 space
210 space
211 # hg stat
211 # hg stat
212 M f
212 M f
213 ? f.orig
213 ? f.orig
214
214
215 # merge-patterns specifies executable with bogus path and gets warning:
215 # merge-patterns specifies executable with bogus path and gets warning:
216 [merge-tools]
216 [merge-tools]
217 false.whatever=
217 false.whatever=
218 true.priority=1
218 true.priority=1
219 true.executable=cat
219 true.executable=cat
220 # hg update -C 1
220 # hg update -C 1
221 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool
221 # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool
222 couldn't find merge tool true specified for f
222 couldn't find merge tool true specified for f
223 merging f
223 merging f
224 merging f failed!
224 merging f failed!
225 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
225 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
226 use 'hg resolve' to retry unresolved file merges
226 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
227 # cat f
227 # cat f
228 revision 1
228 revision 1
229 space
229 space
230 # hg stat
230 # hg stat
231 M f
231 M f
232 ? f.orig
232 ? f.orig
233
233
234
234
235 Premerge
235 Premerge
236
236
237 # Default is silent simplemerge:
237 # Default is silent simplemerge:
238 [merge-tools]
238 [merge-tools]
239 false.whatever=
239 false.whatever=
240 true.priority=1
240 true.priority=1
241 true.executable=cat
241 true.executable=cat
242 # hg update -C 1
242 # hg update -C 1
243 # hg merge -r 3
243 # hg merge -r 3
244 merging f
244 merging f
245 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
245 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
246 (branch merge, don't forget to commit)
246 (branch merge, don't forget to commit)
247 # cat f
247 # cat f
248 revision 1
248 revision 1
249 space
249 space
250 revision 3
250 revision 3
251 # hg stat
251 # hg stat
252 M f
252 M f
253
253
254 # .premerge=True is same:
254 # .premerge=True is same:
255 [merge-tools]
255 [merge-tools]
256 false.whatever=
256 false.whatever=
257 true.priority=1
257 true.priority=1
258 true.executable=cat
258 true.executable=cat
259 # hg update -C 1
259 # hg update -C 1
260 # hg merge -r 3 --config merge-tools.true.premerge=True
260 # hg merge -r 3 --config merge-tools.true.premerge=True
261 merging f
261 merging f
262 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
262 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
263 (branch merge, don't forget to commit)
263 (branch merge, don't forget to commit)
264 # cat f
264 # cat f
265 revision 1
265 revision 1
266 space
266 space
267 revision 3
267 revision 3
268 # hg stat
268 # hg stat
269 M f
269 M f
270
270
271 # .premerge=False executes merge-tool:
271 # .premerge=False executes merge-tool:
272 [merge-tools]
272 [merge-tools]
273 false.whatever=
273 false.whatever=
274 true.priority=1
274 true.priority=1
275 true.executable=cat
275 true.executable=cat
276 # hg update -C 1
276 # hg update -C 1
277 # hg merge -r 3 --config merge-tools.true.premerge=False
277 # hg merge -r 3 --config merge-tools.true.premerge=False
278 revision 1
278 revision 1
279 space
279 space
280 revision 0
280 revision 0
281 space
281 space
282 revision 0
282 revision 0
283 space
283 space
284 revision 3
284 revision 3
285 merging f
285 merging f
286 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
286 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
287 (branch merge, don't forget to commit)
287 (branch merge, don't forget to commit)
288 # cat f
288 # cat f
289 revision 1
289 revision 1
290 space
290 space
291 # hg stat
291 # hg stat
292 M f
292 M f
293
293
294
294
295 Tool execution
295 Tool execution
296
296
297 # set tools.args explicit to include $base $local $other $output:
297 # set tools.args explicit to include $base $local $other $output:
298 [merge-tools]
298 [merge-tools]
299 false.whatever=
299 false.whatever=
300 true.priority=1
300 true.priority=1
301 true.executable=cat
301 true.executable=cat
302 # hg update -C 1
302 # hg update -C 1
303 ==> ... <==
303 ==> ... <==
304 revision 0
304 revision 0
305 space
305 space
306
306
307 ==> ... <==
307 ==> ... <==
308 revision 1
308 revision 1
309 space
309 space
310
310
311 ==> ... <==
311 ==> ... <==
312 revision 2
312 revision 2
313 space
313 space
314
314
315 ==> ... <==
315 ==> ... <==
316 revision 1
316 revision 1
317 space
317 space
318 merging f
318 merging f
319 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
319 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
320 (branch merge, don't forget to commit)
320 (branch merge, don't forget to commit)
321 # cat f
321 # cat f
322 revision 1
322 revision 1
323 space
323 space
324 # hg stat
324 # hg stat
325 M f
325 M f
326
326
327 # Merge with "echo mergeresult > $local":
327 # Merge with "echo mergeresult > $local":
328 [merge-tools]
328 [merge-tools]
329 false.whatever=
329 false.whatever=
330 true.priority=1
330 true.priority=1
331 true.executable=cat
331 true.executable=cat
332 # hg update -C 1
332 # hg update -C 1
333 merging f
333 merging f
334 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
334 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
335 (branch merge, don't forget to commit)
335 (branch merge, don't forget to commit)
336 # cat f
336 # cat f
337 mergeresult
337 mergeresult
338 # hg stat
338 # hg stat
339 M f
339 M f
340
340
341 # - and $local is the file f:
341 # - and $local is the file f:
342 [merge-tools]
342 [merge-tools]
343 false.whatever=
343 false.whatever=
344 true.priority=1
344 true.priority=1
345 true.executable=cat
345 true.executable=cat
346 # hg update -C 1
346 # hg update -C 1
347 merging f
347 merging f
348 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
348 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
349 (branch merge, don't forget to commit)
349 (branch merge, don't forget to commit)
350 # cat f
350 # cat f
351 mergeresult
351 mergeresult
352 # hg stat
352 # hg stat
353 M f
353 M f
354
354
355 # Merge with "echo mergeresult > $output" - the variable is a bit magic:
355 # Merge with "echo mergeresult > $output" - the variable is a bit magic:
356 [merge-tools]
356 [merge-tools]
357 false.whatever=
357 false.whatever=
358 true.priority=1
358 true.priority=1
359 true.executable=cat
359 true.executable=cat
360 # hg update -C 1
360 # hg update -C 1
361 merging f
361 merging f
362 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
362 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
363 (branch merge, don't forget to commit)
363 (branch merge, don't forget to commit)
364 # cat f
364 # cat f
365 mergeresult
365 mergeresult
366 # hg stat
366 # hg stat
367 M f
367 M f
368
368
369
369
370 Merge post-processing
370 Merge post-processing
371
371
372 # cat is a bad merge-tool and doesn't change:
372 # cat is a bad merge-tool and doesn't change:
373 [merge-tools]
373 [merge-tools]
374 false.whatever=
374 false.whatever=
375 true.priority=1
375 true.priority=1
376 true.executable=cat
376 true.executable=cat
377 # hg update -C 1
377 # hg update -C 1
378 # hg merge -r 2 --config merge-tools.true.checkchanged=1
378 # hg merge -r 2 --config merge-tools.true.checkchanged=1
379 revision 1
379 revision 1
380 space
380 space
381 revision 0
381 revision 0
382 space
382 space
383 revision 2
383 revision 2
384 space
384 space
385 merging f
385 merging f
386 merging f failed!
386 merging f failed!
387 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
387 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
388 use 'hg resolve' to retry unresolved file merges
388 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
389 # cat f
389 # cat f
390 revision 1
390 revision 1
391 space
391 space
392 # hg stat
392 # hg stat
393 M f
393 M f
394 ? f.orig
394 ? f.orig
395
395
@@ -1,77 +1,77 b''
1 updating working directory
1 updating working directory
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 pulling from ../test-a
3 pulling from ../test-a
4 searching for changes
4 searching for changes
5 adding changesets
5 adding changesets
6 adding manifests
6 adding manifests
7 adding file changes
7 adding file changes
8 added 1 changesets with 1 changes to 1 files (+1 heads)
8 added 1 changesets with 1 changes to 1 files (+1 heads)
9 (run 'hg heads' to see heads, 'hg merge' to merge)
9 (run 'hg heads' to see heads, 'hg merge' to merge)
10 merging test.txt
10 merging test.txt
11 warning: conflicts during merge.
11 warning: conflicts during merge.
12 merging test.txt failed!
12 merging test.txt failed!
13 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
13 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
14 use 'hg resolve' to retry unresolved file merges
14 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
15 pulling from ../test-a
15 pulling from ../test-a
16 searching for changes
16 searching for changes
17 adding changesets
17 adding changesets
18 adding manifests
18 adding manifests
19 adding file changes
19 adding file changes
20 added 1 changesets with 1 changes to 1 files (+1 heads)
20 added 1 changesets with 1 changes to 1 files (+1 heads)
21 (run 'hg heads' to see heads, 'hg merge' to merge)
21 (run 'hg heads' to see heads, 'hg merge' to merge)
22 resolving manifests
22 resolving manifests
23 overwrite None partial False
23 overwrite None partial False
24 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
24 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
25 searching for copies back to rev 1
25 searching for copies back to rev 1
26 test.txt: versions differ -> m
26 test.txt: versions differ -> m
27 preserving test.txt for resolve of test.txt
27 preserving test.txt for resolve of test.txt
28 picked tool 'internal:merge' for test.txt (binary False symlink False)
28 picked tool 'internal:merge' for test.txt (binary False symlink False)
29 merging test.txt
29 merging test.txt
30 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9
30 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9
31 warning: conflicts during merge.
31 warning: conflicts during merge.
32 merging test.txt failed!
32 merging test.txt failed!
33 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
33 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
34 use 'hg resolve' to retry unresolved file merges
34 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
35 one
35 one
36 <<<<<<< local
36 <<<<<<< local
37 two-point-five
37 two-point-five
38 =======
38 =======
39 two-point-one
39 two-point-one
40 >>>>>>> other
40 >>>>>>> other
41 three
41 three
42 rev offset length base linkrev nodeid p1 p2
42 rev offset length base linkrev nodeid p1 p2
43 0 0 7 0 0 01365c4cca56 000000000000 000000000000
43 0 0 7 0 0 01365c4cca56 000000000000 000000000000
44 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000
44 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000
45 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000
45 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000
46 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557
46 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557
47 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000
47 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000
48 changeset: 4:a070d41e8360
48 changeset: 4:a070d41e8360
49 tag: tip
49 tag: tip
50 parent: 2:faaea63e63a9
50 parent: 2:faaea63e63a9
51 user: test
51 user: test
52 date: Mon Jan 12 13:46:40 1970 +0000
52 date: Mon Jan 12 13:46:40 1970 +0000
53 summary: two -> two-point-one
53 summary: two -> two-point-one
54
54
55 changeset: 3:451c744aabcc
55 changeset: 3:451c744aabcc
56 parent: 1:e409be6afcc0
56 parent: 1:e409be6afcc0
57 parent: 2:faaea63e63a9
57 parent: 2:faaea63e63a9
58 user: test
58 user: test
59 date: Mon Jan 12 13:46:40 1970 +0000
59 date: Mon Jan 12 13:46:40 1970 +0000
60 summary: Merge 1
60 summary: Merge 1
61
61
62 changeset: 2:faaea63e63a9
62 changeset: 2:faaea63e63a9
63 parent: 0:095c92b91f1a
63 parent: 0:095c92b91f1a
64 user: test
64 user: test
65 date: Mon Jan 12 13:46:40 1970 +0000
65 date: Mon Jan 12 13:46:40 1970 +0000
66 summary: Numbers as words
66 summary: Numbers as words
67
67
68 changeset: 1:e409be6afcc0
68 changeset: 1:e409be6afcc0
69 user: test
69 user: test
70 date: Mon Jan 12 13:46:40 1970 +0000
70 date: Mon Jan 12 13:46:40 1970 +0000
71 summary: 2 -> 2.5
71 summary: 2 -> 2.5
72
72
73 changeset: 0:095c92b91f1a
73 changeset: 0:095c92b91f1a
74 user: test
74 user: test
75 date: Mon Jan 12 13:46:40 1970 +0000
75 date: Mon Jan 12 13:46:40 1970 +0000
76 summary: Initial
76 summary: Initial
77
77
@@ -1,39 +1,39 b''
1 adding bar
1 adding bar
2 adding foo
2 adding foo
3 adding quux1
3 adding quux1
4 adding quux2
4 adding quux2
5 created new head
5 created new head
6 merging bar
6 merging bar
7 merging bar failed!
7 merging bar failed!
8 merging foo and baz to baz
8 merging foo and baz to baz
9 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
9 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
10 use 'hg resolve' to retry unresolved file merges
10 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
11 U bar
11 U bar
12 R baz
12 R baz
13 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
13 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
14 merging bar
14 merging bar
15 merging bar failed!
15 merging bar failed!
16 merging baz and foo to baz
16 merging baz and foo to baz
17 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
17 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
18 use 'hg resolve' to retry unresolved file merges
18 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
19 % show unresolved
19 % show unresolved
20 U bar
20 U bar
21 R baz
21 R baz
22 % unmark baz
22 % unmark baz
23 % show
23 % show
24 U bar
24 U bar
25 U baz
25 U baz
26 % re-resolve baz
26 % re-resolve baz
27 merging baz and foo to baz
27 merging baz and foo to baz
28 % after
28 % after
29 U bar
29 U bar
30 R baz
30 R baz
31 % resolve all warning
31 % resolve all warning
32 abort: no files or directories specified; use --all to remerge all files
32 abort: no files or directories specified; use --all to remerge all files
33 % resolve all
33 % resolve all
34 merging bar
34 merging bar
35 warning: conflicts during merge.
35 warning: conflicts during merge.
36 merging bar failed!
36 merging bar failed!
37 % after
37 % after
38 U bar
38 U bar
39 R baz
39 R baz
@@ -1,8 +1,8 b''
1 adding file
1 adding file
2 % create a second head
2 % create a second head
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 created new head
4 created new head
5 % failing merge
5 % failing merge
6 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
6 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
7 use 'hg resolve' to retry unresolved file merges
7 use 'hg resolve' to retry unresolved file merges or 'hg up --clean' to abandon
8 % resolve -l, should be empty
8 % resolve -l, should be empty
General Comments 0
You need to be logged in to leave comments. Login now