Show More
@@ -67,8 +67,14 b' def _rootctx(repo):' | |||
|
67 | 67 | def buildmetadata(ctx): |
|
68 | 68 | '''build content of .hg_archival.txt''' |
|
69 | 69 | repo = ctx.repo() |
|
70 | hex = ctx.hex() | |
|
71 | if ctx.rev() is None: | |
|
72 | hex = ctx.p1().hex() | |
|
73 | if ctx.dirty(): | |
|
74 | hex += '+' | |
|
75 | ||
|
70 | 76 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( |
|
71 |
_rootctx(repo).hex(), |
|
|
77 | _rootctx(repo).hex(), hex, encoding.fromlocal(ctx.branch())) | |
|
72 | 78 | |
|
73 | 79 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() |
|
74 | 80 | if repo.tagtype(t) == 'global') |
@@ -187,6 +187,14 b' Archive wdir() with subrepos' | |||
|
187 | 187 | ../wdir/sub1/sub2/folder/test.txt |
|
188 | 188 | ../wdir/sub1/sub2/sub2 |
|
189 | 189 | |
|
190 | $ cat ../wdir/.hg_archival.txt | |
|
191 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
|
192 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ | |
|
193 | branch: default | |
|
194 | latesttag: null | |
|
195 | latesttagdistance: 4 | |
|
196 | changessincelatesttag: 3 | |
|
197 | ||
|
190 | 198 | Attempting to archive 'wdir()' with a missing file is handled gracefully |
|
191 | 199 | $ rm sub1/sub1 |
|
192 | 200 | $ rm -r ../wdir |
@@ -204,6 +212,16 b" Attempting to archive 'wdir()' with a mi" | |||
|
204 | 212 | |
|
205 | 213 | Continue relative path printing + subrepos |
|
206 | 214 | $ hg update -Cq |
|
215 | $ rm -r ../wdir | |
|
216 | $ hg archive -S -r 'wdir()' ../wdir | |
|
217 | $ cat ../wdir/.hg_archival.txt | |
|
218 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a | |
|
219 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd | |
|
220 | branch: default | |
|
221 | latesttag: null | |
|
222 | latesttagdistance: 4 | |
|
223 | changessincelatesttag: 3 | |
|
224 | ||
|
207 | 225 | $ touch sub1/sub2/folder/bar |
|
208 | 226 | $ hg addremove sub1/sub2 |
|
209 | 227 | adding sub1/sub2/folder/bar (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now