##// END OF EJS Templates
add -r/--rev arguments to incoming and outgoing
Benoit Boissinot -
r2521:9cceb439 default
parent child Browse files
Show More
@@ -1875,7 +1875,10 b' def incoming(ui, repo, source="default",'
1875 1875 # use the created uncompressed bundlerepo
1876 1876 other = bundlerepo.bundlerepository(ui, repo.root, fname)
1877 1877
1878 o = other.changelog.nodesbetween(incoming)[0]
1878 revs = None
1879 if opts['rev']:
1880 revs = [other.lookup(rev) for rev in opts['rev']]
1881 o = other.changelog.nodesbetween(incoming, revs)[0]
1879 1882 if opts['newest_first']:
1880 1883 o.reverse()
1881 1884 displayer = show_changeset(ui, other, opts)
@@ -2085,13 +2088,16 b' def outgoing(ui, repo, dest=None, **opts'
2085 2088 ui.setconfig("ui", "ssh", opts['ssh'])
2086 2089 if opts['remotecmd']:
2087 2090 ui.setconfig("ui", "remotecmd", opts['remotecmd'])
2091 revs = None
2092 if opts['rev']:
2093 revs = [repo.lookup(rev) for rev in opts['rev']]
2088 2094
2089 2095 other = hg.repository(ui, dest)
2090 2096 o = repo.findoutgoing(other, force=opts['force'])
2091 2097 if not o:
2092 2098 ui.status(_("no changes found\n"))
2093 2099 return
2094 o = repo.changelog.nodesbetween(o)[0]
2100 o = repo.changelog.nodesbetween(o, revs)[0]
2095 2101 if opts['newest_first']:
2096 2102 o.reverse()
2097 2103 displayer = show_changeset(ui, repo, opts)
@@ -3022,11 +3028,13 b' table = {'
3022 3028 ('n', 'newest-first', None, _('show newest record first')),
3023 3029 ('', 'bundle', '', _('file to store the bundles into')),
3024 3030 ('p', 'patch', None, _('show patch')),
3031 ('r', 'rev', [], _('a specific revision you would like to pull')),
3025 3032 ('', 'template', '', _('display with template')),
3026 3033 ('e', 'ssh', '', _('specify ssh command to use')),
3027 3034 ('', 'remotecmd', '',
3028 3035 _('specify hg command to run on the remote side'))],
3029 _('hg incoming [-p] [-n] [-M] [--bundle FILENAME] [SOURCE]')),
3036 _('hg incoming [-p] [-n] [-M] [-r REV]...'
3037 '[--bundle FILENAME] [SOURCE]')),
3030 3038 "^init": (init, [], _('hg init [DEST]')),
3031 3039 "locate":
3032 3040 (locate,
@@ -3064,12 +3072,13 b' table = {'
3064 3072 _('run even when remote repository is unrelated')),
3065 3073 ('p', 'patch', None, _('show patch')),
3066 3074 ('', 'style', '', _('display using template map file')),
3075 ('r', 'rev', [], _('a specific revision you would like to push')),
3067 3076 ('n', 'newest-first', None, _('show newest record first')),
3068 3077 ('', 'template', '', _('display with template')),
3069 3078 ('e', 'ssh', '', _('specify ssh command to use')),
3070 3079 ('', 'remotecmd', '',
3071 3080 _('specify hg command to run on the remote side'))],
3072 _('hg outgoing [-M] [-p] [-n] [DEST]')),
3081 _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')),
3073 3082 "^parents":
3074 3083 (parents,
3075 3084 [('b', 'branches', None, _('show branches')),
@@ -14,8 +14,10 b' cd ..'
14 14 hg init new
15 15 # http incoming
16 16 http_proxy= hg -R new incoming http://localhost:20059/
17 http_proxy= hg -R new incoming -r 4 http://localhost:20059/
17 18 # local incoming
18 19 hg -R new incoming test
20 hg -R new incoming -r 4 test
19 21
20 22 # test with --bundle
21 23 http_proxy= hg -R new incoming --bundle test.hg http://localhost:20059/
@@ -42,5 +44,6 b' hg verify'
42 44 cd ..
43 45 hg -R test-dev outgoing test
44 46 http_proxy= hg -R test-dev outgoing http://localhost:20059/
47 http_proxy= hg -R test-dev outgoing -r 11 http://localhost:20059/
45 48
46 49 kill `cat test/hg.pid`
@@ -75,6 +75,31 b' user: test'
75 75 date: Mon Jan 12 13:46:40 1970 +0000
76 76 summary: 4
77 77
78 changeset: 0:9cb21d99fe27
79 user: test
80 date: Mon Jan 12 13:46:40 1970 +0000
81 summary: 0
82
83 changeset: 1:d717f5dfad6a
84 user: test
85 date: Mon Jan 12 13:46:40 1970 +0000
86 summary: 1
87
88 changeset: 2:c0d6b86da426
89 user: test
90 date: Mon Jan 12 13:46:40 1970 +0000
91 summary: 2
92
93 changeset: 3:dfacbd43b3fe
94 user: test
95 date: Mon Jan 12 13:46:40 1970 +0000
96 summary: 3
97
98 changeset: 4:1f3a964b6022
99 user: test
100 date: Mon Jan 12 13:46:40 1970 +0000
101 summary: 4
102
78 103 changeset: 5:c028bcc7a28a
79 104 user: test
80 105 date: Mon Jan 12 13:46:40 1970 +0000
@@ -121,6 +146,31 b' user: test'
121 146 date: Mon Jan 12 13:46:40 1970 +0000
122 147 summary: 4
123 148
149 changeset: 0:9cb21d99fe27
150 user: test
151 date: Mon Jan 12 13:46:40 1970 +0000
152 summary: 0
153
154 changeset: 1:d717f5dfad6a
155 user: test
156 date: Mon Jan 12 13:46:40 1970 +0000
157 summary: 1
158
159 changeset: 2:c0d6b86da426
160 user: test
161 date: Mon Jan 12 13:46:40 1970 +0000
162 summary: 2
163
164 changeset: 3:dfacbd43b3fe
165 user: test
166 date: Mon Jan 12 13:46:40 1970 +0000
167 summary: 3
168
169 changeset: 4:1f3a964b6022
170 user: test
171 date: Mon Jan 12 13:46:40 1970 +0000
172 summary: 4
173
124 174 changeset: 5:c028bcc7a28a
125 175 user: test
126 176 date: Mon Jan 12 13:46:40 1970 +0000
@@ -270,3 +320,19 b' user: test'
270 320 date: Mon Jan 12 13:46:40 1970 +0000
271 321 summary: 13
272 322
323 searching for changes
324 changeset: 9:3741c3ad1096
325 user: test
326 date: Mon Jan 12 13:46:40 1970 +0000
327 summary: 9
328
329 changeset: 10:de4143c8d9a5
330 user: test
331 date: Mon Jan 12 13:46:40 1970 +0000
332 summary: 10
333
334 changeset: 11:0e1c188b9a7a
335 user: test
336 date: Mon Jan 12 13:46:40 1970 +0000
337 summary: 11
338
General Comments 0
You need to be logged in to leave comments. Login now