stash pop accepts optional <id> argument - close #4
This commit is contained in:
parent
f04a4d0827
commit
0af0ce1ce6
5
README
5
README
@ -60,9 +60,10 @@ Implemented subcommands:
|
|||||||
- this currently only works with changes to already-versioned files
|
- this currently only works with changes to already-versioned files
|
||||||
list:
|
list:
|
||||||
- show a list of all stash objects
|
- show a list of all stash objects
|
||||||
pop:
|
pop [id]:
|
||||||
- apply the stash object back to the working copy
|
- apply the stash object <id> back to the working copy
|
||||||
- the stash object is removed if it was successfully applied
|
- the stash object is removed if it was successfully applied
|
||||||
|
- <id> defaults to the newest stash object created
|
||||||
show [id]:
|
show [id]:
|
||||||
- display the diff stored in stash with ID <id>
|
- display the diff stored in stash with ID <id>
|
||||||
|
|
||||||
|
7
jsvn
7
jsvn
@ -62,9 +62,10 @@
|
|||||||
# - this currently only works with changes to already-versioned files
|
# - this currently only works with changes to already-versioned files
|
||||||
# list:
|
# list:
|
||||||
# - show a list of all stash objects
|
# - show a list of all stash objects
|
||||||
# pop:
|
# pop [id]:
|
||||||
# - apply the stash object back to the working copy
|
# - apply the stash object <id> back to the working copy
|
||||||
# - the stash object is removed if it was successfully applied
|
# - the stash object is removed if it was successfully applied
|
||||||
|
# - <id> defaults to the newest stash object created
|
||||||
# show [id]:
|
# show [id]:
|
||||||
# - display the diff stored in stash with ID <id>
|
# - display the diff stored in stash with ID <id>
|
||||||
#
|
#
|
||||||
@ -824,6 +825,8 @@ def stash(argv, svn, out):
|
|||||||
stash_ids = get_stash_ids(svn)
|
stash_ids = get_stash_ids(svn)
|
||||||
if len(stash_ids) > 0:
|
if len(stash_ids) > 0:
|
||||||
stash_idx = stash_ids[-1]
|
stash_idx = stash_ids[-1]
|
||||||
|
if len(argv) >= 3:
|
||||||
|
stash_idx = int(argv[2])
|
||||||
stash_fname = get_stash_fname(svn, stash_idx)
|
stash_fname = get_stash_fname(svn, stash_idx)
|
||||||
p = Popen([svn, 'patch', stash_fname], stdout=PIPE)
|
p = Popen([svn, 'patch', stash_fname], stdout=PIPE)
|
||||||
filter_update(p.stdout, out)
|
filter_update(p.stdout, out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user