##// END OF EJS Templates
unbundle: accept multiple file arguments...
Giorgos Keramidas -
r4699:a6b62584 default
parent child Browse files
Show More
@@ -2614,18 +2614,22 b' def tip(ui, repo, **opts):'
2614 2614 """
2615 2615 cmdutil.show_changeset(ui, repo, opts).show(nullrev+repo.changelog.count())
2616 2616
2617 def unbundle(ui, repo, fname, **opts):
2618 """apply a changegroup file
2619
2620 Apply a compressed changegroup file generated by the bundle
2621 command.
2617 def unbundle(ui, repo, fname1, *fnames, **opts):
2618 """apply one or more changegroup files
2619
2620 Apply one or more compressed changegroup files generated by the
2621 bundle command.
2622 2622 """
2623 if os.path.exists(fname):
2624 f = open(fname, "rb")
2625 else:
2626 f = urllib.urlopen(fname)
2627 gen = changegroup.readbundle(f, fname)
2628 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
2623 fnames = (fname1,) + fnames
2624 result = None
2625 for fname in fnames:
2626 if os.path.exists(fname):
2627 f = open(fname, "rb")
2628 else:
2629 f = urllib.urlopen(fname)
2630 gen = changegroup.readbundle(f, fname)
2631 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
2632
2629 2633 return postincoming(ui, repo, modheads, opts['update'])
2630 2634
2631 2635 def update(ui, repo, node=None, rev=None, clean=False, date=None):
@@ -3079,7 +3083,7 b' table = {'
3079 3083 (unbundle,
3080 3084 [('u', 'update', None,
3081 3085 _('update to new tip if changesets were unbundled'))],
3082 _('hg unbundle [-u] FILE')),
3086 _('hg unbundle [-u] FILE...')),
3083 3087 "^update|up|checkout|co":
3084 3088 (update,
3085 3089 [('C', 'clean', None, _('overwrite locally modified files')),
@@ -62,6 +62,13 b' hg -R bundle://../full.hg outgoing ../pa'
62 62 hg -R bundle://../does-not-exist.hg outgoing ../partial2
63 63 cd ..
64 64
65 # test for http://www.selenic.com/mercurial/bts/issue216
66 rm -r empty
67 hg init empty
68 hg -R test bundle --base null -r 0 ../0.hg
69 hg -R test bundle --base 0 -r 1 ../1.hg
70 hg -R empty unbundle -u ../0.hg ../1.hg
71
65 72 # test for 540d1059c802
66 73 hg init orig
67 74 cd orig
@@ -211,6 +211,15 b' date: Mon Jan 12 13:46:40 1970 +0'
211 211 summary: 0.3m
212 212
213 213 abort: No such file or directory: ../does-not-exist.hg
214 adding changesets
215 adding manifests
216 adding file changes
217 added 1 changesets with 1 changes to 1 files
218 adding changesets
219 adding manifests
220 adding file changes
221 added 1 changesets with 1 changes to 1 files
222 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 223 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
215 224 searching for changes
216 225 comparing with ../bundle.hg
@@ -161,7 +161,7 b' list of commands:'
161 161 tag add a tag for the current or given revision
162 162 tags list repository tags
163 163 tip show the tip revision
164 unbundle apply a changegroup file
164 unbundle apply one or more changegroup files
165 165 update update working directory
166 166 verify verify the integrity of the repository
167 167 version output version and copyright information
@@ -213,7 +213,7 b' list of commands:'
213 213 tag add a tag for the current or given revision
214 214 tags list repository tags
215 215 tip show the tip revision
216 unbundle apply a changegroup file
216 unbundle apply one or more changegroup files
217 217 update update working directory
218 218 verify verify the integrity of the repository
219 219 version output version and copyright information
@@ -84,7 +84,7 b' list of commands:'
84 84 tag add a tag for the current or given revision
85 85 tags list repository tags
86 86 tip show the tip revision
87 unbundle apply a changegroup file
87 unbundle apply one or more changegroup files
88 88 update update working directory
89 89 verify verify the integrity of the repository
90 90 version output version and copyright information
@@ -132,7 +132,7 b' use "hg -v help" to show aliases and glo'
132 132 tag add a tag for the current or given revision
133 133 tags list repository tags
134 134 tip show the tip revision
135 unbundle apply a changegroup file
135 unbundle apply one or more changegroup files
136 136 update update working directory
137 137 verify verify the integrity of the repository
138 138 version output version and copyright information
General Comments 0
You need to be logged in to leave comments. Login now