Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/commands.py @ 4059:431f3c1d3a37
Merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 30 Jan 2007 19:36:56 -0200 |
parents | 1bd6868b0b11 f1622b4f467d |
children | 5b1f663ef86d |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -604,7 +604,7 @@ def docopy(ui, repo, pats, opts, wlock): return res - pats = list(pats) + pats = util.expand_glob(pats) if not pats: raise util.Abort(_('no source or destination specified')) if len(pats) == 1: @@ -621,7 +621,8 @@ def docopy(ui, repo, pats, opts, wlock): copylist = [] for pat in pats: srcs = [] - for tag, abssrc, relsrc, exact in cmdutil.walk(repo, [pat], opts): + for tag, abssrc, relsrc, exact in cmdutil.walk(repo, [pat], opts, + globbed=True): origsrc = okaytocopy(abssrc, relsrc, exact) if origsrc: srcs.append((origsrc, abssrc, relsrc, exact)) @@ -769,10 +770,16 @@ def debugstate(ui, repo): keys = dc.keys() keys.sort() for file_ in keys: + if dc[file_][3] == -1: + # Pad or slice to locale representation + locale_len = len(time.strftime("%x %X", time.localtime(0))) + timestr = 'unset' + timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr)) + else: + timestr = time.strftime("%x %X", time.localtime(dc[file_][3])) ui.write("%c %3o %10d %s %s\n" % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], - time.strftime("%x %X", - time.localtime(dc[file_][3])), file_)) + timestr, file_)) for f in repo.dirstate.copies(): ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) @@ -2478,7 +2485,11 @@ def unbundle(ui, repo, fname, **opts): Apply a compressed changegroup file generated by the bundle command. """ - gen = changegroup.readbundle(urllib.urlopen(fname), fname) + if os.path.exists(fname): + f = open(fname) + else: + f = urllib.urlopen(fname) + gen = changegroup.readbundle(f, fname) modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) return postincoming(ui, repo, modheads, opts['update'])