Show More
@@ -342,7 +342,7 b' proc parsecommit {id contents listed old' | |||||
342 |
|
342 | |||
343 | proc readrefs {} { |
|
343 | proc readrefs {} { | |
344 | global tagids idtags headids idheads tagcontents env curid |
|
344 | global tagids idtags headids idheads tagcontents env curid | |
345 |
|
345 | |||
346 | set curid [exec $env(HG) --config ui.report_untrusted=false id] |
|
346 | set curid [exec $env(HG) --config ui.report_untrusted=false id] | |
347 | regexp -- {[[:xdigit:]]+} $curid curid |
|
347 | regexp -- {[[:xdigit:]]+} $curid curid | |
348 |
|
348 |
@@ -217,7 +217,7 b' extensions::' | |||||
217 | defines the extension. |
|
217 | defines the extension. | |
218 |
|
218 | |||
219 | To explicitly disable an extension that is enabled in an hgrc of |
|
219 | To explicitly disable an extension that is enabled in an hgrc of | |
220 |
broader scope, prepend its path with '!', as in |
|
220 | broader scope, prepend its path with '!', as in | |
221 | 'hgext.foo = !/ext/path' or 'hgext.foo = !' when no path is supplied. |
|
221 | 'hgext.foo = !/ext/path' or 'hgext.foo = !' when no path is supplied. | |
222 |
|
222 | |||
223 | Example for ~/.hgrc: |
|
223 | Example for ~/.hgrc: |
@@ -236,7 +236,7 b' class converter(object):' | |||||
236 | for prev in commit.parents: |
|
236 | for prev in commit.parents: | |
237 | if prev not in self.commitcache: |
|
237 | if prev not in self.commitcache: | |
238 | self.cachecommit(prev) |
|
238 | self.cachecommit(prev) | |
239 |
pbranches.append((self.map[prev], |
|
239 | pbranches.append((self.map[prev], | |
240 | self.commitcache[prev].branch)) |
|
240 | self.commitcache[prev].branch)) | |
241 | self.dest.setbranch(commit.branch, pbranches) |
|
241 | self.dest.setbranch(commit.branch, pbranches) | |
242 | for f, v in files: |
|
242 | for f, v in files: |
@@ -114,7 +114,7 b' class mercurial_sink(converter_sink):' | |||||
114 | self.repo.lookup(b[0]) |
|
114 | self.repo.lookup(b[0]) | |
115 | except: |
|
115 | except: | |
116 | missings.setdefault(b[1], []).append(b[0]) |
|
116 | missings.setdefault(b[1], []).append(b[0]) | |
117 |
|
117 | |||
118 | if missings: |
|
118 | if missings: | |
119 | self.after() |
|
119 | self.after() | |
120 | for pbranch, heads in missings.iteritems(): |
|
120 | for pbranch, heads in missings.iteritems(): |
@@ -202,7 +202,7 b' class svn_source(converter_source):' | |||||
202 | if self.startrev < 0: |
|
202 | if self.startrev < 0: | |
203 | self.startrev = 0 |
|
203 | self.startrev = 0 | |
204 | except ValueError: |
|
204 | except ValueError: | |
205 |
raise util.Abort(_('svn: start revision %s is not an integer') |
|
205 | raise util.Abort(_('svn: start revision %s is not an integer') | |
206 | % self.startrev) |
|
206 | % self.startrev) | |
207 |
|
207 | |||
208 | try: |
|
208 | try: | |
@@ -215,7 +215,7 b' class svn_source(converter_source):' | |||||
215 | raise util.Abort(_('no revision found in module %s') % |
|
215 | raise util.Abort(_('no revision found in module %s') % | |
216 | self.module.encode(self.encoding)) |
|
216 | self.module.encode(self.encoding)) | |
217 | self.last_changed = self.revnum(self.head) |
|
217 | self.last_changed = self.revnum(self.head) | |
218 |
|
218 | |||
219 | self._changescache = None |
|
219 | self._changescache = None | |
220 |
|
220 | |||
221 | if os.path.exists(os.path.join(url, '.svn/entries')): |
|
221 | if os.path.exists(os.path.join(url, '.svn/entries')): | |
@@ -288,7 +288,7 b' class svn_source(converter_source):' | |||||
288 | self.ui.note(_('ignoring empty branch %s\n') % |
|
288 | self.ui.note(_('ignoring empty branch %s\n') % | |
289 | branch.encode(self.encoding)) |
|
289 | branch.encode(self.encoding)) | |
290 | continue |
|
290 | continue | |
291 |
self.ui.note('found branch %s at %d\n' % |
|
291 | self.ui.note('found branch %s at %d\n' % | |
292 | (branch, self.revnum(brevid))) |
|
292 | (branch, self.revnum(brevid))) | |
293 | self.heads.append(brevid) |
|
293 | self.heads.append(brevid) | |
294 |
|
294 | |||
@@ -298,7 +298,7 b' class svn_source(converter_source):' | |||||
298 | 'with more than one branch')) |
|
298 | 'with more than one branch')) | |
299 | revnum = self.revnum(self.heads[0]) |
|
299 | revnum = self.revnum(self.heads[0]) | |
300 | if revnum < self.startrev: |
|
300 | if revnum < self.startrev: | |
301 |
raise util.Abort(_('svn: no revision found after start revision %d') |
|
301 | raise util.Abort(_('svn: no revision found after start revision %d') | |
302 | % self.startrev) |
|
302 | % self.startrev) | |
303 |
|
303 | |||
304 | return self.heads |
|
304 | return self.heads | |
@@ -322,9 +322,9 b' class svn_source(converter_source):' | |||||
322 | else: |
|
322 | else: | |
323 | # Perform a full checkout on roots |
|
323 | # Perform a full checkout on roots | |
324 | uuid, module, revnum = self.revsplit(rev) |
|
324 | uuid, module, revnum = self.revsplit(rev) | |
325 |
entries = svn.client.ls(self.base + module, optrev(revnum), |
|
325 | entries = svn.client.ls(self.base + module, optrev(revnum), | |
326 | True, self.ctx) |
|
326 | True, self.ctx) | |
327 |
files = [n for n,e in entries.iteritems() |
|
327 | files = [n for n,e in entries.iteritems() | |
328 | if e.kind == svn.core.svn_node_file] |
|
328 | if e.kind == svn.core.svn_node_file] | |
329 | copies = {} |
|
329 | copies = {} | |
330 |
|
330 | |||
@@ -364,7 +364,7 b' class svn_source(converter_source):' | |||||
364 | tags = {} |
|
364 | tags = {} | |
365 | if self.tags is None: |
|
365 | if self.tags is None: | |
366 | return tags |
|
366 | return tags | |
367 |
|
367 | |||
368 | start = self.revnum(self.head) |
|
368 | start = self.revnum(self.head) | |
369 | try: |
|
369 | try: | |
370 | for entry in get_log(self.url, [self.tags], self.startrev, start): |
|
370 | for entry in get_log(self.url, [self.tags], self.startrev, start): | |
@@ -442,7 +442,7 b' class svn_source(converter_source):' | |||||
442 | if not path.startswith(p) or not paths[p].copyfrom_path: |
|
442 | if not path.startswith(p) or not paths[p].copyfrom_path: | |
443 | continue |
|
443 | continue | |
444 | newpath = paths[p].copyfrom_path + path[len(p):] |
|
444 | newpath = paths[p].copyfrom_path + path[len(p):] | |
445 |
self.ui.debug("branch renamed from %s to %s at %d\n" % |
|
445 | self.ui.debug("branch renamed from %s to %s at %d\n" % | |
446 | (path, newpath, revnum)) |
|
446 | (path, newpath, revnum)) | |
447 | path = newpath |
|
447 | path = newpath | |
448 | break |
|
448 | break | |
@@ -566,7 +566,7 b' class svn_source(converter_source):' | |||||
566 | self.reparent('') |
|
566 | self.reparent('') | |
567 | fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev) |
|
567 | fromkind = svn.ra.check_path(self.ra, entrypath.strip('/'), fromrev) | |
568 | self.reparent(self.module) |
|
568 | self.reparent(self.module) | |
569 |
|
569 | |||
570 | if fromkind == svn.core.svn_node_file: # a deleted file |
|
570 | if fromkind == svn.core.svn_node_file: # a deleted file | |
571 | entries.append(self.recode(entry)) |
|
571 | entries.append(self.recode(entry)) | |
572 | elif fromkind == svn.core.svn_node_dir: |
|
572 | elif fromkind == svn.core.svn_node_dir: | |
@@ -677,7 +677,7 b' class svn_source(converter_source):' | |||||
677 |
|
677 | |||
678 | self.child_cset = None |
|
678 | self.child_cset = None | |
679 | def parselogentry(orig_paths, revnum, author, date, message): |
|
679 | def parselogentry(orig_paths, revnum, author, date, message): | |
680 |
"""Return the parsed commit object or None, and True if |
|
680 | """Return the parsed commit object or None, and True if | |
681 | the revision is a branch root. |
|
681 | the revision is a branch root. | |
682 | """ |
|
682 | """ | |
683 | self.ui.debug("parsing revision %d (%d changes)\n" % |
|
683 | self.ui.debug("parsing revision %d (%d changes)\n" % | |
@@ -764,13 +764,13 b' class svn_source(converter_source):' | |||||
764 | lastonbranch = True |
|
764 | lastonbranch = True | |
765 | break |
|
765 | break | |
766 | if self.is_blacklisted(revnum): |
|
766 | if self.is_blacklisted(revnum): | |
767 |
self.ui.note('skipping blacklisted revision %d\n' |
|
767 | self.ui.note('skipping blacklisted revision %d\n' | |
768 | % revnum) |
|
768 | % revnum) | |
769 | continue |
|
769 | continue | |
770 | if paths is None: |
|
770 | if paths is None: | |
771 | self.ui.debug('revision %d has no entries\n' % revnum) |
|
771 | self.ui.debug('revision %d has no entries\n' % revnum) | |
772 | continue |
|
772 | continue | |
773 |
cset, lastonbranch = parselogentry(paths, revnum, author, |
|
773 | cset, lastonbranch = parselogentry(paths, revnum, author, | |
774 | date, message) |
|
774 | date, message) | |
775 | if cset: |
|
775 | if cset: | |
776 | firstcset = cset |
|
776 | firstcset = cset |
@@ -67,8 +67,8 b' def scanpatch(fp):' | |||||
67 |
|
67 | |||
68 | class header(object): |
|
68 | class header(object): | |
69 | """patch header |
|
69 | """patch header | |
70 |
|
70 | |||
71 |
XXX shoudn't we move this to mercurial/patch.py ? |
|
71 | XXX shoudn't we move this to mercurial/patch.py ? | |
72 | """ |
|
72 | """ | |
73 | diff_re = re.compile('diff --git a/(.*) b/(.*)$') |
|
73 | diff_re = re.compile('diff --git a/(.*) b/(.*)$') | |
74 | allhunks_re = re.compile('(?:index|new file|deleted file) ') |
|
74 | allhunks_re = re.compile('(?:index|new file|deleted file) ') | |
@@ -134,7 +134,7 b' def countchanges(hunk):' | |||||
134 |
|
134 | |||
135 | class hunk(object): |
|
135 | class hunk(object): | |
136 | """patch hunk |
|
136 | """patch hunk | |
137 |
|
137 | |||
138 | XXX shouldn't we merge this with patch.hunk ? |
|
138 | XXX shouldn't we merge this with patch.hunk ? | |
139 | """ |
|
139 | """ | |
140 | maxcontext = 3 |
|
140 | maxcontext = 3 | |
@@ -267,7 +267,7 b' def filterpatch(ui, chunks):' | |||||
267 | applied = {} # 'filename' -> [] of chunks |
|
267 | applied = {} # 'filename' -> [] of chunks | |
268 | def prompt(query): |
|
268 | def prompt(query): | |
269 | """prompt query, and process base inputs |
|
269 | """prompt query, and process base inputs | |
270 |
|
270 | |||
271 | - y/n for the rest of file |
|
271 | - y/n for the rest of file | |
272 | - y/n for the rest |
|
272 | - y/n for the rest | |
273 | - ? (help) |
|
273 | - ? (help) |
@@ -81,7 +81,7 b' def encode_with_check(arg):' | |||||
81 | return arg |
|
81 | return arg | |
82 |
|
82 | |||
83 | def wrap(func): |
|
83 | def wrap(func): | |
84 |
|
84 | |||
85 | def wrapped(*args): |
|
85 | def wrapped(*args): | |
86 | # check argument is unicode, then call original |
|
86 | # check argument is unicode, then call original | |
87 | for arg in args: |
|
87 | for arg in args: | |
@@ -122,7 +122,7 b' def install():' | |||||
122 | from mercurial import ui |
|
122 | from mercurial import ui | |
123 | _ui = ui.ui() |
|
123 | _ui = ui.ui() | |
124 | os.path.join = wrap(os.path.join) |
|
124 | os.path.join = wrap(os.path.join) | |
125 |
os.path.split = wrap(os.path.split) |
|
125 | os.path.split = wrap(os.path.split) | |
126 | os.path.splitext = wrap(os.path.splitext) |
|
126 | os.path.splitext = wrap(os.path.splitext) | |
127 | os.path.splitunc = wrap(os.path.splitunc) |
|
127 | os.path.splitunc = wrap(os.path.splitunc) | |
128 | os.path.normpath = wrap(os.path.normpath) |
|
128 | os.path.normpath = wrap(os.path.normpath) | |
@@ -134,7 +134,7 b' def install():' | |||||
134 | def uninstall(): |
|
134 | def uninstall(): | |
135 | # restore original functions. |
|
135 | # restore original functions. | |
136 | os.path.join = unwrap(os.path.join) |
|
136 | os.path.join = unwrap(os.path.join) | |
137 |
os.path.split = unwrap(os.path.split) |
|
137 | os.path.split = unwrap(os.path.split) | |
138 | os.path.splitext = unwrap(os.path.splitext) |
|
138 | os.path.splitext = unwrap(os.path.splitext) | |
139 | os.path.splitunc = unwrap(os.path.splitunc) |
|
139 | os.path.splitunc = unwrap(os.path.splitunc) | |
140 | os.path.normpath = unwrap(os.path.normpath) |
|
140 | os.path.normpath = unwrap(os.path.normpath) |
@@ -2474,7 +2474,7 b' def serve(ui, repo, **opts):' | |||||
2474 | ui.status(_('listening at http://%s:%d/%s\n') % |
|
2474 | ui.status(_('listening at http://%s:%d/%s\n') % | |
2475 | (self.httpd.addr, self.httpd.port, prefix)) |
|
2475 | (self.httpd.addr, self.httpd.port, prefix)) | |
2476 | else: |
|
2476 | else: | |
2477 |
ui.status(_('listening at http://%s/%s\n') % |
|
2477 | ui.status(_('listening at http://%s/%s\n') % | |
2478 | (self.httpd.addr, prefix)) |
|
2478 | (self.httpd.addr, prefix)) | |
2479 |
|
2479 | |||
2480 | def run(self): |
|
2480 | def run(self): |
@@ -232,7 +232,7 b' class filectx(object):' | |||||
232 | if '_changectx' in self.__dict__: |
|
232 | if '_changectx' in self.__dict__: | |
233 | return self._changectx.rev() |
|
233 | return self._changectx.rev() | |
234 | if '_changeid' in self.__dict__: |
|
234 | if '_changeid' in self.__dict__: | |
235 |
return self._changectx.rev() |
|
235 | return self._changectx.rev() | |
236 | return self._filelog.linkrev(self._filenode) |
|
236 | return self._filelog.linkrev(self._filenode) | |
237 |
|
237 | |||
238 | def linkrev(self): return self._filelog.linkrev(self._filenode) |
|
238 | def linkrev(self): return self._filelog.linkrev(self._filenode) |
@@ -97,7 +97,7 b' class hgwebdir(object):' | |||||
97 | return |
|
97 | return | |
98 |
|
98 | |||
99 | # nested indexes and hgwebs |
|
99 | # nested indexes and hgwebs | |
100 |
|
100 | |||
101 | repos = dict(self.repos) |
|
101 | repos = dict(self.repos) | |
102 | while virtual: |
|
102 | while virtual: | |
103 | real = repos.get(virtual) |
|
103 | real = repos.get(virtual) |
@@ -517,7 +517,7 b' class localrepository(repo.repository):' | |||||
517 | fn = None |
|
517 | fn = None | |
518 | params = cmd |
|
518 | params = cmd | |
519 | for name, filterfn in self._datafilters.iteritems(): |
|
519 | for name, filterfn in self._datafilters.iteritems(): | |
520 |
if cmd.startswith(name): |
|
520 | if cmd.startswith(name): | |
521 | fn = filterfn |
|
521 | fn = filterfn | |
522 | params = cmd[len(name):].lstrip() |
|
522 | params = cmd[len(name):].lstrip() | |
523 | break |
|
523 | break | |
@@ -1585,7 +1585,7 b' class localrepository(repo.repository):' | |||||
1585 |
|
1585 | |||
1586 | Another wrinkle is doing the reverse, figuring out which changeset in |
|
1586 | Another wrinkle is doing the reverse, figuring out which changeset in | |
1587 | the changegroup a particular filenode or manifestnode belongs to. |
|
1587 | the changegroup a particular filenode or manifestnode belongs to. | |
1588 |
|
1588 | |||
1589 | The caller can specify some nodes that must be included in the |
|
1589 | The caller can specify some nodes that must be included in the | |
1590 | changegroup using the extranodes argument. It should be a dict |
|
1590 | changegroup using the extranodes argument. It should be a dict | |
1591 | where the keys are the filenames (or 1 for the manifest), and the |
|
1591 | where the keys are the filenames (or 1 for the manifest), and the |
@@ -1,6 +1,6 b'' | |||||
1 | <div class="page_footer"> |
|
1 | <div class="page_footer"> | |
2 | <div class="page_footer_text">#repo|escape#</div> |
|
2 | <div class="page_footer_text">#repo|escape#</div> | |
3 |
<a class="rss_logo" href="#url#rss-log">RSS</a> |
|
3 | <a class="rss_logo" href="#url#rss-log">RSS</a> | |
4 | <a class="rss_logo" href="#url#atom-log">Atom</a> |
|
4 | <a class="rss_logo" href="#url#atom-log">Atom</a> | |
5 | <br /> |
|
5 | <br /> | |
6 | #motd# |
|
6 | #motd# |
@@ -10,7 +10,7 b' fixpath()' | |||||
10 | svnupanddisplay() |
|
10 | svnupanddisplay() | |
11 | { |
|
11 | { | |
12 | ( |
|
12 | ( | |
13 |
cd $1; |
|
13 | cd $1; | |
14 | svn up; |
|
14 | svn up; | |
15 | svn st -v | fixpath |
|
15 | svn st -v | fixpath | |
16 | limit='' |
|
16 | limit='' | |
@@ -18,7 +18,7 b' svnupanddisplay()' | |||||
18 | limit="--limit=$2" |
|
18 | limit="--limit=$2" | |
19 | fi |
|
19 | fi | |
20 | svn log --xml -v $limit | fixpath | sed 's,<date>.*,<date/>,' |
|
20 | svn log --xml -v $limit | fixpath | sed 's,<date>.*,<date/>,' | |
21 |
) |
|
21 | ) | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | echo "[extensions]" >> $HGRCPATH |
|
24 | echo "[extensions]" >> $HGRCPATH |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -16,7 +16,7 b' mkdir a' | |||||
16 | echo a > a/a |
|
16 | echo a > a/a | |
17 |
|
17 | |||
18 | echo % should fail - would corrupt dirstate |
|
18 | echo % should fail - would corrupt dirstate | |
19 |
hg add a/a |
|
19 | hg add a/a | |
20 |
|
20 | |||
21 | echo % removing shadow |
|
21 | echo % removing shadow | |
22 | hg rm --after a |
|
22 | hg rm --after a |
@@ -49,7 +49,7 b' EOF' | |||||
49 | hg add 1.txt 2.txt dir/a.txt |
|
49 | hg add 1.txt 2.txt dir/a.txt | |
50 | hg commit -d '0 0' -m 'initial checkin' |
|
50 | hg commit -d '0 0' -m 'initial checkin' | |
51 |
|
51 | |||
52 |
echo % changing files |
|
52 | echo % changing files | |
53 |
|
53 | |||
54 | sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new |
|
54 | sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new | |
55 | sed -e 's/b/b b/' 2.txt > 2.txt.new |
|
55 | sed -e 's/b/b b/' 2.txt > 2.txt.new |
General Comments 0
You need to be logged in to leave comments.
Login now