diff --git a/README b/README index 8c609fe..7da3243 100644 --- a/README +++ b/README @@ -60,9 +60,10 @@ Implemented subcommands: - this currently only works with changes to already-versioned files list: - show a list of all stash objects - pop: - - apply the stash object back to the working copy + pop [id]: + - apply the stash object back to the working copy - the stash object is removed if it was successfully applied + - defaults to the newest stash object created show [id]: - display the diff stored in stash with ID diff --git a/jsvn b/jsvn index 728b191..65c6f5b 100755 --- a/jsvn +++ b/jsvn @@ -62,9 +62,10 @@ # - this currently only works with changes to already-versioned files # list: # - show a list of all stash objects -# pop: -# - apply the stash object back to the working copy +# pop [id]: +# - apply the stash object back to the working copy # - the stash object is removed if it was successfully applied +# - defaults to the newest stash object created # show [id]: # - display the diff stored in stash with ID # @@ -824,6 +825,8 @@ def stash(argv, svn, out): stash_ids = get_stash_ids(svn) if len(stash_ids) > 0: stash_idx = stash_ids[-1] + if len(argv) >= 3: + stash_idx = int(argv[2]) stash_fname = get_stash_fname(svn, stash_idx) p = Popen([svn, 'patch', stash_fname], stdout=PIPE) filter_update(p.stdout, out)