##// END OF EJS Templates
merged with crew
Martin Geisler -
r8925:3ad0b5dd merge default
parent child Browse files
Show More
@@ -0,0 +1,280 b''
1 SVN-fs-dump-format-version: 2
2
3 UUID: afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af
4
5 Revision-number: 0
6 Prop-content-length: 56
7 Content-length: 56
8
9 K 8
10 svn:date
11 V 27
12 2009-06-21T16:34:55.835945Z
13 PROPS-END
14
15 Revision-number: 1
16 Prop-content-length: 112
17 Content-length: 112
18
19 K 7
20 svn:log
21 V 10
22 init projA
23 K 10
24 svn:author
25 V 7
26 pmezard
27 K 8
28 svn:date
29 V 27
30 2009-06-21T16:34:55.909545Z
31 PROPS-END
32
33 Node-path: branches
34 Node-kind: dir
35 Node-action: add
36 Prop-content-length: 10
37 Content-length: 10
38
39 PROPS-END
40
41
42 Node-path: tags
43 Node-kind: dir
44 Node-action: add
45 Prop-content-length: 10
46 Content-length: 10
47
48 PROPS-END
49
50
51 Node-path: trunk
52 Node-kind: dir
53 Node-action: add
54 Prop-content-length: 10
55 Content-length: 10
56
57 PROPS-END
58
59
60 Revision-number: 2
61 Prop-content-length: 106
62 Content-length: 106
63
64 K 7
65 svn:log
66 V 5
67 hello
68 K 10
69 svn:author
70 V 7
71 pmezard
72 K 8
73 svn:date
74 V 27
75 2009-06-21T16:34:56.150049Z
76 PROPS-END
77
78 Node-path: trunk/à
79 Node-kind: dir
80 Node-action: add
81 Prop-content-length: 10
82 Content-length: 10
83
84 PROPS-END
85
86
87 Node-path: trunk/à/é
88 Node-kind: file
89 Node-action: add
90 Prop-content-length: 10
91 Text-content-length: 2
92 Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
93 Text-content-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
94 Content-length: 12
95
96 PROPS-END
97 d
98
99
100 Node-path: trunk/é
101 Node-kind: file
102 Node-action: add
103 Prop-content-length: 10
104 Text-content-length: 2
105 Text-content-md5: 9ffbf43126e33be52cd2bf7e01d627f9
106 Text-content-sha1: 094e3afb2fe8dfe82f63731cdcd3b999f4856cff
107 Content-length: 12
108
109 PROPS-END
110 e
111
112
113 Revision-number: 3
114 Prop-content-length: 112
115 Content-length: 112
116
117 K 7
118 svn:log
119 V 10
120 copy files
121 K 10
122 svn:author
123 V 7
124 pmezard
125 K 8
126 svn:date
127 V 27
128 2009-06-21T16:34:59.089402Z
129 PROPS-END
130
131 Node-path: trunk/è
132 Node-kind: file
133 Node-action: add
134 Node-copyfrom-rev: 2
135 Node-copyfrom-path: trunk/é
136 Text-copy-source-md5: 9ffbf43126e33be52cd2bf7e01d627f9
137 Text-copy-source-sha1: 094e3afb2fe8dfe82f63731cdcd3b999f4856cff
138
139
140 Node-path: trunk/ù
141 Node-kind: dir
142 Node-action: add
143 Node-copyfrom-rev: 2
144 Node-copyfrom-path: trunk/à
145
146
147 Node-path: trunk/à
148 Node-action: delete
149
150
151 Node-path: trunk/é
152 Node-action: delete
153
154
155 Revision-number: 4
156 Prop-content-length: 114
157 Content-length: 114
158
159 K 7
160 svn:log
161 V 12
162 remove files
163 K 10
164 svn:author
165 V 7
166 pmezard
167 K 8
168 svn:date
169 V 27
170 2009-06-21T16:35:00.165121Z
171 PROPS-END
172
173 Node-path: trunk/è
174 Node-action: delete
175
176
177 Node-path: trunk/ù
178 Node-action: delete
179
180
181 Revision-number: 5
182 Prop-content-length: 120
183 Content-length: 120
184
185 K 7
186 svn:log
187 V 18
188 branch to branché
189 K 10
190 svn:author
191 V 7
192 pmezard
193 K 8
194 svn:date
195 V 27
196 2009-06-21T16:35:03.079138Z
197 PROPS-END
198
199 Node-path: branches/branché
200 Node-kind: dir
201 Node-action: add
202 Node-copyfrom-rev: 4
203 Node-copyfrom-path: trunk
204
205
206 Revision-number: 6
207 Prop-content-length: 121
208 Content-length: 121
209
210 K 7
211 svn:log
212 V 19
213 branch to branchée
214 K 10
215 svn:author
216 V 7
217 pmezard
218 K 8
219 svn:date
220 V 27
221 2009-06-21T16:35:06.060801Z
222 PROPS-END
223
224 Node-path: branches/branchée
225 Node-kind: dir
226 Node-action: add
227 Node-copyfrom-rev: 5
228 Node-copyfrom-path: branches/branché
229
230
231 Revision-number: 7
232 Prop-content-length: 110
233 Content-length: 110
234
235 K 7
236 svn:log
237 V 9
238 tag trunk
239 K 10
240 svn:author
241 V 7
242 pmezard
243 K 8
244 svn:date
245 V 27
246 2009-06-21T16:35:09.061530Z
247 PROPS-END
248
249 Node-path: tags/branché
250 Node-kind: dir
251 Node-action: add
252 Node-copyfrom-rev: 6
253 Node-copyfrom-path: trunk
254
255
256 Revision-number: 8
257 Prop-content-length: 114
258 Content-length: 114
259
260 K 7
261 svn:log
262 V 12
263 tag branché
264 K 10
265 svn:author
266 V 7
267 pmezard
268 K 8
269 svn:date
270 V 27
271 2009-06-21T16:35:11.068562Z
272 PROPS-END
273
274 Node-path: tags/branchée
275 Node-kind: dir
276 Node-action: add
277 Node-copyfrom-rev: 6
278 Node-copyfrom-path: branches/branchée
279
280
@@ -0,0 +1,57 b''
1 # -*- coding: utf-8 -*-
2 #!/bin/sh
3 #
4 # Use this script to generate encoding.svndump
5 #
6
7 mkdir temp
8 cd temp
9
10 mkdir project-orig
11 cd project-orig
12 mkdir trunk
13 mkdir branches
14 mkdir tags
15 cd ..
16
17 svnadmin create svn-repo
18 svnurl=file://`pwd`/svn-repo
19 svn import project-orig $svnurl -m "init projA"
20
21 svn co $svnurl project
22 cd project
23 echo e > trunk/é
24 mkdir trunk/à
25 echo d > trunk/à/é
26 svn add trunk/é trunk/à
27 svn ci -m hello
28
29 # Copy files and directories
30 svn mv trunk/é trunk/è
31 svn mv trunk/à trunk/ù
32 svn ci -m "copy files"
33
34 # Remove files
35 svn rm trunk/è
36 svn rm trunk/ù
37 svn ci -m 'remove files'
38
39 # Create branches with and from weird names
40 svn up
41 svn cp trunk branches/branché
42 echo a > branches/branché/a
43 svn ci -m 'branch to branché'
44 svn up
45 svn cp branches/branché branches/branchée
46 echo a >> branches/branché/a
47 svn ci -m 'branch to branchée'
48
49 # Create tag with weird name
50 svn up
51 svn cp trunk tags/branché
52 svn ci -m 'tag trunk'
53 svn cp branches/branchée tags/branchée
54 svn ci -m 'tag branché'
55 cd ..
56
57 svnadmin dump svn-repo > ../encoding.svndump
@@ -0,0 +1,17 b''
1 #!/bin/sh
2
3 "$TESTDIR/hghave" svn svn-bindings || exit 80
4
5 echo "[extensions]" >> $HGRCPATH
6 echo "convert = " >> $HGRCPATH
7
8 svnadmin create svn-repo
9 cat "$TESTDIR/svn/encoding.svndump" | svnadmin load svn-repo > /dev/null
10
11 echo '% convert while testing all possible outputs'
12 hg --debug convert svn-repo A-hg > /dev/null
13 cd A-hg
14 hg up
15 echo '% check tags are in UTF-8'
16 python -c "print '\n'.join([('%r' % l) for l in file('.hgtags', 'rb').readlines()])"
17 cd ..
@@ -0,0 +1,5 b''
1 % convert while testing all possible outputs
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 % check tags are in UTF-8
4 '1c1b4062874e8197a68e7ce9e498479a37d0215c branch\xc3\xa9e\n'
5 'edc96568720ef79eefa6372677b18d855de3abee branch\xc3\xa9\n'
@@ -6,18 +6,23 b''
6 # GNU General Public License version 2, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7 #
7 #
8
8
9 '''provide simple hooks for access control
9 '''control access to a repository using simple hooks
10
10
11 Authorization is against local user name on system where hook is run, not
11 This hook makes it possible to allow or deny write access to portions
12 committer of original changeset (since that is easy to spoof).
12 of a repository when receiving incoming changesets.
13
14 The authorization is matched based on the local user name on the
15 system where the hook runs, and not the committer of the original
16 changeset (since the latter is merely informative).
13
17
14 The acl hook is best to use if you use hgsh to set up restricted shells for
18 The acl hook is best used along with a restricted shell like hgsh,
15 authenticated users to only push to / pull from. It's not safe if user has
19 preventing authenticating users from doing anything other than
16 interactive shell access, because they can disable the hook. It's also not
20 pushing or pulling. The hook is not safe to use if users have
17 safe if remote users share one local account, because then there's no way to
21 interactive shell access, as they can then disable the hook.
18 tell remote users apart.
22 Nor is it safe if remote users share an account, because then there
23 is no way to distinguish them.
19
24
20 To use, configure the acl extension in hgrc like this:
25 To use this hook, configure the acl extension in your hgrc like this:
21
26
22 [extensions]
27 [extensions]
23 hgext.acl =
28 hgext.acl =
@@ -26,21 +31,24 b' To use, configure the acl extension in h'
26 pretxnchangegroup.acl = python:hgext.acl.hook
31 pretxnchangegroup.acl = python:hgext.acl.hook
27
32
28 [acl]
33 [acl]
29 sources = serve # check if source of incoming changes in this list
34 # Check whether the source of incoming changes is in this list
30 # ("serve" == ssh or http, "push", "pull", "bundle")
35 # ("serve" == ssh or http, "push", "pull", "bundle")
36 sources = serve
31
37
32 Allow and deny lists have a subtree pattern (default syntax is glob) on the
38 The allow and deny sections take a subtree pattern as key (with a
33 left and user names on right. The deny list is checked before the allow list.
39 glob syntax by default), and a comma separated list of users as
40 the corresponding value. The deny list is checked before the allow
41 list is.
34
42
35 [acl.allow]
43 [acl.allow]
36 # if acl.allow not present, all users allowed by default
44 # If acl.allow is not present, all users are allowed by default.
37 # empty acl.allow = no users allowed
45 # An empty acl.allow section means no users allowed.
38 docs/** = doc_writer
46 docs/** = doc_writer
39 .hgtags = release_engineer
47 .hgtags = release_engineer
40
48
41 [acl.deny]
49 [acl.deny]
42 # if acl.deny not present, no users denied by default
50 # If acl.deny is not present, no users are refused by default.
43 # empty acl.deny = all users allowed
51 # An empty acl.deny section means all users allowed.
44 glob pattern = user4, user5
52 glob pattern = user4, user5
45 ** = user6
53 ** = user6
46 '''
54 '''
@@ -5,24 +5,26 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''Mercurial bookmarks
8 '''track a line of development with movable markers
9
10 Bookmarks are local movable markers to changesets. Every bookmark
11 points to a changeset identified by its hash. If you commit a
12 changeset that is based on a changeset that has a bookmark on it,
13 the bookmark shifts to the new changeset.
9
14
10 Mercurial bookmarks are local moveable pointers to changesets. Every
15 It is possible to use bookmark names in every revision lookup
11 bookmark points to a changeset identified by its hash. If you commit a
16 (e.g. hg merge, hg update).
12 changeset that is based on a changeset that has a bookmark on it, the
13 bookmark is forwarded to the new changeset.
14
17
15 It is possible to use bookmark names in every revision lookup (e.g. hg
18 By default, when several bookmarks point to the same changeset, they
16 merge, hg update).
19 will all move forward together. It is possible to obtain a more
17
20 git-like experience by adding the following configuration option to
18 The bookmark extension offers the possiblity to have a more git-like
21 your .hgrc:
19 experience by adding the following configuration option to your .hgrc:
20
22
21 [bookmarks]
23 [bookmarks]
22 track.current = True
24 track.current = True
23
25
24 This will cause bookmarks to track the bookmark that you are currently
26 This will cause Mercurial to track the bookmark that you are currently
25 on, and just updates it. This is similar to git's approach to
27 using, and only update it. This is similar to git's approach to
26 branching.
28 branching.
27 '''
29 '''
28
30
@@ -120,10 +122,10 b' def setcurrent(repo, mark):'
120 repo._bookmarkcurrent = mark
122 repo._bookmarkcurrent = mark
121
123
122 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None):
124 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None):
123 '''Mercurial bookmarks
125 '''track a line of development with movable markers
124
126
125 Bookmarks are pointers to certain commits that move when
127 Bookmarks are pointers to certain commits that move when
126 commiting. Bookmarks are local. They can be renamed, copied and
128 committing. Bookmarks are local. They can be renamed, copied and
127 deleted. It is possible to use bookmark names in 'hg merge' and
129 deleted. It is possible to use bookmark names in 'hg merge' and
128 'hg update' to merge and update respectively to a given bookmark.
130 'hg update' to merge and update respectively to a given bookmark.
129
131
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''Bugzilla integration
8 '''integrate Mercurial with a Bugzilla bug tracker
9
9
10 This hook extension adds comments on bugs in Bugzilla when changesets
10 This hook extension adds comments on bugs in Bugzilla when changesets
11 that refer to bugs by Bugzilla ID are seen. The hook does not change
11 that refer to bugs by Bugzilla ID are seen. The hook does not change
@@ -8,7 +8,7 b''
8 # This software may be used and distributed according to the terms of the
8 # This software may be used and distributed according to the terms of the
9 # GNU General Public License version 2, incorporated herein by reference.
9 # GNU General Public License version 2, incorporated herein by reference.
10
10
11 '''provides children command to show children changesets'''
11 '''display children changesets'''
12
12
13 from mercurial import cmdutil
13 from mercurial import cmdutil
14 from mercurial.commands import templateopts
14 from mercurial.commands import templateopts
@@ -6,7 +6,7 b''
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2, incorporated herein by reference.
7 # GNU General Public License version 2, incorporated herein by reference.
8
8
9 '''command to show certain statistics about revision history'''
9 '''display statistics about repository history'''
10
10
11 from mercurial.i18n import _
11 from mercurial.i18n import _
12 from mercurial import patch, cmdutil, util, templater
12 from mercurial import patch, cmdutil, util, templater
@@ -16,7 +16,7 b''
16 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
18
19 '''add color output to status, qseries, and diff-related commands
19 '''colorize output from some commands
20
20
21 This extension modifies the status command to add color to its output
21 This extension modifies the status command to add color to its output
22 to reflect file status, the qseries command to add color to reflect
22 to reflect file status, the qseries command to add color to reflect
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''converting foreign VCS repositories to Mercurial'''
8 '''import from foreign VCS repositories into Mercurial'''
9
9
10 import convcmd
10 import convcmd
11 import cvsps
11 import cvsps
@@ -103,7 +103,10 b' class converter_source(object):'
103 raise NotImplementedError()
103 raise NotImplementedError()
104
104
105 def gettags(self):
105 def gettags(self):
106 """Return the tags as a dictionary of name: revision"""
106 """Return the tags as a dictionary of name: revision
107
108 Tag names must be UTF-8 strings.
109 """
107 raise NotImplementedError()
110 raise NotImplementedError()
108
111
109 def recode(self, s, encoding=None):
112 def recode(self, s, encoding=None):
@@ -198,7 +201,9 b' class converter_sink(object):'
198
201
199 def puttags(self, tags):
202 def puttags(self, tags):
200 """Put tags into sink.
203 """Put tags into sink.
201 tags: {tagname: sink_rev_id, ...}"""
204
205 tags: {tagname: sink_rev_id, ...} where tagname is an UTF-8 string.
206 """
202 raise NotImplementedError()
207 raise NotImplementedError()
203
208
204 def setbranch(self, branch, pbranches):
209 def setbranch(self, branch, pbranches):
@@ -511,7 +511,9 b' def createchangeset(ui, log, fuzz=60, me'
511 e.comment == c.comment and
511 e.comment == c.comment and
512 e.author == c.author and
512 e.author == c.author and
513 e.branch == c.branch and
513 e.branch == c.branch and
514 e.branchpoints == c.branchpoints and
514 (not hasattr(e, 'branchpoints') or
515 not hasattr (c, 'branchpoints') or
516 e.branchpoints == c.branchpoints) and
515 ((c.date[0] + c.date[1]) <=
517 ((c.date[0] + c.date[1]) <=
516 (e.date[0] + e.date[1]) <=
518 (e.date[0] + e.date[1]) <=
517 (c.date[0] + c.date[1]) + fuzz) and
519 (c.date[0] + c.date[1]) + fuzz) and
@@ -1,19 +1,6 b''
1 # Subversion 1.4/1.5 Python API backend
1 # Subversion 1.4/1.5 Python API backend
2 #
2 #
3 # Copyright(C) 2007 Daniel Holth et al
3 # Copyright(C) 2007 Daniel Holth et al
4 #
5 # Configuration options:
6 #
7 # convert.svn.trunk
8 # Relative path to the trunk (default: "trunk")
9 # convert.svn.branches
10 # Relative path to tree of branches (default: "branches")
11 # convert.svn.tags
12 # Relative path to tree of tags (default: "tags")
13 #
14 # Set these in a hgrc, or on the command line as follows:
15 #
16 # hg convert --config convert.svn.trunk=wackoname [...]
17
4
18 import locale
5 import locale
19 import os
6 import os
@@ -23,7 +10,7 b' import cPickle as pickle'
23 import tempfile
10 import tempfile
24 import urllib
11 import urllib
25
12
26 from mercurial import strutil, util
13 from mercurial import strutil, util, encoding
27 from mercurial.i18n import _
14 from mercurial.i18n import _
28
15
29 # Subversion stuff. Works best with very recent Python SVN bindings
16 # Subversion stuff. Works best with very recent Python SVN bindings
@@ -63,6 +50,9 b' def geturl(path):'
63 path = os.path.normpath(os.path.abspath(path))
50 path = os.path.normpath(os.path.abspath(path))
64 if os.name == 'nt':
51 if os.name == 'nt':
65 path = '/' + util.normpath(path)
52 path = '/' + util.normpath(path)
53 # Module URL is later compared with the repository URL returned
54 # by svn API, which is UTF-8.
55 path = encoding.tolocal(path)
66 return 'file://%s' % urllib.quote(path)
56 return 'file://%s' % urllib.quote(path)
67 return path
57 return path
68
58
@@ -213,7 +203,6 b' class svn_source(converter_source):'
213 raise MissingTool(_('Subversion python bindings are too old, 1.4 '
203 raise MissingTool(_('Subversion python bindings are too old, 1.4 '
214 'or later required'))
204 'or later required'))
215
205
216 self.encoding = locale.getpreferredencoding()
217 self.lastrevs = {}
206 self.lastrevs = {}
218
207
219 latest = None
208 latest = None
@@ -240,7 +229,7 b' class svn_source(converter_source):'
240 self.rootmodule = self.module
229 self.rootmodule = self.module
241 self.commits = {}
230 self.commits = {}
242 self.paths = {}
231 self.paths = {}
243 self.uuid = svn.ra.get_uuid(self.ra).decode(self.encoding)
232 self.uuid = svn.ra.get_uuid(self.ra)
244 except SubversionException:
233 except SubversionException:
245 ui.traceback()
234 ui.traceback()
246 raise NoRepo("%s does not look like a Subversion repo" % self.url)
235 raise NoRepo("%s does not look like a Subversion repo" % self.url)
@@ -260,15 +249,10 b' class svn_source(converter_source):'
260 raise util.Abort(_('svn: start revision %s is not an integer')
249 raise util.Abort(_('svn: start revision %s is not an integer')
261 % self.startrev)
250 % self.startrev)
262
251
263 try:
264 self.get_blacklist()
265 except IOError:
266 pass
267
268 self.head = self.latest(self.module, latest)
252 self.head = self.latest(self.module, latest)
269 if not self.head:
253 if not self.head:
270 raise util.Abort(_('no revision found in module %s') %
254 raise util.Abort(_('no revision found in module %s')
271 self.module.encode(self.encoding))
255 % self.module)
272 self.last_changed = self.revnum(self.head)
256 self.last_changed = self.revnum(self.head)
273
257
274 self._changescache = None
258 self._changescache = None
@@ -328,8 +312,8 b' class svn_source(converter_source):'
328 self.module += '/' + trunk
312 self.module += '/' + trunk
329 self.head = self.latest(self.module, self.last_changed)
313 self.head = self.latest(self.module, self.last_changed)
330 if not self.head:
314 if not self.head:
331 raise util.Abort(_('no revision found in module %s') %
315 raise util.Abort(_('no revision found in module %s')
332 self.module.encode(self.encoding))
316 % self.module)
333
317
334 # First head in the list is the module's head
318 # First head in the list is the module's head
335 self.heads = [self.head]
319 self.heads = [self.head]
@@ -347,8 +331,7 b' class svn_source(converter_source):'
347 continue
331 continue
348 brevid = self.latest(module, self.last_changed)
332 brevid = self.latest(module, self.last_changed)
349 if not brevid:
333 if not brevid:
350 self.ui.note(_('ignoring empty branch %s\n') %
334 self.ui.note(_('ignoring empty branch %s\n') % branch)
351 branch.encode(self.encoding))
352 continue
335 continue
353 self.ui.note(_('found branch %s at %d\n') %
336 self.ui.note(_('found branch %s at %d\n') %
354 (branch, self.revnum(brevid)))
337 (branch, self.revnum(brevid)))
@@ -524,19 +507,14 b' class svn_source(converter_source):'
524 self.convertfp.write('%s %d\n' % (destrev, self.revnum(rev)))
507 self.convertfp.write('%s %d\n' % (destrev, self.revnum(rev)))
525 self.convertfp.flush()
508 self.convertfp.flush()
526
509
527 # -- helper functions --
528
529 def revid(self, revnum, module=None):
510 def revid(self, revnum, module=None):
530 if not module:
511 return 'svn:%s%s@%s' % (self.uuid, module or self.module, revnum)
531 module = self.module
532 return u"svn:%s%s@%s" % (self.uuid, module.decode(self.encoding),
533 revnum)
534
512
535 def revnum(self, rev):
513 def revnum(self, rev):
536 return int(rev.split('@')[-1])
514 return int(rev.split('@')[-1])
537
515
538 def revsplit(self, rev):
516 def revsplit(self, rev):
539 url, revnum = rev.encode(self.encoding).rsplit('@', 1)
517 url, revnum = rev.rsplit('@', 1)
540 revnum = int(revnum)
518 revnum = int(revnum)
541 parts = url.split('/', 1)
519 parts = url.split('/', 1)
542 uuid = parts.pop(0)[4:]
520 uuid = parts.pop(0)[4:]
@@ -593,25 +571,6 b' class svn_source(converter_source):'
593 return None
571 return None
594 return self.revid(dirent.created_rev, path)
572 return self.revid(dirent.created_rev, path)
595
573
596 def get_blacklist(self):
597 """Avoid certain revision numbers.
598 It is not uncommon for two nearby revisions to cancel each other
599 out, e.g. 'I copied trunk into a subdirectory of itself instead
600 of making a branch'. The converted repository is significantly
601 smaller if we ignore such revisions."""
602 self.blacklist = set()
603 blacklist = self.blacklist
604 for line in file("blacklist.txt", "r"):
605 if not line.startswith("#"):
606 try:
607 svn_rev = int(line.strip())
608 blacklist.add(svn_rev)
609 except ValueError:
610 pass # not an integer or a comment
611
612 def is_blacklisted(self, svn_rev):
613 return svn_rev in self.blacklist
614
615 def reparent(self, module):
574 def reparent(self, module):
616 """Reparent the svn transport and return the previous parent."""
575 """Reparent the svn transport and return the previous parent."""
617 if self.prevmodule == module:
576 if self.prevmodule == module:
@@ -639,11 +598,10 b' class svn_source(converter_source):'
639
598
640 for path, ent in paths:
599 for path, ent in paths:
641 entrypath = self.getrelpath(path)
600 entrypath = self.getrelpath(path)
642 entry = entrypath.decode(self.encoding)
643
601
644 kind = self._checkpath(entrypath, revnum)
602 kind = self._checkpath(entrypath, revnum)
645 if kind == svn.core.svn_node_file:
603 if kind == svn.core.svn_node_file:
646 entries.append(self.recode(entry))
604 entries.append(self.recode(entrypath))
647 if not ent.copyfrom_path or not parents:
605 if not ent.copyfrom_path or not parents:
648 continue
606 continue
649 # Copy sources not in parent revisions cannot be
607 # Copy sources not in parent revisions cannot be
@@ -656,102 +614,46 b' class svn_source(converter_source):'
656 continue
614 continue
657 self.ui.debug(_("copied to %s from %s@%s\n") %
615 self.ui.debug(_("copied to %s from %s@%s\n") %
658 (entrypath, copyfrom_path, ent.copyfrom_rev))
616 (entrypath, copyfrom_path, ent.copyfrom_rev))
659 copies[self.recode(entry)] = self.recode(copyfrom_path)
617 copies[self.recode(entrypath)] = self.recode(copyfrom_path)
660 elif kind == 0: # gone, but had better be a deleted *file*
618 elif kind == 0: # gone, but had better be a deleted *file*
661 self.ui.debug(_("gone from %s\n") % ent.copyfrom_rev)
619 self.ui.debug(_("gone from %s\n") % ent.copyfrom_rev)
662
620 pmodule, prevnum = self.revsplit(parents[0])[1:]
663 # if a branch is created but entries are removed in
621 parentpath = pmodule + "/" + entrypath
664 # the same changeset, get the right fromrev
622 self.ui.debug(_("entry %s\n") % parentpath)
665 # parents cannot be empty here, you cannot remove
666 # things from a root revision.
667 uuid, old_module, fromrev = self.revsplit(parents[0])
668
669 basepath = old_module + "/" + self.getrelpath(path)
670 entrypath = basepath
671
672 def lookup_parts(p):
673 rc = None
674 parts = p.split("/")
675 for i in range(len(parts)):
676 part = "/".join(parts[:i])
677 info = part, copyfrom.get(part, None)
678 if info[1] is not None:
679 self.ui.debug(_("found parent directory %s\n") % info[1])
680 rc = info
681 return rc
682
683 self.ui.debug(_("base, entry %s %s\n") % (basepath, entrypath))
684
685 frompath, froment = lookup_parts(entrypath) or (None, revnum - 1)
686
687 # need to remove fragment from lookup_parts and
688 # replace with copyfrom_path
689 if frompath is not None:
690 self.ui.debug(_("munge-o-matic\n"))
691 self.ui.debug(entrypath + '\n')
692 self.ui.debug(entrypath[len(frompath):] + '\n')
693 entrypath = froment.copyfrom_path + entrypath[len(frompath):]
694 fromrev = froment.copyfrom_rev
695 self.ui.debug(_("info: %s %s %s %s\n") % (frompath, froment, ent, entrypath))
696
623
697 # We can avoid the reparent calls if the module has
624 # We can avoid the reparent calls if the module has
698 # not changed but it probably does not worth the pain.
625 # not changed but it probably does not worth the pain.
699 prevmodule = self.reparent('')
626 prevmodule = self.reparent('')
700 fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev)
627 fromkind = svn.ra.check_path(self.ra, parentpath.strip('/'), prevnum)
701 self.reparent(prevmodule)
628 self.reparent(prevmodule)
702
629
703 if fromkind == svn.core.svn_node_file: # a deleted file
630 if fromkind == svn.core.svn_node_file:
704 entries.append(self.recode(entry))
631 entries.append(self.recode(entrypath))
705 elif fromkind == svn.core.svn_node_dir:
632 elif fromkind == svn.core.svn_node_dir:
706 # print "Deleted/moved non-file:", revnum, path, ent
707 # children = self._find_children(path, revnum - 1)
708 # print ("find children %s@%d from %d action %s" %
709 # (path, revnum, ent.copyfrom_rev, ent.action))
710 # Sometimes this is tricky. For example: in
711 # The Subversion Repository revision 6940 a dir
712 # was copied and one of its files was deleted
713 # from the new location in the same commit. This
714 # code can't deal with that yet.
715 if ent.action == 'C':
633 if ent.action == 'C':
716 children = self._find_children(path, fromrev)
634 children = self._find_children(path, prevnum)
717 else:
635 else:
718 oroot = entrypath.strip('/')
636 oroot = parentpath.strip('/')
719 nroot = path.strip('/')
637 nroot = path.strip('/')
720 children = self._find_children(oroot, fromrev)
638 children = self._find_children(oroot, prevnum)
721 children = [s.replace(oroot,nroot) for s in children]
639 children = [s.replace(oroot,nroot) for s in children]
722 # Mark all [files, not directories] as deleted.
640
723 for child in children:
641 for child in children:
724 # Can we move a child directory and its
642 childpath = self.getrelpath("/" + child, pmodule)
725 # parent in the same commit? (probably can). Could
643 if not childpath:
726 # cause problems if instead of revnum -1,
644 continue
727 # we have to look in (copyfrom_path, revnum - 1)
645 if childpath in copies:
728 entrypath = self.getrelpath("/" + child, module=old_module)
646 del copies[childpath]
729 if entrypath:
647 entries.append(childpath)
730 entry = self.recode(entrypath.decode(self.encoding))
731 if entry in copies:
732 # deleted file within a copy
733 del copies[entry]
734 else:
735 entries.append(entry)
736 else:
648 else:
737 self.ui.debug(_('unknown path in revision %d: %s\n') % \
649 self.ui.debug(_('unknown path in revision %d: %s\n') % \
738 (revnum, path))
650 (revnum, path))
739 elif kind == svn.core.svn_node_dir:
651 elif kind == svn.core.svn_node_dir:
740 # Should probably synthesize normal file entries
741 # and handle as above to clean up copy/rename handling.
742
743 # If the directory just had a prop change,
652 # If the directory just had a prop change,
744 # then we shouldn't need to look for its children.
653 # then we shouldn't need to look for its children.
745 if ent.action == 'M':
654 if ent.action == 'M':
746 continue
655 continue
747
656
748 # Also this could create duplicate entries. Not sure
749 # whether this will matter. Maybe should make entries a set.
750 # print "Changed directory", revnum, path, ent.action, \
751 # ent.copyfrom_path, ent.copyfrom_rev
752 # This will fail if a directory was copied
753 # from another branch and then some of its files
754 # were deleted in the same transaction.
755 children = sorted(self._find_children(path, revnum))
657 children = sorted(self._find_children(path, revnum))
756 for child in children:
658 for child in children:
757 # Can we move a child directory and its
659 # Can we move a child directory and its
@@ -759,15 +661,13 b' class svn_source(converter_source):'
759 # cause problems if instead of revnum -1,
661 # cause problems if instead of revnum -1,
760 # we have to look in (copyfrom_path, revnum - 1)
662 # we have to look in (copyfrom_path, revnum - 1)
761 entrypath = self.getrelpath("/" + child)
663 entrypath = self.getrelpath("/" + child)
762 # print child, self.module, entrypath
763 if entrypath:
664 if entrypath:
764 # Need to filter out directories here...
665 # Need to filter out directories here...
765 kind = self._checkpath(entrypath, revnum)
666 kind = self._checkpath(entrypath, revnum)
766 if kind != svn.core.svn_node_dir:
667 if kind != svn.core.svn_node_dir:
767 entries.append(self.recode(entrypath))
668 entries.append(self.recode(entrypath))
768
669
769 # Copies here (must copy all from source) Probably not
670 # Handle directory copies
770 # a real problem for us if source does not exist
771 if not ent.copyfrom_path or not parents:
671 if not ent.copyfrom_path or not parents:
772 continue
672 continue
773 # Copy sources not in parent revisions cannot be
673 # Copy sources not in parent revisions cannot be
@@ -775,8 +675,7 b' class svn_source(converter_source):'
775 pmodule, prevnum = self.revsplit(parents[0])[1:]
675 pmodule, prevnum = self.revsplit(parents[0])[1:]
776 if ent.copyfrom_rev < prevnum:
676 if ent.copyfrom_rev < prevnum:
777 continue
677 continue
778 copyfrompath = ent.copyfrom_path.decode(self.encoding)
678 copyfrompath = self.getrelpath(ent.copyfrom_path, pmodule)
779 copyfrompath = self.getrelpath(copyfrompath, pmodule)
780 if not copyfrompath:
679 if not copyfrompath:
781 continue
680 continue
782 copyfrom[path] = ent
681 copyfrom[path] = ent
@@ -788,10 +687,9 b' class svn_source(converter_source):'
788 entrypath = self.getrelpath("/" + child, pmodule)
687 entrypath = self.getrelpath("/" + child, pmodule)
789 if not entrypath:
688 if not entrypath:
790 continue
689 continue
791 entry = entrypath.decode(self.encoding)
690 copytopath = path + entrypath[len(copyfrompath):]
792 copytopath = path + entry[len(copyfrompath):]
793 copytopath = self.getrelpath(copytopath)
691 copytopath = self.getrelpath(copytopath)
794 copies[self.recode(copytopath)] = self.recode(entry, pmodule)
692 copies[self.recode(copytopath)] = self.recode(entrypath)
795
693
796 return (list(set(entries)), copies)
694 return (list(set(entries)), copies)
797
695
@@ -862,7 +760,7 b' class svn_source(converter_source):'
862 desc=log,
760 desc=log,
863 parents=parents,
761 parents=parents,
864 branch=branch,
762 branch=branch,
865 rev=rev.encode('utf-8'))
763 rev=rev)
866
764
867 self.commits[rev] = cset
765 self.commits[rev] = cset
868 # The parents list is *shared* among self.paths and the
766 # The parents list is *shared* among self.paths and the
@@ -886,10 +784,6 b' class svn_source(converter_source):'
886 if revnum < self.startrev:
784 if revnum < self.startrev:
887 lastonbranch = True
785 lastonbranch = True
888 break
786 break
889 if self.is_blacklisted(revnum):
890 self.ui.note(_('skipping blacklisted revision %d\n')
891 % revnum)
892 continue
893 if not paths:
787 if not paths:
894 self.ui.debug(_('revision %d has no entries\n') % revnum)
788 self.ui.debug(_('revision %d has no entries\n') % revnum)
895 continue
789 continue
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''pulling, updating and merging in one command'''
8 '''pull, update and merge in one command'''
9
9
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial.node import nullid, short
11 from mercurial.node import nullid, short
@@ -3,7 +3,7 b''
3 # This software may be used and distributed according to the terms of the
3 # This software may be used and distributed according to the terms of the
4 # GNU General Public License version 2, incorporated herein by reference.
4 # GNU General Public License version 2, incorporated herein by reference.
5
5
6 '''GnuPG signing extension for Mercurial'''
6 '''sign and verify changesets'''
7
7
8 import os, tempfile, binascii
8 import os, tempfile, binascii
9 from mercurial import util, commands, match
9 from mercurial import util, commands, match
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''show revision graphs in terminal windows
8 '''show revision graphs in terminals
9
9
10 This extension adds a --graph option to the incoming, outgoing and log
10 This extension adds a --graph option to the incoming, outgoing and log
11 commands. When this options is given, an ASCII representation of the
11 commands. When this options is given, an ASCII representation of the
@@ -1,7 +1,7 b''
1 # Copyright (C) 2007-8 Brendan Cully <brendan@kublai.com>
1 # Copyright (C) 2007-8 Brendan Cully <brendan@kublai.com>
2 # Published under the GNU GPL
2 # Published under the GNU GPL
3
3
4 """CIA notification
4 """integrate Mercurial with a CIA notification service
5
5
6 This is meant to be run as a changegroup or incoming hook.
6 This is meant to be run as a changegroup or incoming hook.
7 To configure it, set the following options in your hgrc:
7 To configure it, set the following options in your hgrc:
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''browsing the repository in a graphical way
8 '''browse the repository in a graphical way
9
9
10 The hgk extension allows browsing the history of a repository in a
10 The hgk extension allows browsing the history of a repository in a
11 graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not
11 graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not
@@ -8,7 +8,7 b''
8 # The original module was split in an interface and an implementation
8 # The original module was split in an interface and an implementation
9 # file to defer pygments loading and speedup extension setup.
9 # file to defer pygments loading and speedup extension setup.
10
10
11 """syntax highlighting in hgweb, based on Pygments
11 """syntax highlighting for hgweb
12
12
13 It depends on the Pygments syntax highlighting library:
13 It depends on the Pygments syntax highlighting library:
14 http://pygments.org/
14 http://pygments.org/
@@ -6,8 +6,7 b''
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2, incorporated herein by reference.
7 # GNU General Public License version 2, incorporated herein by reference.
8
8
9 '''inotify-based status acceleration for Linux systems
9 '''accelerate status report using system level services'''
10 '''
11
10
12 # todo: socket permissions
11 # todo: socket permissions
13
12
@@ -26,7 +26,7 b''
26 #
26 #
27 # Run "hg help keyword" and "hg kwdemo" to get info on configuration.
27 # Run "hg help keyword" and "hg kwdemo" to get info on configuration.
28
28
29 '''keyword expansion in tracked files
29 '''expand keywords in tracked files
30
30
31 This extension expands RCS/CVS-like or self-customized $Keywords$ in
31 This extension expands RCS/CVS-like or self-customized $Keywords$ in
32 tracked text files selected by your configuration.
32 tracked text files selected by your configuration.
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''patch management and development
8 '''work with a stack of patches
9
9
10 This extension lets you work with a stack of patches in a Mercurial
10 This extension lets you work with a stack of patches in a Mercurial
11 repository. It manages two stacks of patches - all known patches, and
11 repository. It manages two stacks of patches - all known patches, and
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''hook extension to email notifications on commits/pushes
8 '''send e-mail notifications for commits/pushes
9
9
10 Subscriptions can be managed through hgrc. Default mode is to print
10 Subscriptions can be managed through hgrc. Default mode is to print
11 messages to stdout, for testing and configuring.
11 messages to stdout, for testing and configuring.
@@ -12,7 +12,7 b''
12 #
12 #
13 # Run "hg help pager" to get info on configuration.
13 # Run "hg help pager" to get info on configuration.
14
14
15 '''browse command output with external pager
15 '''browse command output with an external pager
16
16
17 To set the pager that should be used, set the application variable:
17 To set the pager that should be used, set the application variable:
18
18
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''use suffixes to refer to ancestor revisions
8 '''interpret suffixes to refer to ancestor revisions
9
9
10 This extension allows you to use git-style suffixes to refer to the
10 This extension allows you to use git-style suffixes to refer to the
11 ancestors of a specific revision.
11 ancestors of a specific revision.
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''sending Mercurial changesets as a series of patch emails
8 '''send Mercurial changesets as a series of patch e-mails
9
9
10 The series is started off with a "[PATCH 0 of N]" introduction, which
10 The series is started off with a "[PATCH 0 of N]" introduction, which
11 describes the series as a whole.
11 describes the series as a whole.
@@ -23,7 +23,7 b''
23 # along with this program; if not, write to the Free Software
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
25
26 '''enable removing untracked files only'''
26 '''delete files not tracked from the working directory'''
27
27
28 from mercurial import util, commands, cmdutil
28 from mercurial import util, commands, cmdutil
29 from mercurial.i18n import _
29 from mercurial.i18n import _
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''interactive change selection during commit or qrefresh'''
8 '''interactively select which sets of changes to commit/qrefresh'''
9
9
10 from mercurial.i18n import gettext, _
10 from mercurial.i18n import gettext, _
11 from mercurial import cmdutil, commands, extensions, hg, mdiff, patch
11 from mercurial import cmdutil, commands, extensions, hg, mdiff, patch
@@ -3,7 +3,7 b''
3 # This software may be used and distributed according to the terms of the
3 # This software may be used and distributed according to the terms of the
4 # GNU General Public License version 2, incorporated herein by reference.
4 # GNU General Public License version 2, incorporated herein by reference.
5
5
6 '''provides the hg share command'''
6 '''share a common history between several working directories'''
7
7
8 import os
8 import os
9 from mercurial.i18n import _
9 from mercurial.i18n import _
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''patch transplanting tool
8 '''transplant changesets from another branch
9
9
10 This extension allows you to transplant patches from another branch.
10 This extension allows you to transplant patches from another branch.
11
11
@@ -9,7 +9,7 b''
9 # GNU General Public License version 2, incorporated herein by reference.
9 # GNU General Public License version 2, incorporated herein by reference.
10 #
10 #
11
11
12 """allow to use MBCS path with problematic encoding.
12 '''allow the use of MBCS paths with problematic encoding
13
13
14 Some MBCS encodings are not good for some path operations (i.e.
14 Some MBCS encodings are not good for some path operations (i.e.
15 splitting path, case conversion, etc.) with its encoded bytes. We call
15 splitting path, case conversion, etc.) with its encoded bytes. We call
@@ -36,8 +36,7 b' Note that there are some limitations on '
36 Path encoding conversion are done between Unicode and
36 Path encoding conversion are done between Unicode and
37 encoding.encoding which is decided by Mercurial from current locale
37 encoding.encoding which is decided by Mercurial from current locale
38 setting or HGENCODING.
38 setting or HGENCODING.
39
39 '''
40 """
41
40
42 import os
41 import os
43 from mercurial.i18n import _
42 from mercurial.i18n import _
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''LF <-> CRLF/CR translation utilities
8 '''perform automatic newline conversion
9
9
10 To perform automatic newline conversion, use:
10 To perform automatic newline conversion, use:
11
11
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 '''zeroconf support for Mercurial repositories
8 '''discover and advertise repositories on the local network
9
9
10 Zeroconf enabled repositories will be announced in a network without
10 Zeroconf enabled repositories will be announced in a network without
11 the need to configure a server or a service. They can be discovered
11 the need to configure a server or a service. They can be discovered
@@ -5,7 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 import imp, os, sys
8 import imp, os
9 import util, cmdutil, help
9 import util, cmdutil, help
10 from i18n import _, gettext
10 from i18n import _, gettext
11
11
@@ -5,6 +5,7 b''
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, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 import textwrap
8 from i18n import _
9 from i18n import _
9 import extensions
10 import extensions
10
11
@@ -45,21 +46,27 b' def listexts(header, exts, maxlength):'
45 return ''
46 return ''
46 result = '\n%s\n\n' % header
47 result = '\n%s\n\n' % header
47 for name, desc in sorted(exts.iteritems()):
48 for name, desc in sorted(exts.iteritems()):
48 result += ' %s %s\n' % (name.ljust(maxlength), desc)
49 # wrap desc at 70 characters, just like the main help texts
50 desc = textwrap.wrap(desc, width=70 - maxlength - 4)
51 pad = '\n' + ' ' * (maxlength + 4)
52 result += ' %s %s\n' % (name.ljust(maxlength),
53 pad.join(desc))
49 return result
54 return result
50
55
51 def extshelp():
56 def extshelp():
52 doc = _(r'''
57 doc = _(r'''
53 Mercurial has a mechanism for adding new features through the
58 Mercurial has the ability to add new features through the use of
54 use of extensions. Extensions may bring new commands, or new
59 extensions. Extensions may add new commands, add options to
55 hooks, or change Mercurial's behavior.
60 existing commands, change the default behavior of commands, or
61 implement hooks.
56
62
57 Extensions are not loaded by default for a variety of reasons,
63 Extensions are not loaded by default for a variety of reasons:
58 they may be meant for advanced users or provide potentially
64 they can increase startup overhead; they may be meant for
59 dangerous commands (e.g. mq and rebase allow history to be
65 advanced usage only; they may provide potentially dangerous
60 rewritten), they might not be ready for prime-time yet, or
66 abilities (such as letting you destroy or modify history); they
61 they may alter Mercurial's behavior. It is thus up to the user
67 might not be ready for prime time; or they may alter some
62 to activate extensions as desired.
68 usual behaviors of stock Mercurial. It is thus up to the user to
69 activate extensions as needed.
63
70
64 To enable the "foo" extension, either shipped with Mercurial
71 To enable the "foo" extension, either shipped with Mercurial
65 or in the Python search path, create an entry for it in your
72 or in the Python search path, create an entry for it in your
@@ -77,7 +84,7 b' def extshelp():'
77 scope, prepend its path with !:
84 scope, prepend its path with !:
78
85
79 [extensions]
86 [extensions]
80 # disabling extension bar residing in /ext/path
87 # disabling extension bar residing in /path/to/extension/bar.py
81 hgext.bar = !/path/to/extension/bar.py
88 hgext.bar = !/path/to/extension/bar.py
82 # ditto, but no path was supplied for extension baz
89 # ditto, but no path was supplied for extension baz
83 hgext.baz = !
90 hgext.baz = !
@@ -228,7 +228,7 b' def readgitpatch(lr):'
228
228
229 return (dopatch, gitpatches)
229 return (dopatch, gitpatches)
230
230
231 class linereader:
231 class linereader(object):
232 # simple class to allow pushing lines back into the input stream
232 # simple class to allow pushing lines back into the input stream
233 def __init__(self, fp, textmode=False):
233 def __init__(self, fp, textmode=False):
234 self.fp = fp
234 self.fp = fp
@@ -1,6 +1,6 b''
1 SVN-fs-dump-format-version: 2
1 SVN-fs-dump-format-version: 2
2
2
3 UUID: 7b60030a-5a1f-4344-a009-73f0c1c2adf2
3 UUID: 3c3c228a-b3dd-467c-a766-896f4b7cd0af
4
4
5 Revision-number: 0
5 Revision-number: 0
6 Prop-content-length: 56
6 Prop-content-length: 56
@@ -9,7 +9,7 b' Content-length: 56'
9 K 8
9 K 8
10 svn:date
10 svn:date
11 V 27
11 V 27
12 2008-12-06T12:47:52.296168Z
12 2009-06-21T12:38:53.023457Z
13 PROPS-END
13 PROPS-END
14
14
15 Revision-number: 1
15 Revision-number: 1
@@ -27,7 +27,7 b' pmezard'
27 K 8
27 K 8
28 svn:date
28 svn:date
29 V 27
29 V 27
30 2008-12-06T12:47:52.342238Z
30 2009-06-21T12:38:53.111986Z
31 PROPS-END
31 PROPS-END
32
32
33 Node-path: branches
33 Node-path: branches
@@ -72,7 +72,7 b' pmezard'
72 K 8
72 K 8
73 svn:date
73 svn:date
74 V 27
74 V 27
75 2008-12-06T12:47:53.190046Z
75 2009-06-21T12:38:54.182594Z
76 PROPS-END
76 PROPS-END
77
77
78 Node-path: branches/notinbranch
78 Node-path: branches/notinbranch
@@ -81,6 +81,7 b' Node-action: add'
81 Prop-content-length: 10
81 Prop-content-length: 10
82 Text-content-length: 2
82 Text-content-length: 2
83 Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
83 Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
84 Text-content-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
84 Content-length: 12
85 Content-length: 12
85
86
86 PROPS-END
87 PROPS-END
@@ -93,6 +94,7 b' Node-action: add'
93 Prop-content-length: 10
94 Prop-content-length: 10
94 Text-content-length: 2
95 Text-content-length: 2
95 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
96 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
97 Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
96 Content-length: 12
98 Content-length: 12
97
99
98 PROPS-END
100 PROPS-END
@@ -105,6 +107,7 b' Node-action: add'
105 Prop-content-length: 10
107 Prop-content-length: 10
106 Text-content-length: 2
108 Text-content-length: 2
107 Text-content-md5: 3b5d5c3712955042212316173ccf37be
109 Text-content-md5: 3b5d5c3712955042212316173ccf37be
110 Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
108 Content-length: 12
111 Content-length: 12
109
112
110 PROPS-END
113 PROPS-END
@@ -117,20 +120,43 b' Node-action: add'
117 Prop-content-length: 10
120 Prop-content-length: 10
118 Text-content-length: 2
121 Text-content-length: 2
119 Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
122 Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
123 Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
120 Content-length: 12
124 Content-length: 12
121
125
122 PROPS-END
126 PROPS-END
123 c
127 c
124
128
125
129
130 Node-path: trunk/dir
131 Node-kind: dir
132 Node-action: add
133 Prop-content-length: 10
134 Content-length: 10
135
136 PROPS-END
137
138
139 Node-path: trunk/dir/e
140 Node-kind: file
141 Node-action: add
142 Prop-content-length: 10
143 Text-content-length: 2
144 Text-content-md5: 9ffbf43126e33be52cd2bf7e01d627f9
145 Text-content-sha1: 094e3afb2fe8dfe82f63731cdcd3b999f4856cff
146 Content-length: 12
147
148 PROPS-END
149 e
150
151
126 Revision-number: 3
152 Revision-number: 3
127 Prop-content-length: 124
153 Prop-content-length: 132
128 Content-length: 124
154 Content-length: 132
129
155
130 K 7
156 K 7
131 svn:log
157 svn:log
132 V 22
158 V 30
133 branch trunk, remove c
159 branch trunk, remove c and dir
134 K 10
160 K 10
135 svn:author
161 svn:author
136 V 7
162 V 7
@@ -138,38 +164,22 b' pmezard'
138 K 8
164 K 8
139 svn:date
165 svn:date
140 V 27
166 V 27
141 2008-12-06T12:47:55.188535Z
167 2009-06-21T12:38:57.166484Z
142 PROPS-END
168 PROPS-END
143
169
144 Node-path: branches/old
170 Node-path: branches/old
145 Node-kind: dir
171 Node-kind: dir
146 Node-action: add
172 Node-action: add
147 Node-copyfrom-rev: 1
173 Node-copyfrom-rev: 2
148 Node-copyfrom-path: trunk
174 Node-copyfrom-path: trunk
149 Prop-content-length: 34
150 Content-length: 34
151
152 K 13
153 svn:mergeinfo
154 V 0
155
156 PROPS-END
157
175
158
176
159 Node-path: branches/old/a
177 Node-path: branches/old/dir
160 Node-kind: file
178 Node-action: delete
161 Node-action: add
162 Node-copyfrom-rev: 2
163 Node-copyfrom-path: trunk/a
164 Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
165
179
166
180
167 Node-path: branches/old/b
181 Node-path: branches/old/c
168 Node-kind: file
182 Node-action: delete
169 Node-action: add
170 Node-copyfrom-rev: 2
171 Node-copyfrom-path: trunk/b
172 Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
173
183
174
184
175 Revision-number: 4
185 Revision-number: 4
@@ -187,7 +197,7 b' pmezard'
187 K 8
197 K 8
188 svn:date
198 svn:date
189 V 27
199 V 27
190 2008-12-06T12:47:57.146347Z
200 2009-06-21T12:38:59.084420Z
191 PROPS-END
201 PROPS-END
192
202
193 Node-path: trunk/a
203 Node-path: trunk/a
@@ -195,6 +205,7 b' Node-kind: file'
195 Node-action: change
205 Node-action: change
196 Text-content-length: 4
206 Text-content-length: 4
197 Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
207 Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
208 Text-content-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
198 Content-length: 4
209 Content-length: 4
199
210
200 a
211 a
@@ -216,7 +227,7 b' pmezard'
216 K 8
227 K 8
217 svn:date
228 svn:date
218 V 27
229 V 27
219 2008-12-06T12:47:58.150124Z
230 2009-06-21T12:39:00.093201Z
220 PROPS-END
231 PROPS-END
221
232
222 Node-path: branches/old/b
233 Node-path: branches/old/b
@@ -224,6 +235,7 b' Node-kind: file'
224 Node-action: change
235 Node-action: change
225 Text-content-length: 4
236 Text-content-length: 4
226 Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
237 Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
238 Text-content-sha1: f6980469e74f7125178e88ec571e06fe6ce86e95
227 Content-length: 4
239 Content-length: 4
228
240
229 b
241 b
@@ -245,7 +257,7 b' pmezard'
245 K 8
257 K 8
246 svn:date
258 svn:date
247 V 27
259 V 27
248 2008-12-06T12:48:00.161336Z
260 2009-06-21T12:39:02.078633Z
249 PROPS-END
261 PROPS-END
250
262
251 Node-path: branches/old/c
263 Node-path: branches/old/c
@@ -254,16 +266,12 b' Node-action: add'
254 Node-copyfrom-rev: 3
266 Node-copyfrom-rev: 3
255 Node-copyfrom-path: trunk/b
267 Node-copyfrom-path: trunk/b
256 Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
268 Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
257 Prop-content-length: 34
269 Text-copy-source-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
258 Text-content-length: 4
270 Text-content-length: 4
259 Text-content-md5: 33cb6785d50937d8d307ebb66d6259a7
271 Text-content-md5: 33cb6785d50937d8d307ebb66d6259a7
260 Content-length: 38
272 Text-content-sha1: 7a6478264aa11a0f4befef356c03e83f2b1f6eba
273 Content-length: 4
261
274
262 K 13
263 svn:mergeinfo
264 V 0
265
266 PROPS-END
267 b
275 b
268 c
276 c
269
277
@@ -287,7 +295,7 b' pmezard'
287 K 8
295 K 8
288 svn:date
296 svn:date
289 V 27
297 V 27
290 2008-12-06T12:48:01.153724Z
298 2009-06-21T12:39:03.065537Z
291 PROPS-END
299 PROPS-END
292
300
293 Node-path: branches/old/b
301 Node-path: branches/old/b
@@ -295,6 +303,7 b' Node-kind: file'
295 Node-action: change
303 Node-action: change
296 Text-content-length: 6
304 Text-content-length: 6
297 Text-content-md5: cdcfb41554e2d092c13f5e6839e63577
305 Text-content-md5: cdcfb41554e2d092c13f5e6839e63577
306 Text-content-sha1: 17ac58cabedebea235d1b5605531d5b1559797e9
298 Content-length: 6
307 Content-length: 6
299
308
300 b
309 b
@@ -317,7 +326,7 b' pmezard'
317 K 8
326 K 8
318 svn:date
327 svn:date
319 V 27
328 V 27
320 2008-12-06T12:48:04.150915Z
329 2009-06-21T12:39:06.070275Z
321 PROPS-END
330 PROPS-END
322
331
323 Node-path: branches/old2
332 Node-path: branches/old2
@@ -346,7 +355,7 b' pmezard'
346 K 8
355 K 8
347 svn:date
356 svn:date
348 V 27
357 V 27
349 2008-12-06T12:48:06.149560Z
358 2009-06-21T12:39:08.082539Z
350 PROPS-END
359 PROPS-END
351
360
352 Node-path: branches/old
361 Node-path: branches/old
@@ -375,7 +384,7 b' pmezard'
375 K 8
384 K 8
376 svn:date
385 svn:date
377 V 27
386 V 27
378 2008-12-06T12:48:07.268498Z
387 2009-06-21T12:39:09.073290Z
379 PROPS-END
388 PROPS-END
380
389
381 Node-path: trunk/a
390 Node-path: trunk/a
@@ -383,6 +392,7 b' Node-kind: file'
383 Node-action: change
392 Node-action: change
384 Text-content-length: 2
393 Text-content-length: 2
385 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
394 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
395 Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
386 Content-length: 2
396 Content-length: 2
387
397
388 a
398 a
@@ -403,7 +413,7 b' pmezard'
403 K 8
413 K 8
404 svn:date
414 svn:date
405 V 27
415 V 27
406 2008-12-06T12:48:09.151702Z
416 2009-06-21T12:39:11.070264Z
407 PROPS-END
417 PROPS-END
408
418
409 Node-path: branches/old3
419 Node-path: branches/old3
@@ -1,6 +1,6 b''
1 SVN-fs-dump-format-version: 2
1 SVN-fs-dump-format-version: 2
2
2
3 UUID: 0682b859-320d-4a69-a164-a7cab5695072
3 UUID: 9de99ecc-876b-46e5-bc59-bff9b2b58b1e
4
4
5 Revision-number: 0
5 Revision-number: 0
6 Prop-content-length: 56
6 Prop-content-length: 56
@@ -9,7 +9,7 b' Content-length: 56'
9 K 8
9 K 8
10 svn:date
10 svn:date
11 V 27
11 V 27
12 2008-12-06T13:33:36.768573Z
12 2009-06-21T14:32:26.678698Z
13 PROPS-END
13 PROPS-END
14
14
15 Revision-number: 1
15 Revision-number: 1
@@ -27,7 +27,7 b' pmezard'
27 K 8
27 K 8
28 svn:date
28 svn:date
29 V 27
29 V 27
30 2008-12-06T13:33:37.083146Z
30 2009-06-21T14:32:27.278689Z
31 PROPS-END
31 PROPS-END
32
32
33 Node-path: trunk
33 Node-path: trunk
@@ -45,6 +45,7 b' Node-action: add'
45 Prop-content-length: 10
45 Prop-content-length: 10
46 Text-content-length: 2
46 Text-content-length: 2
47 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
47 Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
48 Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
48 Content-length: 12
49 Content-length: 12
49
50
50 PROPS-END
51 PROPS-END
@@ -66,6 +67,7 b' Node-action: add'
66 Prop-content-length: 10
67 Prop-content-length: 10
67 Text-content-length: 2
68 Text-content-length: 2
68 Text-content-md5: 3b5d5c3712955042212316173ccf37be
69 Text-content-md5: 3b5d5c3712955042212316173ccf37be
70 Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
69 Content-length: 12
71 Content-length: 12
70
72
71 PROPS-END
73 PROPS-END
@@ -78,6 +80,7 b' Node-action: add'
78 Prop-content-length: 10
80 Prop-content-length: 10
79 Text-content-length: 2
81 Text-content-length: 2
80 Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
82 Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
83 Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
81 Content-length: 12
84 Content-length: 12
82
85
83 PROPS-END
86 PROPS-END
@@ -99,6 +102,7 b' Node-action: add'
99 Prop-content-length: 10
102 Prop-content-length: 10
100 Text-content-length: 2
103 Text-content-length: 2
101 Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
104 Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
105 Text-content-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
102 Content-length: 12
106 Content-length: 12
103
107
104 PROPS-END
108 PROPS-END
@@ -120,7 +124,7 b' pmezard'
120 K 8
124 K 8
121 svn:date
125 svn:date
122 V 27
126 V 27
123 2008-12-06T13:33:38.152773Z
127 2009-06-21T14:32:28.312955Z
124 PROPS-END
128 PROPS-END
125
129
126 Node-path: trunk/a
130 Node-path: trunk/a
@@ -128,6 +132,7 b' Node-kind: file'
128 Node-action: change
132 Node-action: change
129 Text-content-length: 4
133 Text-content-length: 4
130 Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
134 Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
135 Text-content-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
131 Content-length: 4
136 Content-length: 4
132
137
133 a
138 a
@@ -139,6 +144,7 b' Node-kind: file'
139 Node-action: change
144 Node-action: change
140 Text-content-length: 4
145 Text-content-length: 4
141 Text-content-md5: 63fad9092ad37713ebe26b3193f89c41
146 Text-content-md5: 63fad9092ad37713ebe26b3193f89c41
147 Text-content-sha1: ccfb93b7bac6f1520f0adc0eebc2cafe9da80f42
142 Content-length: 4
148 Content-length: 4
143
149
144 c
150 c
@@ -160,7 +166,7 b' pmezard'
160 K 8
166 K 8
161 svn:date
167 svn:date
162 V 27
168 V 27
163 2008-12-06T13:33:39.146388Z
169 2009-06-21T14:32:29.183467Z
164 PROPS-END
170 PROPS-END
165
171
166 Node-path: subproject
172 Node-path: subproject
@@ -189,7 +195,7 b' pmezard'
189 K 8
195 K 8
190 svn:date
196 svn:date
191 V 27
197 V 27
192 2008-12-06T13:33:40.179944Z
198 2009-06-21T14:32:30.300975Z
193 PROPS-END
199 PROPS-END
194
200
195 Node-path: subproject/trunk
201 Node-path: subproject/trunk
@@ -216,7 +222,7 b' pmezard'
216 K 8
222 K 8
217 svn:date
223 svn:date
218 V 27
224 V 27
219 2008-12-06T13:33:41.184505Z
225 2009-06-21T14:32:31.354398Z
220 PROPS-END
226 PROPS-END
221
227
222 Node-path: subproject/branches
228 Node-path: subproject/branches
@@ -243,7 +249,7 b' pmezard'
243 K 8
249 K 8
244 svn:date
250 svn:date
245 V 27
251 V 27
246 2008-12-06T13:33:42.153312Z
252 2009-06-21T14:32:32.121901Z
247 PROPS-END
253 PROPS-END
248
254
249 Node-path: subproject/trunk/d1
255 Node-path: subproject/trunk/d1
@@ -272,7 +278,7 b' pmezard'
272 K 8
278 K 8
273 svn:date
279 svn:date
274 V 27
280 V 27
275 2008-12-06T13:33:42.206313Z
281 2009-06-21T14:32:32.317815Z
276 PROPS-END
282 PROPS-END
277
283
278 Node-path: subproject/trunk/d2
284 Node-path: subproject/trunk/d2
@@ -301,7 +307,7 b' pmezard'
301 K 8
307 K 8
302 svn:date
308 svn:date
303 V 27
309 V 27
304 2008-12-06T13:33:43.182355Z
310 2009-06-21T14:32:33.418320Z
305 PROPS-END
311 PROPS-END
306
312
307 Node-path: subproject/trunk/d1/b
313 Node-path: subproject/trunk/d1/b
@@ -309,6 +315,7 b' Node-kind: file'
309 Node-action: change
315 Node-action: change
310 Text-content-length: 4
316 Text-content-length: 4
311 Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
317 Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
318 Text-content-sha1: f6980469e74f7125178e88ec571e06fe6ce86e95
312 Content-length: 4
319 Content-length: 4
313
320
314 b
321 b
@@ -334,7 +341,7 b' pmezard'
334 K 8
341 K 8
335 svn:date
342 svn:date
336 V 27
343 V 27
337 2008-12-06T13:33:44.153682Z
344 2009-06-21T14:32:34.126542Z
338 PROPS-END
345 PROPS-END
339
346
340 Node-path: subproject/branches/d1
347 Node-path: subproject/branches/d1
@@ -363,7 +370,7 b' pmezard'
363 K 8
370 K 8
364 svn:date
371 svn:date
365 V 27
372 V 27
366 2008-12-06T13:33:44.298011Z
373 2009-06-21T14:32:34.436015Z
367 PROPS-END
374 PROPS-END
368
375
369 Node-path: subproject/trunk/d
376 Node-path: subproject/trunk/d
@@ -372,6 +379,7 b' Node-action: add'
372 Node-copyfrom-rev: 7
379 Node-copyfrom-rev: 7
373 Node-copyfrom-path: subproject/trunk/d2/d
380 Node-copyfrom-path: subproject/trunk/d2/d
374 Text-copy-source-md5: e29311f6f1bf1af907f9ef9f44b8328b
381 Text-copy-source-md5: e29311f6f1bf1af907f9ef9f44b8328b
382 Text-copy-source-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
375
383
376
384
377 Revision-number: 11
385 Revision-number: 11
@@ -389,7 +397,7 b' pmezard'
389 K 8
397 K 8
390 svn:date
398 svn:date
391 V 27
399 V 27
392 2008-12-06T13:33:44.349920Z
400 2009-06-21T14:32:34.803189Z
393 PROPS-END
401 PROPS-END
394
402
395 Node-path: subproject/trunk/d2
403 Node-path: subproject/trunk/d2
@@ -399,3 +407,94 b' Node-copyfrom-rev: 7'
399 Node-copyfrom-path: subproject/trunk/d2
407 Node-copyfrom-path: subproject/trunk/d2
400
408
401
409
410 Revision-number: 12
411 Prop-content-length: 107
412 Content-length: 107
413
414 K 7
415 svn:log
416 V 6
417 add d3
418 K 10
419 svn:author
420 V 7
421 pmezard
422 K 8
423 svn:date
424 V 27
425 2009-06-21T14:32:36.531735Z
426 PROPS-END
427
428 Node-path: subproject/trunk/d3
429 Node-kind: dir
430 Node-action: add
431 Prop-content-length: 10
432 Content-length: 10
433
434 PROPS-END
435
436
437 Node-path: subproject/trunk/d3/d31
438 Node-kind: dir
439 Node-action: add
440 Prop-content-length: 10
441 Content-length: 10
442
443 PROPS-END
444
445
446 Node-path: subproject/trunk/d3/d31/e
447 Node-kind: file
448 Node-action: add
449 Prop-content-length: 10
450 Text-content-length: 2
451 Text-content-md5: 9ffbf43126e33be52cd2bf7e01d627f9
452 Text-content-sha1: 094e3afb2fe8dfe82f63731cdcd3b999f4856cff
453 Content-length: 12
454
455 PROPS-END
456 e
457
458
459 Node-path: subproject/trunk/d3/f
460 Node-kind: file
461 Node-action: add
462 Prop-content-length: 10
463 Text-content-length: 2
464 Text-content-md5: 9a8ad92c50cae39aa2c5604fd0ab6d8c
465 Text-content-sha1: a9fcd54b25e7e863d72cd47c08af46e61b74b561
466 Content-length: 12
467
468 PROPS-END
469 f
470
471
472 Revision-number: 13
473 Prop-content-length: 128
474 Content-length: 128
475
476 K 7
477 svn:log
478 V 26
479 copy dir and remove subdir
480 K 10
481 svn:author
482 V 7
483 pmezard
484 K 8
485 svn:date
486 V 27
487 2009-06-21T14:32:38.281829Z
488 PROPS-END
489
490 Node-path: subproject/trunk/d3/d31
491 Node-action: delete
492
493
494 Node-path: subproject/trunk/d4
495 Node-kind: dir
496 Node-action: add
497 Node-copyfrom-rev: 12
498 Node-copyfrom-path: subproject/trunk/d3
499
500
@@ -22,15 +22,19 b' cd project'
22 echo a > trunk/a
22 echo a > trunk/a
23 echo b > trunk/b
23 echo b > trunk/b
24 echo c > trunk/c
24 echo c > trunk/c
25 mkdir trunk/dir
26 echo e > trunk/dir/e
25 # Add a file within branches, used to confuse branch detection
27 # Add a file within branches, used to confuse branch detection
26 echo d > branches/notinbranch
28 echo d > branches/notinbranch
27 svn add trunk/a trunk/b trunk/c branches/notinbranch
29 svn add trunk/a trunk/b trunk/c trunk/dir branches/notinbranch
28 svn ci -m hello
30 svn ci -m hello
31 svn up
29
32
30 # Branch to old
33 # Branch to old
31 svn copy trunk branches/old
34 svn copy trunk branches/old
32 svn rm branches/old/c
35 svn rm branches/old/c
33 svn ci -m "branch trunk, remove c"
36 svn rm branches/old/dir
37 svn ci -m "branch trunk, remove c and dir"
34 svn up
38 svn up
35
39
36 # Update trunk
40 # Update trunk
@@ -57,6 +57,17 b' else'
57 # Copy a directory from a past revision
57 # Copy a directory from a past revision
58 svn copy -r 7 $svnurl/subproject/trunk/d2 $svnurl/subproject/trunk -m copydirfrompast
58 svn copy -r 7 $svnurl/subproject/trunk/d2 $svnurl/subproject/trunk -m copydirfrompast
59 fi
59 fi
60
61 # Copy a directory while removing a subdirectory
62 svn up
63 mkdir -p subproject/trunk/d3/d31
64 echo e > subproject/trunk/d3/d31/e
65 echo f > subproject/trunk/d3/f
66 svn add subproject/trunk/d3
67 svn ci -m "add d3"
68 svn copy subproject/trunk/d3 subproject/trunk/d4
69 svn rm subproject/trunk/d3/d31
70 svn ci -m "copy dir and remove subdir"
60 cd ..
71 cd ..
61
72
62 svnadmin dump svn-repo > ../move.svndump No newline at end of file
73 svnadmin dump svn-repo > ../move.svndump
@@ -5,7 +5,7 b' sorting...'
5 converting...
5 converting...
6 10 init projA
6 10 init projA
7 9 hello
7 9 hello
8 8 branch trunk, remove c
8 8 branch trunk, remove c and dir
9 7 change a
9 7 change a
10 6 change b
10 6 change b
11 5 move and update c
11 5 move and update c
@@ -37,9 +37,9 b' o branch=newbranch 11 branch trunk@1 in'
37 | | |
37 | | |
38 | o | branch= 3 change a files: a
38 | o | branch= 3 change a files: a
39 | | |
39 | | |
40 +---o branch=old 2 branch trunk, remove c files: a b
40 | | o branch=old 2 branch trunk, remove c and dir files: c
41 | |
41 | |/
42 | o branch= 1 hello files: a b c
42 | o branch= 1 hello files: a b c dir/e
43 |/
43 |/
44 o branch= 0 init projA files:
44 o branch= 0 init projA files:
45
45
@@ -3,16 +3,22 b' initializing destination A-hg repository'
3 scanning source...
3 scanning source...
4 sorting...
4 sorting...
5 converting...
5 converting...
6 9 createtrunk
6 11 createtrunk
7 8 moved1
7 10 moved1
8 7 moved1
8 9 moved1
9 6 moved2
9 8 moved2
10 5 changeb and rm d2
10 7 changeb and rm d2
11 4 changeb and rm d2
11 6 changeb and rm d2
12 3 moved1again
12 5 moved1again
13 2 moved1again
13 4 moved1again
14 1 copyfilefrompast
14 3 copyfilefrompast
15 0 copydirfrompast
15 2 copydirfrompast
16 1 add d3
17 0 copy dir and remove subdir
18 o 11 copy dir and remove subdir files: d3/d31/e d4/d31/e d4/f
19 |
20 o 10 add d3 files: d3/d31/e d3/f
21 |
16 o 9 copydirfrompast files: d2/d
22 o 9 copydirfrompast files: d2/d
17 |
23 |
18 o 8 copyfilefrompast files: d
24 o 8 copyfilefrompast files: d
@@ -33,5 +39,5 b' o | 2 moved1 files: d1/b d1/c'
33 |
39 |
34 o 0 createtrunk files:
40 o 0 createtrunk files:
35
41
36 default 9:
42 default 11:
37 d1 6:
43 d1 6:
@@ -1,5 +1,5 b''
1 % help
1 % help
2 keyword extension - keyword expansion in tracked files
2 keyword extension - expand keywords in tracked files
3
3
4 This extension expands RCS/CVS-like or self-customized $Keywords$ in
4 This extension expands RCS/CVS-like or self-customized $Keywords$ in
5 tracked text files selected by your configuration.
5 tracked text files selected by your configuration.
@@ -55,9 +55,9 b' list of commands:'
55
55
56 enabled extensions:
56 enabled extensions:
57
57
58 keyword keyword expansion in tracked files
58 keyword expand keywords in tracked files
59 mq patch management and development
59 mq work with a stack of patches
60 notify hook extension to email notifications on commits/pushes
60 notify send e-mail notifications for commits/pushes
61
61
62 use "hg -v help keyword" to show aliases and global options
62 use "hg -v help keyword" to show aliases and global options
63 % hg kwdemo
63 % hg kwdemo
@@ -1,5 +1,5 b''
1 % help
1 % help
2 mq extension - patch management and development
2 mq extension - work with a stack of patches
3
3
4 This extension lets you work with a stack of patches in a Mercurial
4 This extension lets you work with a stack of patches in a Mercurial
5 repository. It manages two stacks of patches - all known patches, and
5 repository. It manages two stacks of patches - all known patches, and
@@ -53,7 +53,7 b' list of commands:'
53
53
54 enabled extensions:
54 enabled extensions:
55
55
56 mq patch management and development
56 mq work with a stack of patches
57
57
58 use "hg -v help mq" to show aliases and global options
58 use "hg -v help mq" to show aliases and global options
59 adding a
59 adding a
@@ -1,4 +1,4 b''
1 notify extension - hook extension to email notifications on commits/pushes
1 notify extension - send e-mail notifications for commits/pushes
2
2
3 Subscriptions can be managed through hgrc. Default mode is to print
3 Subscriptions can be managed through hgrc. Default mode is to print
4 messages to stdout, for testing and configuring.
4 messages to stdout, for testing and configuring.
General Comments 0
You need to be logged in to leave comments. Login now