Show More
@@ -333,21 +333,24 b' def history(ui, repo):' | |||
|
333 | 333 | |
|
334 | 334 | def identify(ui, repo): |
|
335 | 335 | """print information about the working copy""" |
|
336 | (c, a, d, u) = repo.diffdir(repo.root) | |
|
337 | mflag = (c or a or d or u) and "+" or "" | |
|
338 | 336 | parents = [p for p in repo.dirstate.parents() if p != hg.nullid] |
|
339 | 337 | if not parents: |
|
340 | 338 | ui.write("unknown\n") |
|
341 | 339 | return |
|
342 | 340 | |
|
343 | tstring = '' | |
|
341 | hexfunc = ui.verbose and hg.hex or hg.short | |
|
342 | (c, a, d, u) = repo.diffdir(repo.root) | |
|
343 | output = ["%s%s" % ('+'.join([hexfunc(parent) for parent in parents]), | |
|
344 | (c or a or d) and "+" or "")] | |
|
345 | ||
|
344 | 346 | if not ui.quiet: |
|
345 | tags = sum(map(repo.nodetags, parents), []) | |
|
346 |
|
|
|
347 | # multiple tags for a single parent separated by '/' | |
|
348 | parenttags = ['/'.join(tags) | |
|
349 | for tags in map(repo.nodetags, parents) if tags] | |
|
350 | # tags for multiple parents separated by ' + ' | |
|
351 | output.append(' + '.join(parenttags)) | |
|
347 | 352 | |
|
348 | hexfunc = ui.verbose and hg.hex or hg.short | |
|
349 | pstring = '+'.join([hexfunc(parent) for parent in parents]) | |
|
350 | ui.write("%s%s%s\n" % (pstring, mflag, tstring)) | |
|
353 | ui.write("%s\n" % ' '.join(output)) | |
|
351 | 354 | |
|
352 | 355 | def init(ui, source=None): |
|
353 | 356 | """create a new repository or copy an existing one""" |
General Comments 0
You need to be logged in to leave comments.
Login now